{"id":104,"date":"2010-06-16T08:00:00","date_gmt":"2010-06-16T00:00:00","guid":{"rendered":"http:\/\/31.0.2.219:81\/?p=104"},"modified":"2014-03-11T14:03:44","modified_gmt":"2014-03-11T06:03:44","slug":"%e6%b8%85%e9%99%a4%e6%9f%90%e4%b8%aa%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e6%89%80%e6%9c%89%e6%95%b0%e6%8d%ae%e5%ba%93%e8%bf%9e%e6%8e%a5%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/www.huike007.cn\/?p=104","title":{"rendered":"\u6e05\u9664\u67d0\u4e2a\u6570\u636e\u5e93\u7684\u6240\u6709\u6570\u636e\u5e93\u8fde\u63a5\u7684\u5b58\u50a8\u8fc7\u7a0b"},"content":{"rendered":"<p>\u5728\u6211\u4eec\u5229\u7528\u4ee3\u7801\u8fd8\u539f\u6216\u8005\u5220\u9664\u6570\u636e\u5e93\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u78b0\u5230\u56e0\u4e3a\u8fd8\u5b58\u5728\u6570\u636e\u5e93\u8fde\u63a5\u800c\u62d2\u7edd\u64cd\u4f5c\u7684\u60c5\u51b5\uff0c\u6211\u4e3a\u6b64\u7279\u610f\u5199\u4e86\u4e00\u4e2a\u5b58\u50a8\u8fc7\u7a0b\u7528\u6765\u6e05\u9664\u67d0\u4e2a\u6570\u636e\u5e93\u7684\u6240\u6709\u6570\u636e\u5e93\u94fe\u63a5\u3002<br \/>\n\u4ee3\u7801\u5982\u4e0b\uff1a<br \/>\nCr&#101;ate PROC L_spClearDbConnections<br \/>\n    @DbName    VARCHAR(30)<br \/>\nAS<br \/>\n&#8211;\u6e05\u9664\u67d0\u4e2a\u6570\u636e\u5e93\u7684\u6240\u6709\u6570\u636e\u5e93\u8fde\u63a5<br \/>\n&#8211;RickyLin 2007-11-1<br \/>\nDECLARE @SPID    INT<br \/>\nDECLARE @SqlForClear    NVARCHAR(100)<br \/>\nDECLARE curID CURSOR FORWARD_ONLY READ_ONLY FOR (<br \/>\n    Sel&#101;ct SPID<br \/>\n    FROM Master.dbo.SysProcesses<br \/>\n    Wh&#101;re DB_Name(DBID) = @DbName)<br \/>\nOPEN curID<br \/>\nFETCH NEXT FROM curID INTO @SPID<br \/>\nWHILE @@Fetch_Status = 0<br \/>\nBEGIN<br \/>\n    SET @SqlForClear = N&#39;KILL &#39; + Cast(@SPID AS NVARCHAR(10))<br \/>\n    EXEC sp_ExecuteSql @SqlForClear<br \/>\n    IF @@Error = 0<br \/>\n        PRINT &#39;\u5df2\u6e05\u9664\u8fde\u63a5\uff1a&#39; + Cast(@SPID AS VARCHAR(10))<br \/>\n    FETCH NEXT FROM curID INTO @SPID<br \/>\nEND<br \/>\nCLOSE curID<br \/>\nDEALLOCATE curID<br \/>\nPRINT &#39;\u5bf9\u6570\u636e\u5e93\u201c&#39; + @DbName + &#39;\u201d\u7684\u8fde\u63a5\u6e05\u9664\u64cd\u4f5c\u5b8c\u6bd5&#39;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u6211\u4eec\u5229\u7528\u4ee3\u7801\u8fd8\u539f\u6216\u8005\u5220\u9664\u6570\u636e\u5e93\u7684\u65f6\u5019\uff0c\u7ecf\u5e38\u78b0\u5230\u56e0\u4e3a\u8fd8\u5b58\u5728\u6570\u636e\u5e93\u8fde\u63a5\u800c\u62d2\u7edd\u64cd\u4f5c\u7684\u60c5\u51b5\uff0c\u6211\u4e3a\u6b64\u7279\u610f\u5199\u4e86\u4e00\u4e2a\u5b58\u50a8\u8fc7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[178],"tags":[251],"_links":{"self":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/104"}],"collection":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":1,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":250,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/250"}],"wp:attachment":[{"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huike007.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}