{"id":5708,"date":"2024-11-14T13:04:23","date_gmt":"2024-11-14T05:04:23","guid":{"rendered":"https:\/\/fwq.ai\/blog\/5708\/"},"modified":"2024-11-14T13:04:23","modified_gmt":"2024-11-14T05:04:23","slug":"sql%e6%8c%82%e8%b5%b7%e9%87%8d%e5%90%af%e6%80%8e%e4%b9%88%e5%8a%9e","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/5708\/","title":{"rendered":"sql\u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e"},"content":{"rendered":"<blockquote><p>\n  sql \u6302\u8d77\u65f6\u9700\u8981\u7acb\u5373\u91cd\u542f\uff0c\u6b65\u9aa4\u5305\u62ec\uff1a1. \u786e\u5b9a\u6302\u8d77\u539f\u56e0\uff1b2. \u7ec8\u6b62 sql \u8fdb\u7a0b (kill \uff09\uff1b3. \u91cd\u542f sql \u670d\u52a1 (windows\uff1anet stop\/start mssqlserver\uff1blinux\uff1a\/etc\/init.d\/mssql-server restart\uff09\uff1b4. \u6062\u590d\u6570\u636e\uff1b5. \u8fdb\u884c\u6545\u969c\u6392\u9664\u3002\u6b64\u5916\uff0c\u9884\u9632\u63aa\u65bd\u5305\u62ec\u5b9a\u671f\u7ef4\u62a4\u3001\u76d1\u63a7\u6027\u80fd\u3001\u5907\u4efd\u6570\u636e\u548c\u8fdb\u884c\u538b\u529b\u6d4b\u8bd5\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/30\/2024053021091989965.jpg\" class=\"aligncenter\" title=\"sql\u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e\u63d2\u56fe\" alt=\"sql\u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e\u63d2\u56fe\" \/><\/p>\n<p><strong>SQL \u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e<\/strong><\/p>\n<p>\u5f53 SQL \u6302\u8d77\u65f6\uff0c\u9700\u8981\u7acb\u5373\u91c7\u53d6\u63aa\u65bd\u91cd\u542f\uff0c\u4ee5\u907f\u514d\u6216\u7cfb\u7edf\u5d29\u6e83\u3002\u4ee5\u4e0b\u662f\u91cd\u542f SQL \u7684\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u786e\u5b9a\u6302\u8d77\u539f\u56e0<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u786e\u5b9a\u5bfc\u81f4 SQL \u6302\u8d77\u7684\u539f\u56e0\u3002\u8fd9\u53ef\u80fd\u6d89\u53ca\u68c0\u67e5\u670d\u52a1\u5668\u65e5\u5fd7\u3001\u6027\u80fd\u6307\u6807\u6216\u4e0e\u5176\u4ed6\u56e2\u961f\u6210\u5458\u8054\u7cfb\u3002<\/p>\n<p><strong>2. \u7ec8\u6b62 SQL \u8fdb\u7a0b<\/strong><\/p>\n<p>\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7ec8\u6b62 SQL \u8fdb\u7a0b\uff1a<\/p>\n<pre>'kill &lt;PID&gt;'<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5176\u4e2d \u662f SQL \u8fdb\u7a0b\u7684\u8fdb\u7a0b ID\u3002 <\/p>\n<p><strong>3. \u91cd\u542f SQL \u670d\u52a1<\/strong><\/p>\n<p>\u5728 Windows \u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542f SQL \u670d\u52a1\uff1a<\/p>\n<pre>'net stop MSSQLSERVER'\n'net start MSSQLSERVER'<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u5728 Linux \u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542f SQL \u670d\u52a1\uff1a<\/p>\n<pre>'\/etc\/init.d\/mssql-server restart'<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>4. \u6062\u590d\u6570\u636e<\/strong><\/p>\n<p>\u5982\u679c\u6570\u636e\u5728\u6302\u8d77\u671f\u95f4\u4e22\u5931\uff0c\u5219\u9700\u8981\u4ece\u5907\u4efd\u4e2d\u6062\u590d\u3002\u8fd9\u53ef\u80fd\u6d89\u53ca\u4f7f\u7528 SQL Server Management Studio \u6216\u5176\u4ed6\u6570\u636e\u6062\u590d\u5de5\u5177\u3002<\/p>\n<p><strong>5. \u8fdb\u884c\u6545\u969c\u6392\u9664<\/strong><\/p>\n<p>\u4e00\u65e6 SQL \u91cd\u65b0\u542f\u52a8\uff0c\u8fdb\u884c\u6545\u969c\u6392\u9664\u4ee5\u786e\u5b9a\u6302\u8d77\u7684\u539f\u56e0\u3002\u8fd9\u53ef\u80fd\u6d89\u53ca\u68c0\u67e5\u670d\u52a1\u5668\u4e8b\u4ef6\u65e5\u5fd7\u3001\u8c03\u6574\u914d\u7f6e\u8bbe\u7f6e\u6216\u8054\u7cfb Microsoft \u652f\u6301\u3002<\/p>\n<p><strong>\u9884\u9632\u63aa\u65bd<\/strong><\/p>\n<p>\u4e3a\u4e86\u9632\u6b62 SQL \u6302\u8d77\uff0c\u5efa\u8bae\u91c7\u53d6\u4ee5\u4e0b\u9884\u9632\u63aa\u65bd\uff1a<\/p>\n<ul>\n<li>\u5b9a\u671f\u7ef4\u62a4\u548c\u66f4\u65b0 SQL Server\u3002<\/li>\n<li>\u76d1\u63a7\u6027\u80fd\u6307\u6807\u5e76\u53ca\u65f6\u89e3\u51b3\u4efb\u4f55\u95ee\u9898\u3002<\/li>\n<li>\u5907\u4efd\u6570\u636e\uff0c\u4ee5\u9632\u51fa\u73b0\u6570\u636e\u4e22\u5931\u3002<\/li>\n<li>\u5bf9\u670d\u52a1\u5668\u8fdb\u884c\u538b\u529b\u6d4b\u8bd5\uff0c\u4ee5\u786e\u4fdd\u5176\u80fd\u591f\u5904\u7406\u9ad8\u5cf0\u8d1f\u8f7d\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662fsql\u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>sql \u6302\u8d77\u65f6\u9700\u8981\u7acb\u5373\u91cd\u542f\uff0c\u6b65\u9aa4\u5305\u62ec\uff1a1. \u786e\u5b9a\u6302\u8d77\u539f\u56e0\uff1b2. \u7ec8\u6b62 sql \u8fdb\u7a0b (kill \uff09\uff1b3. \u91cd\u542f sql \u670d\u52a1 (windows\uff1anet stop\/start mssqlserver\uff1blinux\uff1a\/etc\/init.d\/mssql-server restart\uff09\uff1b4. \u6062\u590d\u6570\u636e\uff1b5. \u8fdb\u884c\u6545\u969c\u6392\u9664\u3002\u6b64\u5916\uff0c\u9884\u9632\u63aa\u65bd\u5305\u62ec\u5b9a\u671f\u7ef4\u62a4\u3001\u76d1\u63a7\u6027\u80fd\u3001\u5907\u4efd\u6570\u636e\u548c\u8fdb\u884c\u538b\u529b\u6d4b\u8bd5\u3002 SQL \u6302\u8d77\u91cd\u542f\u600e\u4e48\u529e \u5f53 SQL \u6302\u8d77\u65f6\uff0c\u9700\u8981\u7acb\u5373\u91c7\u53d6\u63aa\u65bd\u91cd\u542f\uff0c\u4ee5\u907f\u514d\u6216\u7cfb\u7edf\u5d29\u6e83\u3002\u4ee5\u4e0b\u662f\u91cd\u542f SQL \u7684\u6b65\u9aa4\uff1a 1. \u786e\u5b9a\u6302\u8d77\u539f\u56e0 \u9996\u5148\uff0c\u786e\u5b9a\u5bfc\u81f4 SQL \u6302\u8d77\u7684\u539f\u56e0\u3002\u8fd9\u53ef\u80fd\u6d89\u53ca\u68c0\u67e5\u670d\u52a1\u5668\u65e5\u5fd7\u3001\u6027\u80fd\u6307\u6807\u6216\u4e0e\u5176\u4ed6\u56e2\u961f\u6210\u5458\u8054\u7cfb\u3002 2. \u7ec8\u6b62 SQL \u8fdb\u7a0b \u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u7ec8\u6b62 SQL \u8fdb\u7a0b\uff1a &#8216;kill &lt;PID&gt;&#8217; \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d \u662f SQL \u8fdb\u7a0b\u7684\u8fdb\u7a0b ID\u3002 3. \u91cd\u542f SQL \u670d\u52a1 \u5728 Windows \u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u542f SQL \u670d\u52a1\uff1a &#8216;net stop [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5708","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=5708"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/5708\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=5708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=5708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=5708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}