两种attach to process的方法

简介:

背景:

今天在做keepalive的实验,设法模拟keepalive不成功的场景,从而达到“ the local TCP will keep sending “Keep Alive” packet in an interval of KeepAliveInterval for TcpMaxDataRetransmissions times. ”的目的。但是通过:

  1. stop sqlserver服务,tcp\ip能够检测到服务断开,因此在netmon中可以看到最后一条信息是服务器端发给客户端的的keepalive,scale factor=0。
  2. pause sqlserver服务,keepalive继续进行,此时使用sqlcmd连接sql server 实例会提示数据库出去paused状态。

这两种方法都不能实现上面的场景。后来经过同事提示说试一试suspend sqlservr.exe这个进程试试看,看看还能不能keepalive。从而就有了本文的主题。

要达到suspend 进程可以通过attach to process的方法,主要有两种方式:

  1. 使用visual studio->debug->attach to process
  2. 使用windbg->file->attach to a process...

可惜即使我attach process了,keepalive孩子,但是无法使用sqlcmd连接数据库实例,不过和pause服务不同的是,这里会提示连接超时。


本文转自xwdreamer博客园博客,原文链接:http://www.cnblogs.com/xwdreamer/archive/2012/08/03/2622198.html,如需转载请自行联系原作者

目录
相关文章
|
10月前
|
安全 Linux Docker
/root/ob/run/observer.pid: Operation not permitted
/root/ob/run/observer.pid: Operation not permitted
46 1
|
19天前
|
机器学习/深度学习 TensorFlow 算法框架/工具
Gaussian Process
【6月更文挑战第14天】
18 4
|
11月前
|
Unix Java Linux
Runtime.exec方法之获取process id
Runtime.exec方法之获取process id
168 0
|
Shell
奥比中光ROS启动节点运行异常退出:[camera/driver-2] process has finished cleanly
奥比中光ROS启动节点运行异常退出:[camera/driver-2] process has finished cleanly
388 0
奥比中光ROS启动节点运行异常退出:[camera/driver-2] process has finished cleanly
|
监控 安全 网络协议
[知识小节]Process Monitor介绍(上)
[知识小节]Process Monitor介绍
1030 0
[知识小节]Process Monitor介绍(上)
|
存储 监控 安全
[知识小节]Process Monitor介绍(下)
[知识小节]Process Monitor介绍
971 0
[知识小节]Process Monitor介绍(下)
|
关系型数据库 Java MySQL