{"id":155,"date":"2009-12-21T11:02:54","date_gmt":"2009-12-21T03:02:54","guid":{"rendered":"http:\/\/blog.infinity.idv.tw\/index.php\/2009\/12\/21\/sql-profiler\/"},"modified":"2009-12-21T11:14:33","modified_gmt":"2009-12-21T03:14:33","slug":"sql-profiler","status":"publish","type":"post","link":"http:\/\/blog.infinity.idv.tw\/?p=155","title":{"rendered":"SQL Profiler"},"content":{"rendered":"<p>SQL\u67e5\u8a62\u554f\u984c\u9ede\u6642\u7684\u597d\u5de5\u4f5c\u3002<\/p>\n<p>\u6587\u7ae0\u51fa\u8655\uff1a   <br \/><a href=\"http:\/\/www.dotblogs.com.tw\/jimmyyu\/archive\/2009\/05\/03\/8280.aspx\">http:\/\/www.dotblogs.com.tw\/jimmyyu\/archive\/2009\/05\/03\/8280.aspx<\/a><\/p>\n<p>====================================================================================<\/p>\n<p>\u9019\u500b\u5de5\u5177\u53ef\u4ee5\u5728SQL Server\u7684\u6548\u80fd\u5de5\u5177\u4e2d\u627e\u5230\uff0c<\/p>\n<p><a href=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_10.png\"><img loading=\"lazy\" title=\"image\" height=\"115\" alt=\"image\" src=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_thumb_4.png\" width=\"472\" border=\"0\" \/><\/a><\/p>\n<p>\u9ede\u9078\u5de6\u4e0a\u89d2\u7684\u65b0\u589e\u67e5\u8a62\uff0c<\/p>\n<p><a href=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_12.png\"><img loading=\"lazy\" title=\"image\" height=\"426\" alt=\"image\" src=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_thumb_5.png\" width=\"614\" border=\"0\" \/><\/a><\/p>\n<p>\u8f38\u5165\u5e33\u865f\u5bc6\u78bc\u5f8c\u6703\u51fa\u73fe\u5982\u4e0b\u756b\u9762\uff0c\u4e00\u822c\u7684\u8ffd\u8e64\u6211\u6703\u5148\u5207\u63db\u5230<strong>[\u4e8b\u4ef6\u9078\u53d6\u7bc4\u570d]<\/strong>\u9801\u7c64\uff0c<\/p>\n<p><a href=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_14.png\"><img loading=\"lazy\" title=\"image\" height=\"292\" alt=\"image\" src=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_thumb_6.png\" width=\"487\" border=\"0\" \/><\/a><\/p>\n<p>\u628aevent\u90fd\u53cd\u52fe\u9078\uff0c\u53ea\u7559\u4e0bRPC Completed\u8ddfSQL BatchCompleted\u5169\u500b\uff0c\u53ea\u622a\u53d6\u5be6\u969b\u57f7\u884c\u7684SQL\u6307\u4ee4\u5167\u5bb9\uff0c<\/p>\n<p><a href=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_16.png\"><img loading=\"lazy\" title=\"image\" height=\"292\" alt=\"image\" src=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_thumb_7.png\" width=\"489\" border=\"0\" \/><\/a><\/p>\n<p>\u63a5\u8457\u5728SQL Profiler\u4e2d\u6211\u5011\u5c31\u53ef\u4ee5\u770b\u5230\u6240\u6709\u57f7\u884c\u7684SQL\u6307\u4ee4\u4e86\uff0c\u4e0d\u7ba1\u662f\u6b63\u78ba\u7684SQL\u6216\u8005\u932f\u8aa4\u7684SQL\u90fd\u6703\u88ab\u8a18\u9304\uff0c\u5305\u542b\u57f7\u884c\u7684SQL\u8a9e\u6cd5\u3001\u6240\u82b1\u8cbb\u7684\u6642\u9593\u3001\u767b\u5165\u4ee3\u865f&#8230;.<\/p>\n<p><a href=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_18.png\"><img loading=\"lazy\" title=\"image\" height=\"408\" alt=\"image\" src=\"http:\/\/files.dotblogs.com.tw\/jimmyyu\/0905\/OtherSQLServer_15133\/image_thumb_8.png\" width=\"589\" border=\"0\" \/><\/a><\/p>\n<p>\u7576\u6211\u5011\u6709\u4ee5\u4e0b\u554f\u984c\u6642\uff1a<\/p>\n<p>1.\u61f7\u7591\u6709\u5176\u4ed6\u7cfb\u7d71\u5728\u5b58\u53d6\u6211\u5011\u8cc7\u6599\u5eab\u6642\uff0c\u53ef\u900f\u904e\u9019\u500b\u5de5\u5177\u4f86\u6aa2\u67e5\u662f\u5426\u6709\u7570\u5e38\u7684SQL\u6307\u4ee4\u88ab\u57f7\u884c<\/p>\n<p>2.\u7121\u6cd5\u5224\u65b7\u662f\u7a0b\u5f0f\u554f\u984c\u9084\u662fSQL\u6307\u4ee4\u554f\u984c\u6642\uff0cSQL\u6307\u4ee4\u6709\u57f7\u884c\uff0c\u4f46\u7a0b\u5f0f\u6c92\u6709\u53cd\u61c9\uff0c\u5247\u53ef\u80fd\u662fSQL\u7684\u554f\u984c\uff0c\u4f46\u4e5f\u53ef\u80fd\u662fSQL\u6307\u4ee4\u7684\u554f\u984c\uff0c\u53ef\u900f\u904e\u6b64\u5de5\u5177\u9010\u6b65\u8ffd\u8e64<\/p>\n<p>3.\u7cfb\u7d71\u6548\u80fd\u4e0d\u5f70\u6642\uff0c\u5354\u52a9\u627e\u51fa\u662f\u5426\u67d0\u4e00\u53e5SQL\u5beb\u7684\u4e0d\u597d\u6240\u5c0e\u81f4<\/p>\n<p>4.\u5ba2\u6236\u7aef\u9664\u932f\u6642\uff0c\u6211\u5011\u6c92\u6709\u8fa6\u6cd5\u5728\u5ba2\u6236\u7684Server\u4e0a\u5b89\u88ddVS\u4f86debug\uff0c\u9019\u500b\u5de5\u5177\u53ef\u4ee5\u63d0\u4f9b\u90e8\u5206\u8cc7\u8a0a\u7d66\u6211\u5011<\/p>\n<p>&#8230;..\u5f88\u591a\u6642\u5019\u9019\u500b\u5de5\u5177\u90fd\u53ef\u4ee5\u5e6b\u6211\u5011\u89e3\u6c7a\u5230\u5f88\u591a\u554f\u984c\uff0c\u6240\u4ee5\u7d55\u5c0d\u8981\u6703\u4f7f\u7528\u9019\u500b\u597d\u7528\u7684\u5de5\u5177\u624d\u884c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL\u67e5\u8a62\u554f\u984c\u9ede\u6642\u7684\u597d\u5de5\u4f5c\u3002<\/p>\n<p>\u6587\u7ae0\u51fa\u8655\uff1a   http:\/\/www.dotblogs.com.tw\/jimmyyu\/archive\/2009\/05\/03\/8280.aspx<\/p>\n<p>====================================================================================<\/p>\n<p>\u9019\u500b\u5de5\u5177\u53ef\u4ee5\u5728SQL Server\u7684\u6548\u80fd\u5de5\u5177\u4e2d\u627e\u5230\uff0c<\/p>\n<\/p>\n<p>\u9ede\u9078\u5de6\u4e0a\u89d2\u7684\u65b0\u589e\u67e5\u8a62\uff0c<\/p>\n<\/p>\n<p>\u8f38\u5165\u5e33\u865f\u5bc6\u78bc\u5f8c\u6703\u51fa\u73fe\u5982\u4e0b\u756b\u9762\uff0c\u4e00\u822c\u7684\u8ffd\u8e64\u6211\u6703\u5148\u5207\u63db\u5230[\u4e8b\u4ef6\u9078\u53d6\u7bc4\u570d]\u9801\u7c64\uff0c<\/p>\n<\/p>\n<p>\u628aevent\u90fd\u53cd\u52fe\u9078\uff0c\u53ea\u7559\u4e0bRPC Completed\u8ddfSQL BatchCompleted\u5169\u500b\uff0c\u53ea\u622a\u53d6\u5be6\u969b\u57f7\u884c\u7684SQL\u6307\u4ee4\u5167\u5bb9\uff0c<\/p>\n<\/p>\n<p>\u63a5\u8457\u5728SQL Profiler\u4e2d\u6211\u5011\u5c31\u53ef\u4ee5\u770b\u5230\u6240\u6709\u57f7\u884c\u7684SQL\u6307\u4ee4\u4e86\uff0c\u4e0d\u7ba1\u662f\u6b63\u78ba\u7684SQL\u6216\u8005\u932f\u8aa4\u7684SQL\u90fd\u6703\u88ab\u8a18\u9304\uff0c\u5305\u542b\u57f7\u884c\u7684SQL\u8a9e\u6cd5\u3001\u6240\u82b1\u8cbb\u7684\u6642\u9593\u3001\u767b\u5165\u4ee3\u865f&#8230;.<\/p>\n<\/p>\n<p>\u7576\u6211\u5011\u6709\u4ee5\u4e0b\u554f\u984c\u6642\uff1a<\/p>\n<p>1.\u61f7\u7591\u6709\u5176\u4ed6\u7cfb\u7d71\u5728\u5b58\u53d6\u6211\u5011\u8cc7\u6599\u5eab\u6642\uff0c\u53ef\u900f\u904e\u9019\u500b\u5de5\u5177\u4f86\u6aa2\u67e5\u662f\u5426\u6709\u7570\u5e38\u7684SQL\u6307\u4ee4\u88ab\u57f7\u884c<\/p>\n<p>2.\u7121\u6cd5\u5224\u65b7\u662f\u7a0b\u5f0f\u554f\u984c\u9084\u662fSQL\u6307\u4ee4\u554f\u984c\u6642\uff0cSQL\u6307\u4ee4\u6709\u57f7\u884c\uff0c\u4f46\u7a0b\u5f0f\u6c92\u6709\u53cd\u61c9\uff0c\u5247\u53ef\u80fd\u662fSQL\u7684\u554f\u984c\uff0c\u4f46\u4e5f\u53ef\u80fd\u662fSQL\u6307\u4ee4\u7684\u554f\u984c\uff0c\u53ef\u900f\u904e\u6b64\u5de5\u5177\u9010\u6b65\u8ffd\u8e64<\/p>\n<p>3.\u7cfb\u7d71\u6548\u80fd\u4e0d\u5f70\u6642\uff0c\u5354\u52a9\u627e\u51fa\u662f\u5426\u67d0\u4e00\u53e5SQL\u5beb\u7684\u4e0d\u597d\u6240\u5c0e\u81f4<\/p>\n<p>4.\u5ba2\u6236\u7aef\u9664\u932f\u6642\uff0c\u6211\u5011\u6c92\u6709\u8fa6\u6cd5\u5728\u5ba2\u6236\u7684Server\u4e0a\u5b89\u88ddVS\u4f86debug\uff0c\u9019\u500b\u5de5\u5177\u53ef\u4ee5\u63d0\u4f9b\u90e8\u5206\u8cc7\u8a0a\u7d66\u6211\u5011<\/p>\n<p>&#8230;..\u5f88\u591a\u6642\u5019\u9019\u500b\u5de5\u5177\u90fd\u53ef\u4ee5\u5e6b\u6211\u5011\u89e3\u6c7a\u5230\u5f88\u591a\u554f\u984c\uff0c\u6240\u4ee5\u7d55\u5c0d\u8981\u6703\u4f7f\u7528\u9019\u500b\u597d\u7528\u7684\u5de5\u5177\u624d\u884c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27],"tags":[173,174],"_links":{"self":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/155"}],"collection":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=155"}],"version-history":[{"count":1,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions"}],"predecessor-version":[{"id":156,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/155\/revisions\/156"}],"wp:attachment":[{"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=155"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=155"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.infinity.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=155"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}