{"id":153349,"date":"2024-11-02T06:42:21","date_gmt":"2024-11-01T22:42:21","guid":{"rendered":"https:\/\/server.hk\/cnblog\/153349\/"},"modified":"2024-11-02T06:42:22","modified_gmt":"2024-11-01T22:42:22","slug":"%e5%be%9e%e6%97%a5%e8%aa%8c%e4%b8%ad%e8%bf%bd%e8%b9%a4-sql-server-%e6%95%b8%e6%93%9a%e5%ba%ab%e6%93%8d%e4%bd%9c%ef%bc%8c%e5%84%aa%e5%8c%96%e6%80%a7%e8%83%bd-sql-server-%e6%95%b8%e6%93%9a%e5%ba%ab","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/153349\/","title":{"rendered":"\u5f9e\u65e5\u8a8c\u4e2d\u8ffd\u8e64 SQL Server \u6578\u64da\u5eab\u64cd\u4f5c\uff0c\u512a\u5316\u6027\u80fd (SQL Server \u6578\u64da\u5eab\u8ddf\u8e64)"},"content":{"rendered":"<h1 id=\"%e5%be%9e%e6%97%a5%e8%aa%8c%e4%b8%ad%e8%bf%bd%e8%b9%a4-sql-server-%e6%95%b8%e6%93%9a%e5%ba%ab%e6%93%8d%e4%bd%9c%ef%bc%8c%e5%84%aa%e5%8c%96%e6%80%a7%e8%83%bd-GphUtHteqw\">\u5f9e\u65e5\u8a8c\u4e2d\u8ffd\u8e64 SQL Server \u6578\u64da\u5eab\u64cd\u4f5c\uff0c\u512a\u5316\u6027\u80fd<\/h1>\n<p>\u5728\u7576\u4eca\u6578\u64da\u9a45\u52d5\u7684\u4e16\u754c\u4e2d\uff0c\u6578\u64da\u5eab\u7684\u6027\u80fd\u5c0d\u65bc\u4f01\u696d\u7684\u6210\u529f\u81f3\u95dc\u91cd\u8981\u3002SQL Server \u4f5c\u70ba\u4e00\u500b\u6d41\u884c\u7684\u95dc\u4fc2\u578b\u6578\u64da\u5eab\u7ba1\u7406\u7cfb\u7d71\uff0c\u63d0\u4f9b\u4e86\u591a\u7a2e\u5de5\u5177\u548c\u529f\u80fd\u4f86\u5e6b\u52a9\u7ba1\u7406\u548c\u512a\u5316\u6578\u64da\u5eab\u6027\u80fd\u3002\u5176\u4e2d\uff0c\u65e5\u8a8c\u8ffd\u8e64\u662f\u4e00\u500b\u91cd\u8981\u7684\u529f\u80fd\uff0c\u53ef\u4ee5\u5e6b\u52a9\u7ba1\u7406\u54e1\u76e3\u63a7\u6578\u64da\u5eab\u64cd\u4f5c\uff0c\u8b58\u5225\u6027\u80fd\u74f6\u9838\uff0c\u4e26\u9032\u884c\u76f8\u61c9\u7684\u512a\u5316\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-sql-server-%e6%97%a5%e8%aa%8c%e8%bf%bd%e8%b9%a4%ef%bc%9f-GphUtHteqw\">\u4ec0\u9ebc\u662f SQL Server \u65e5\u8a8c\u8ffd\u8e64\uff1f<\/h2>\n<p>SQL Server \u65e5\u8a8c\u8ffd\u8e64\u662f\u4e00\u7a2e\u8a18\u9304\u6578\u64da\u5eab\u64cd\u4f5c\u7684\u6280\u8853\uff0c\u901a\u904e\u6355\u6349\u7279\u5b9a\u4e8b\u4ef6\u4f86\u5e6b\u52a9\u7ba1\u7406\u54e1\u5206\u6790\u548c\u512a\u5316\u6578\u64da\u5eab\u6027\u80fd\u3002\u9019\u4e9b\u4e8b\u4ef6\u53ef\u4ee5\u5305\u62ec\u67e5\u8a62\u57f7\u884c\u3001\u6578\u64da\u4fee\u6539\u3001\u7528\u6236\u767b\u9304\u7b49\u3002\u65e5\u8a8c\u8ffd\u8e64\u7684\u4e3b\u8981\u76ee\u7684\u662f\u63d0\u4f9b\u4e00\u500b\u8a73\u7d30\u7684\u64cd\u4f5c\u8a18\u9304\uff0c\u4ee5\u4fbf\u65bc\u5f8c\u7e8c\u7684\u5206\u6790\u548c\u6545\u969c\u6392\u9664\u3002<\/p>\n<h2 id=\"%e5%a6%82%e4%bd%95%e5%95%9f%e7%94%a8-sql-server-%e6%97%a5%e8%aa%8c%e8%bf%bd%e8%b9%a4-GphUtHteqw\">\u5982\u4f55\u555f\u7528 SQL Server \u65e5\u8a8c\u8ffd\u8e64<\/h2>\n<p>\u555f\u7528 SQL Server \u65e5\u8a8c\u8ffd\u8e64\u76f8\u5c0d\u7c21\u55ae\uff0c\u53ef\u4ee5\u901a\u904e SQL Server Management Studio (SSMS) \u4f86\u5b8c\u6210\u3002\u4ee5\u4e0b\u662f\u555f\u7528\u65e5\u8a8c\u8ffd\u8e64\u7684\u57fa\u672c\u6b65\u9a5f\uff1a<\/p>\n<ol>\n<li>\u6253\u958b SQL Server Management Studio\uff0c\u4e26\u9023\u63a5\u5230\u76ee\u6a19\u6578\u64da\u5eab\u3002<\/li>\n<li>\u5728\u5c0d\u8c61\u8cc7\u6e90\u7ba1\u7406\u5668\u4e2d\uff0c\u53f3\u9375\u55ae\u64ca\u6578\u64da\u5eab\uff0c\u9078\u64c7\u201c\u5c6c\u6027\u201d\u3002<\/li>\n<li>\u5728\u5c6c\u6027\u7a97\u53e3\u4e2d\uff0c\u9078\u64c7\u201c\u9078\u9805\u201d\u9078\u9805\u5361\uff0c\u7136\u5f8c\u627e\u5230\u201c\u65e5\u8a8c\u8ffd\u8e64\u201d\u90e8\u5206\u3002<\/li>\n<li>\u555f\u7528\u65e5\u8a8c\u8ffd\u8e64\uff0c\u4e26\u9078\u64c7\u8981\u6355\u6349\u7684\u4e8b\u4ef6\u985e\u578b\u3002<\/li>\n<li>\u4fdd\u5b58\u66f4\u6539\u4e26\u95dc\u9589\u5c6c\u6027\u7a97\u53e3\u3002<\/li>\n<\/ol>\n<h2 id=\"%e6%97%a5%e8%aa%8c%e8%bf%bd%e8%b9%a4%e7%9a%84%e5%b8%b8%e8%a6%8b%e4%ba%8b%e4%bb%b6%e9%a1%9e%e5%9e%8b-GphUtHteqw\">\u65e5\u8a8c\u8ffd\u8e64\u7684\u5e38\u898b\u4e8b\u4ef6\u985e\u578b<\/h2>\n<p>\u5728 SQL Server \u4e2d\uff0c\u53ef\u4ee5\u8ffd\u8e64\u591a\u7a2e\u4e8b\u4ef6\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u898b\u7684\u4e8b\u4ef6\u985e\u578b\uff1a<\/p>\n<ul>\n<li><strong>SQL:BatchCompleted<\/strong> &#8211; \u7576\u4e00\u500b\u6279\u8655\u7406\u5b8c\u6210\u6642\u89f8\u767c\u3002<\/li>\n<li><strong>SQL:BatchStarting<\/strong> &#8211; \u7576\u4e00\u500b\u6279\u8655\u7406\u958b\u59cb\u6642\u89f8\u767c\u3002<\/li>\n<li><strong>RPC:Completed<\/strong> &#8211; \u7576\u4e00\u500b\u9060\u7a0b\u904e\u7a0b\u8abf\u7528\u5b8c\u6210\u6642\u89f8\u767c\u3002<\/li>\n<li><strong>Login<\/strong> &#8211; \u7576\u7528\u6236\u767b\u9304\u6642\u89f8\u767c\u3002<\/li>\n<li><strong>Logout<\/strong> &#8211; \u7576\u7528\u6236\u767b\u51fa\u6642\u89f8\u767c\u3002<\/li>\n<\/ul>\n<h2 id=\"%e5%88%86%e6%9e%90%e6%97%a5%e8%aa%8c%e6%95%b8%e6%93%9a%e4%bb%a5%e5%84%aa%e5%8c%96%e6%80%a7%e8%83%bd-GphUtHteqw\">\u5206\u6790\u65e5\u8a8c\u6578\u64da\u4ee5\u512a\u5316\u6027\u80fd<\/h2>\n<p>\u555f\u7528\u65e5\u8a8c\u8ffd\u8e64\u5f8c\uff0c\u7ba1\u7406\u54e1\u53ef\u4ee5\u4f7f\u7528 SQL Server Profiler \u6216\u5176\u4ed6\u5206\u6790\u5de5\u5177\u4f86\u67e5\u770b\u548c\u5206\u6790\u6355\u6349\u5230\u7684\u4e8b\u4ef6\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5206\u6790\u65e5\u8a8c\u6578\u64da\u7684\u6280\u5de7\uff1a<\/p>\n<ul>\n<li><strong>\u8b58\u5225\u6162\u67e5\u8a62\uff1a<\/strong>\u901a\u904e\u67e5\u770b\u57f7\u884c\u6642\u9593\u8f03\u9577\u7684\u67e5\u8a62\uff0c\u7ba1\u7406\u54e1\u53ef\u4ee5\u8b58\u5225\u51fa\u6027\u80fd\u74f6\u9838\uff0c\u4e26\u9032\u884c\u512a\u5316\u3002<\/li>\n<li><strong>\u76e3\u63a7\u7528\u6236\u6d3b\u52d5\uff1a<\/strong>\u5206\u6790\u7528\u6236\u767b\u9304\u548c\u767b\u51fa\u7684\u983b\u7387\uff0c\u53ef\u4ee5\u5e6b\u52a9\u7ba1\u7406\u54e1\u4e86\u89e3\u7528\u6236\u884c\u70ba\uff0c\u4e26\u8abf\u6574\u8cc7\u6e90\u5206\u914d\u3002<\/li>\n<li><strong>\u6aa2\u67e5\u6b7b\u9396\uff1a<\/strong>\u901a\u904e\u65e5\u8a8c\u8ffd\u8e64\uff0c\u53ef\u4ee5\u6aa2\u67e5\u662f\u5426\u5b58\u5728\u6b7b\u9396\u60c5\u6cc1\uff0c\u4e26\u63a1\u53d6\u63aa\u65bd\u907f\u514d\u3002<\/li>\n<\/ul>\n<h2 id=\"%e6%9c%80%e4%bd%b3%e5%af%a6%e8%b8%90-GphUtHteqw\">\u6700\u4f73\u5be6\u8e10<\/h2>\n<p>\u5728\u4f7f\u7528 SQL Server \u65e5\u8a8c\u8ffd\u8e64\u6642\uff0c\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5be6\u8e10\u53ef\u4ee5\u5e6b\u52a9\u63d0\u9ad8\u6027\u80fd\u548c\u6548\u7387\uff1a<\/p>\n<ul>\n<li><strong>\u5b9a\u671f\u6e05\u7406\u65e5\u8a8c\uff1a<\/strong>\u5b9a\u671f\u6e05\u7406\u4e0d\u518d\u9700\u8981\u7684\u65e5\u8a8c\u6578\u64da\uff0c\u4ee5\u907f\u514d\u4f54\u7528\u904e\u591a\u7684\u5b58\u5132\u7a7a\u9593\u3002<\/li>\n<li><strong>\u9078\u64c7\u6027\u8ffd\u8e64\uff1a<\/strong>\u50c5\u8ffd\u8e64\u5fc5\u8981\u7684\u4e8b\u4ef6\uff0c\u4ee5\u6e1b\u5c11\u5c0d\u7cfb\u7d71\u6027\u80fd\u7684\u5f71\u97ff\u3002<\/li>\n<li><strong>\u4f7f\u7528\u7be9\u9078\u5668\uff1a<\/strong>\u5728\u8ffd\u8e64\u6642\u4f7f\u7528\u7be9\u9078\u5668\uff0c\u4ee5\u4fbf\u66f4\u7cbe\u78ba\u5730\u6355\u6349\u6240\u9700\u7684\u6578\u64da\u3002<\/li>\n<\/ul>\n<h2 id=\"%e7%b5%90%e8%ab%96-GphUtHteqw\">\u7d50\u8ad6<\/h2>\n<p>\u901a\u904e\u6709\u6548\u5730\u4f7f\u7528 SQL Server \u65e5\u8a8c\u8ffd\u8e64\uff0c\u6578\u64da\u5eab\u7ba1\u7406\u54e1\u53ef\u4ee5\u7372\u5f97\u6709\u95dc\u6578\u64da\u5eab\u64cd\u4f5c\u7684\u6df1\u5165\u898b\u89e3\uff0c\u5f9e\u800c\u8b58\u5225\u6027\u80fd\u74f6\u9838\u4e26\u9032\u884c\u512a\u5316\u3002\u9019\u4e0d\u50c5\u6709\u52a9\u65bc\u63d0\u9ad8\u6578\u64da\u5eab\u7684\u6574\u9ad4\u6027\u80fd\uff0c\u9084\u80fd\u78ba\u4fdd\u7cfb\u7d71\u7684\u7a69\u5b9a\u6027\u548c\u53ef\u9760\u6027\u3002\u5c0d\u65bc\u9700\u8981\u9ad8\u6548\u80fd\u7684\u61c9\u7528\u7a0b\u5e8f\uff0c\u9078\u64c7\u5408\u9069\u7684 <a href=\"https:\/\/server.hk\">\u9999\u6e2fVPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4e5f\u662f\u81f3\u95dc\u91cd\u8981\u7684\uff0c\u9019\u6a23\u53ef\u4ee5\u78ba\u4fdd\u6578\u64da\u5eab\u904b\u884c\u5728\u6700\u4f73\u74b0\u5883\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b78\u7fd2\u5982\u4f55\u5f9e\u65e5\u8a8c\u4e2d\u8ffd\u8e64 SQL Server \u6578\u64da\u5eab\u64cd\u4f5c\uff0c\u63d0\u5347\u6027\u80fd\u4e26\u512a\u5316\u6578\u64da\u7ba1\u7406\u6548\u7387\u3002<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-153349","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/153349","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=153349"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/153349\/revisions"}],"predecessor-version":[{"id":153350,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/153349\/revisions\/153350"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=153349"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=153349"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=153349"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}