没问题呀,不过你还是试试先关闭再
set rs=nothing,
因为你没有关闭Conn,这个连接一直不会关闭

解决方案 »

  1.   

    这是进程信息进程 ID 环境 ID 用户 数据库 CPU 状态 打开事务 命令 应用程序 等待时间 等待类型 上次批处理 阻塞者 正在阻塞
    74 0 bnfbbs bnfbbs 974936 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:12 0 0
    69 0 bnfbbs bnfbbs 829232 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:12 0 0
    80 0 bnfmovie bnfs 788676 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:50:10 0 0
    59 0 sa master 74060 runnable                       2 SELECT INTO      MS SQLEM                                                                        0 not waiting                      2005-12-31 9:51:09 0 0
    52 0 bnfbbs bnfbbs 5515104 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:01 0 0
    65 0 bnfmovie bnfs 446290 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:09 0 0
    66 0 bnfbbs bnfbbs 406840 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:50:14 0 0
    75 0 bnfbbs bnfbbs 402978 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:50:23 0 0
    56 0 bnfbbs bnfbbs 3957564 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:07 0 0
    76 0 bnfmovie bnfs 346279 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:12 0 0
    54 0 jchat Jchat 3297 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:10 0 0
    51 0 bnfbbs bnfbbs 3281559 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:06 0 0
    81 0 bnfmovie bnfs 300896 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:50:54 0 0
    57 0 jchat Jchat 1938 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:50:16 0 0
    60 0 bnfbbs bnfbbs 1899324 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:07 0 0
    78 0 bnfbbs bnfbbs 1884284 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:11 0 0
    68 0 bnfmovie bnfs 178833 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:04 0 0
    70 0 bnfbbs bnfbbs 1564118 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:10 0 0
    58 0 bnfmovie bnfs 1444924 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      2005-12-31 9:51:11 0 0
    1 0 system no database context 0 background                     0 LAZY WRITER                                                                                      110 not waiting                      1900-1-1 0:00:00 0 0
    2 0 system no database context 0 sleeping                       0 LOG WRITER                                                                                       1453 not waiting                      1900-1-1 0:00:00 0 0
    3 0 system master 0 background                     0 CHECKPOINT                                                                                       0 not waiting                      1900-1-1 0:00:00 0 0
    4 0 system no database context 0 background                     0 LOCK MONITOR                                                                                     4985 not waiting                      1900-1-1 0:00:00 0 0
    5 0 system master 0 background                     0 TASK MANAGER                                                                                     0 not waiting                      1900-1-1 0:00:00 0 0
    53 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    55 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    6 0 system master 0 background                     0 TASK MANAGER                                                                                     62067938 not waiting                      1900-1-1 0:00:00 0 0
    61 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    7 0 sa no database context 0 sleeping                       0 CHECKPOINT SLEEP                                                                                 2064953 not waiting                      1900-1-1 0:00:00 0 0
    71 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    72 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    77 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    79 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
    82 0 bnfbbs dv_plus_tools 0 sleeping                       0 AWAITING COMMAND Internet Information Services                                                   0 not waiting                      1900-1-1 0:00:00 0 0
      

  2.   

    1 请问怎么查看锁定的进程 
      sp_lock mode为X的进程
    2 为什么选择取消进程后一直没有反应 
      一般可以这样取消进程 kill @sp_id 这时候没有反应的原因很多也比较复杂
    3 是什么原因导致了进程的锁定 
      两个进程之间的死锁
      

  3.   

    1.查看哪些进程是否死锁了,可以引用网上写的查看死进程的存储过程,这个论坛中就有,您可以搜索一下。2.语法为 kill 56 (56为 @sp_id)3.原因有多种:目前主要有
      A.数据量大,cpu处理不过来,造成数据堵塞,形成死锁。
      B.Update,Insert 量大,造成死锁。
      

  4.   

    纠正楼上的!
    2 死锁进程并不一定是56吧!!
    3 a 数据量大跟CPU关系大吗?不存在因为CPU处理不够造成死锁吧
      b update,insert量大就死锁啊 狂晕!!!