博客园 - JinweiChang
uuid:24b78886-0ed1-41c2-8670-e3f31dcf42c4;id=19662
2022-12-05T07:40:39Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
feed.cnblogs.com
https://www.cnblogs.com/JinweiChang/p/16952474.html
长ping监控网络 - JinweiChang
长ping监控网络 nohup ping 192.168.0.1 -c 1296000 | awk '{ print $0"\t" strftime("%H:%M:%S",systime()) } '>ping1.log & -c 1296000 每秒ping一次,需要ping多少次 >ping1.
2022-12-05T07:38:00Z
2022-12-05T07:38:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】长ping监控网络 nohup ping 192.168.0.1 -c 1296000 | awk '{ print $0"\t" strftime("%H:%M:%S",systime()) } '>ping1.log & -c 1296000 每秒ping一次,需要ping多少次 >ping1. <a href="https://www.cnblogs.com/JinweiChang/p/16952474.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/16548279.html
获取远程主机指纹 - JinweiChang
Find the SSH Fingerprint of a Remote Server ssh-keyscan -t ecdsa 172.21.168.217 保存指纹到本地 ssh-keyscan -t ecdsa 172.16.2.128 >> ~\.ssh\known_hosts
2022-08-03T10:42:00Z
2022-08-03T10:42:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】Find the SSH Fingerprint of a Remote Server ssh-keyscan -t ecdsa 172.21.168.217 保存指纹到本地 ssh-keyscan -t ecdsa 172.16.2.128 >> ~\.ssh\known_hosts <a href="https://www.cnblogs.com/JinweiChang/p/16548279.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15954656.html
powershell-修改Job密码 - JinweiChang
1.管理员运行powershell 2.执行代码 $TaskCredential = Get-Credential Get-ScheduledTask | Where-Object { $_.Principal.UserId -eq $TaskCredential.UserName } | Set-
2022-03-02T05:24:00Z
2022-03-02T05:24:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】1.管理员运行powershell 2.执行代码 $TaskCredential = Get-Credential Get-ScheduledTask | Where-Object { $_.Principal.UserId -eq $TaskCredential.UserName } | Set- <a href="https://www.cnblogs.com/JinweiChang/p/15954656.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15953574.html
Powershell-获取最新文件 - JinweiChang
$from_path=@("E:\xx\","E:\aa\") $to_path="\\xx\ss" $Subject="DR backup to cq " $MailTo="jinwei@126.com" try { foreach($i in $from_path) { cd $i; cp (d
2022-03-02T01:24:00Z
2022-03-02T01:24:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】$from_path=@("E:\xx\","E:\aa\") $to_path="\\xx\ss" $Subject="DR backup to cq " $MailTo="jinwei@126.com" try { foreach($i in $from_path) { cd $i; cp (d <a href="https://www.cnblogs.com/JinweiChang/p/15953574.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15778070.html
.NET6发布到linux - JinweiChang
1.安装runtime 参考:https://docs.microsoft.com/en-us/dotnet/core/install/linux-centos sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages
2022-01-08T05:33:00Z
2022-01-08T05:33:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】1.安装runtime 参考:https://docs.microsoft.com/en-us/dotnet/core/install/linux-centos sudo rpm -Uvh https://packages.microsoft.com/config/centos/7/packages <a href="https://www.cnblogs.com/JinweiChang/p/15778070.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15567697.html
查看公网IP - JinweiChang
linux上查看公网IP yum install bind-utils -y dig +short myip.opendns.com @resolver1.opendns.com windows上查看公网IP $tmp =Invoke-WebRequest -URI http://myip.dnso
2021-11-17T07:56:00Z
2021-11-17T07:56:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】linux上查看公网IP yum install bind-utils -y dig +short myip.opendns.com @resolver1.opendns.com windows上查看公网IP $tmp =Invoke-WebRequest -URI http://myip.dnso <a href="https://www.cnblogs.com/JinweiChang/p/15567697.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15512764.html
GoLand配置 - JinweiChang
1.go 安装 2.Goland安装 3.GoLand激活 使用防火墙关闭Goland的进出站。 搜索激活码填入。 4.开启file watch,go fmt在ctrl+S保存后自动格式化代码,goimports在代码里引入包goland会自动下载。 5.新建工程时,要指定代理。 6.调整自己喜欢的
2021-11-05T05:06:00Z
2021-11-05T05:06:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】1.go 安装 2.Goland安装 3.GoLand激活 使用防火墙关闭Goland的进出站。 搜索激活码填入。 4.开启file watch,go fmt在ctrl+S保存后自动格式化代码,goimports在代码里引入包goland会自动下载。 5.新建工程时,要指定代理。 6.调整自己喜欢的 <a href="https://www.cnblogs.com/JinweiChang/p/15512764.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15511813.html
test - JinweiChang
1.go 安装。 2.Goland安装 3.GoLand激活 使用防火墙关闭Goland的进出站。 搜索激活码填入。
2021-11-05T01:53:00Z
2021-11-05T01:53:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】1.go 安装。 2.Goland安装 3.GoLand激活 使用防火墙关闭Goland的进出站。 搜索激活码填入。 <a href="https://www.cnblogs.com/JinweiChang/p/15511813.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15192687.html
物理机安装Centos7 - JinweiChang
物理机安装Centos7 1.设定bios,U盘启动, 2.进入 Install Centos 7界面,按e或者Tab进入编辑状态, 将inst.stage2=hd:xx改为inst.stage2=hd:linux dd 3.然后按Ctrl+x或者Enter 报警一会后,会进入到shell, 有的时
2021-08-27T02:19:00Z
2021-08-27T02:19:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】物理机安装Centos7 1.设定bios,U盘启动, 2.进入 Install Centos 7界面,按e或者Tab进入编辑状态, 将inst.stage2=hd:xx改为inst.stage2=hd:linux dd 3.然后按Ctrl+x或者Enter 报警一会后,会进入到shell, 有的时 <a href="https://www.cnblogs.com/JinweiChang/p/15192687.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15155123.html
SQLSERVER-Aways Encrption - JinweiChang
Aways Encrption 数据库的用户可以自己创建一个证书,此证书会生成在用户主机里,只有导入了此证书的主机才能加密解密加密数据, 包括在DB服务器上DBA没有证书也不能加解密, 加密过程:应用(c#应用或SSMS)先加密然后才发到数据库,解密应该也是到了应用才解密。 加密列有很多限制,不能条
2021-08-18T00:38:00Z
2021-08-18T00:38:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】Aways Encrption 数据库的用户可以自己创建一个证书,此证书会生成在用户主机里,只有导入了此证书的主机才能加密解密加密数据, 包括在DB服务器上DBA没有证书也不能加解密, 加密过程:应用(c#应用或SSMS)先加密然后才发到数据库,解密应该也是到了应用才解密。 加密列有很多限制,不能条 <a href="https://www.cnblogs.com/JinweiChang/p/15155123.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15128473.html
winserver-server manager cannot run because of an error in a user setting file - JinweiChang
winserver2019上打开server manager时报错server manager cannot run because of an error in a user setting file 用其他服务器上的替换 C:\Windows\Microsoft.NET\Framework64\
2021-08-11T07:36:00Z
2021-08-11T07:36:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】winserver2019上打开server manager时报错server manager cannot run because of an error in a user setting file 用其他服务器上的替换 C:\Windows\Microsoft.NET\Framework64\ <a href="https://www.cnblogs.com/JinweiChang/p/15128473.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15098373.html
powershell-重命名文件并移动 - JinweiChang
重命名文件并移动 例如文件jinwei.txt先修改为jinwei+随机码.txt(例如:jinwei23.txt) 然后Move到to路径 $from="\\10.XX.XX\from\*.*" $to="C:\to\" $a =get-random -maximum 100 $a =[strin
2021-08-04T04:54:00Z
2021-08-04T04:54:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】重命名文件并移动 例如文件jinwei.txt先修改为jinwei+随机码.txt(例如:jinwei23.txt) 然后Move到to路径 $from="\\10.XX.XX\from\*.*" $to="C:\to\" $a =get-random -maximum 100 $a =[strin <a href="https://www.cnblogs.com/JinweiChang/p/15098373.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15047870.html
SQL SERVERkilled/rollback 会话一直running - JinweiChang
SQL SERVERkilled/rollback 会话一直running 问题描述 A使用linkserver连接B 一些用了Linkserver的SQL莫名其妙的执行很长时间(平时是很快的), 然后手动Kill掉后, KILL 63 会话也一直处于killed/rollback running状
2021-07-23T02:56:00Z
2021-07-23T02:56:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】SQL SERVERkilled/rollback 会话一直running 问题描述 A使用linkserver连接B 一些用了Linkserver的SQL莫名其妙的执行很长时间(平时是很快的), 然后手动Kill掉后, KILL 63 会话也一直处于killed/rollback running状 <a href="https://www.cnblogs.com/JinweiChang/p/15047870.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/15044411.html
Go-Mail - JinweiChang
Go Mail go get gopkg.in/mail.v2 发送函数 package email import ( "crypto/tls" "fmt" gomail "gopkg.in/mail.v2" ) func SendMail() { m := gomail.NewMessage()
2021-07-22T07:32:00Z
2021-07-22T07:32:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】Go Mail go get gopkg.in/mail.v2 发送函数 package email import ( "crypto/tls" "fmt" gomail "gopkg.in/mail.v2" ) func SendMail() { m := gomail.NewMessage() <a href="https://www.cnblogs.com/JinweiChang/p/15044411.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14965609.html
The transaction log for database 'xxxx' is full due to AVAILABILITY_REPLICA error message in SQL Server - JinweiChang
原因: 在主副本上日志达到了最大空间或者磁盘满了。 分析 主副本的日志块要在其他副本上固话和redo后,才能复用。 所以如果 1.传送延迟,由于网络延迟或带宽延迟了发送。 2.重做延迟,堵塞或资源不足导致副本重做缓慢。 导致日志增大且不能备份下去。 log_send_queue_size:副本还未收
2021-07-03T01:25:00Z
2021-07-03T01:25:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】原因: 在主副本上日志达到了最大空间或者磁盘满了。 分析 主副本的日志块要在其他副本上固话和redo后,才能复用。 所以如果 1.传送延迟,由于网络延迟或带宽延迟了发送。 2.重做延迟,堵塞或资源不足导致副本重做缓慢。 导致日志增大且不能备份下去。 log_send_queue_size:副本还未收 <a href="https://www.cnblogs.com/JinweiChang/p/14965609.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14859071.html
Powershell-抓取已安装软件 - JinweiChang
function Get-InstalledSoftwares { # # Read registry key as product entity. # $script:lastname=@(); function ConvertTo-ProductEntity { param([Microsoft
2021-06-07T07:39:00Z
2021-06-07T07:39:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】function Get-InstalledSoftwares { # # Read registry key as product entity. # $script:lastname=@(); function ConvertTo-ProductEntity { param([Microsoft <a href="https://www.cnblogs.com/JinweiChang/p/14859071.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14718742.html
Powershell Session - JinweiChang
服务器上WinRM服务默认是开启的, 查看服务是否开启,服务监听5985 Get-Service winrm* 如果没有开启,使用一下指令开启。 Enable-PSRemoting -Force 在用户端连接服务器, -Credential 可以使用域账号或本地的administrator,其他本地
2021-04-29T09:03:00Z
2021-04-29T09:03:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】服务器上WinRM服务默认是开启的, 查看服务是否开启,服务监听5985 Get-Service winrm* 如果没有开启,使用一下指令开启。 Enable-PSRemoting -Force 在用户端连接服务器, -Credential 可以使用域账号或本地的administrator,其他本地 <a href="https://www.cnblogs.com/JinweiChang/p/14718742.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14699103.html
powershell-批量导出Job - JinweiChang
$CurrentDate = Get-Date $LogFile = "D:\Job\ExportScheduledTasks_$($CurrentDate.ToString("yyyyMMddHHmmss")).log" #导出过程日志的保存路径 Start-Transcript -Path $L
2021-04-25T01:34:00Z
2021-04-25T01:34:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】$CurrentDate = Get-Date $LogFile = "D:\Job\ExportScheduledTasks_$($CurrentDate.ToString("yyyyMMddHHmmss")).log" #导出过程日志的保存路径 Start-Transcript -Path $L <a href="https://www.cnblogs.com/JinweiChang/p/14699103.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14690024.html
Login 'XXX' owns one or more database(s). Change the owner of the database(s) before dropping the login. - JinweiChang
Login 'XXX' owns one or more database(s). Change the owner of the database(s) before dropping the login. 1.Use below commands to check which database
2021-04-22T07:51:00Z
2021-04-22T07:51:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】Login 'XXX' owns one or more database(s). Change the owner of the database(s) before dropping the login. 1.Use below commands to check which database <a href="https://www.cnblogs.com/JinweiChang/p/14690024.html" target="_blank">阅读全文</a>
https://www.cnblogs.com/JinweiChang/p/14510604.html
SQL SERVER-排查连接数 - JinweiChang
出现程序连接SQL SERVER执行完SQL后没有关闭连接,导致连接数过多,以下可以排查连接数过多的程序。 --这个可以查询,同一进程发起多个连接, --根据主机名和PID,找到程序 SELECT hostname,hostprocess,COUNT(1) AS Con_QTY FROM [Mast
2021-03-10T03:36:00Z
2021-03-10T03:36:00Z
JinweiChang
https://www.cnblogs.com/JinweiChang/
【摘要】出现程序连接SQL SERVER执行完SQL后没有关闭连接,导致连接数过多,以下可以排查连接数过多的程序。 --这个可以查询,同一进程发起多个连接, --根据主机名和PID,找到程序 SELECT hostname,hostprocess,COUNT(1) AS Con_QTY FROM [Mast <a href="https://www.cnblogs.com/JinweiChang/p/14510604.html" target="_blank">阅读全文</a>