当前位置:首页 - SQL

数据库不能脱机,或脱机过程中关闭脱机窗口

作者:高景洋 日期:2014-08-01 10:50:14 浏览次数:4437

在数据库管理过程中,经常会用脱机

但有时数据库较大,脱机时间会很长,而在这时候,我们又没有耐心,把脱机窗口关掉了,导致数据库无法正常使用,也无法移动,进退两难,如何解决?


select * from master.sys.sysprocesses where dbid=db_id('数据库名称')

查一下是哪个进程占用着数据库
然后执行 kill 54 ---54为ID
刷新数据库列表,数据库恢复正常
本文永久性链接:
<a href="http://r4.com.cn/art43.aspx">数据库不能脱机,或脱机过程中关闭脱机窗口</a>
当前header:Host: r4.com.cn X-Host1: r4.com.cn X-Host2: r4.com.cn X-Host3: 127.0.0.1:8080 X-Forwarded-For: 52.14.85.76 X-Real-Ip: 52.14.85.76 X-Domain: r4.com.cn X-Request: GET /art43.aspx HTTP/1.1 X-Request-Uri: /art43.aspx Connection: close Accept: */* User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)