{"id":2340,"date":"2013-10-02T18:05:17","date_gmt":"2013-10-02T10:05:17","guid":{"rendered":"http:\/\/jason695.why3s.tw\/wordpress\/?p=2340"},"modified":"2013-10-02T18:06:54","modified_gmt":"2013-10-02T10:06:54","slug":"sql-server-2008-%e4%bb%8b%e9%9d%a2%e5%8d%80%e7%b5%84%e6%85%8bsurface-area-configuration%ef%bc%8csac%ef%bc%9a%e5%95%9f%e7%94%a8-xp_cmdshell","status":"publish","type":"post","link":"https:\/\/jason695.why3s.tw\/wordpress\/2013\/10\/02\/sql-server-2008-%e4%bb%8b%e9%9d%a2%e5%8d%80%e7%b5%84%e6%85%8bsurface-area-configuration%ef%bc%8csac%ef%bc%9a%e5%95%9f%e7%94%a8-xp_cmdshell\/","title":{"rendered":"SQL Server 2008 \u4ecb\u9762\u5340\u7d44\u614b(Surface Area Configuration\uff0cSAC)\uff1a\u555f\u7528 xp_cmdshell"},"content":{"rendered":"<p><a href=\"http:\/\/sharedderrick.blogspot.tw\/2009\/04\/sql-server-2008-surface-area.html\">http:\/\/sharedderrick.blogspot.tw\/2009\/04\/sql-server-2008-surface-area.html<\/a><\/p>\n<p>\u70ba\u4e86\u5b89\u5168\u8d77\u898b\uff0c\u9810\u8a2d\u5728\u300c\u4ecb\u9762\u5340\u7d44\u614b\u300d\u5167\u7684\u529f\u80fd\uff0c\u90fd\u5df2\u7d93\u505c\u7528\u3002<\/p>\n<hr \/>\n<p>xp_cmdshell (Transact-SQL)<br \/>\n\u7e41\u884d Windows \u547d\u4ee4 Shell \u4e26\u50b3\u5165\u5b57\u4e32\u4e2d\u4ee5\u4f9b\u57f7\u884c\u3002\u4efb\u4f55\u8f38\u51fa\u90fd\u6703\u7576\u4f5c\u6587\u5b57\u8cc7\u6599\u5217\u4f86\u50b3\u56de\u3002<br \/>\nxp_cmdshell \u7e41\u884d\u7684 Windows \u8655\u7406\u5e8f\u64c1\u6709\u8207 SQL Server \u670d\u52d9\u5e33\u6236\u76f8\u540c\u7684\u5b89\u5168\u6027\u6b0a\u9650\u3002<br \/>\nxp_cmdshell \u6703\u540c\u6b65\u64cd\u4f5c\u3002\u5b8c\u6210 command-shell \u547d\u4ee4\u6642\uff0c\u624d\u6703\u5c07\u63a7\u5236\u6b0a\u50b3\u56de\u547c\u53eb\u8005\u3002<\/p>\n<p>\u82e5\u4f60\u78ba\u8a8d\u9700\u8981\u555f\u7528\u6216\u662f\u505c\u7528\u4ecb\u9762\u5340\u7d44\u614b\u4e0a\u7684\u529f\u80fd\uff0c\u8acb\u53c3\u8003\u4ee5\u4e0b\u7684\u6b65\u9a5f\uff1a<br \/>\n\u4f7f\u7528 SQL Server Management Studio \u4e2d\u7684\u300c<strong>Facet<\/strong>\u300d\u4f86\u8a2d\u5b9a\u555f\u7528\u548c\u505c\u7528 SQL Server \u529f\u80fd\u3002<br \/>\n1. \u4f7f\u7528 SQL Server Management Studio\uff0c\u9023\u63a5\u5230\u76ee\u6a19\u7684 SQL Server\u3002<br \/>\n2. \u5728 [\u7269\u4ef6\u7e3d\u7ba1] \u4e2d\uff0c\u9ede\u9078\u76ee\u6a19\u4f3a\u670d\u5668\uff0c\u6ed1\u9f20\u53f3\u9375\uff0c\u9078\u64c7\u300c<strong>Facet<\/strong>\u300d\u3002 \u8acb\u53c3\u8003\u4e0b\u5716\u6240\u793a\uff1a<br \/>\n<a href=\"https:\/\/i0.wp.com\/lh6.ggpht.com\/_YF2-PvwqBh4\/Ses2v2TXIoI\/AAAAAAAAB4k\/G4c9hBzyY20\/s1600-h\/Image.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" title=\"\u9078\u53d6\u300cFacet\u300d01\" alt=\"\u9078\u53d6\u300cFacet\u300d01\" src=\"https:\/\/i0.wp.com\/lh6.ggpht.com\/_YF2-PvwqBh4\/Ses2wcRBaNI\/AAAAAAAAB4o\/AGCiUJ9aBzA\/Image.png?resize=376%2C494\" width=\"376\" height=\"494\" border=\"0\" \/><\/a><br \/>\n3. \u5728\u300c\u6aa2\u8996 Facet\u300d\u8996\u7a97\uff0c\u5728\u53f3\u908a\u7684\u300cFacet\u300d\u5340\u57df\uff0c\u9078\u64c7\u300c<strong>\u4ecb\u9762\u5340\u7d44\u614b<\/strong>\u300d\u3002<br \/>\n4. \u5728\u53f3\u4e0b\u89d2\u7684\u300cFacet\u5c6c\u6027\u300d\u5340\u57df\uff0c\u9078\u64c7\u6240\u9700\u8981\u555f\u7528\u6216\u662f\u505c\u7528\u7684\u529f\u80fd\u3002<br \/>\n\u8acb\u53c3\u8003\u4e0b\u5716\u6240\u793a\uff1a<br \/>\n<a href=\"https:\/\/i0.wp.com\/lh6.ggpht.com\/_YF2-PvwqBh4\/SerJdk_tSKI\/AAAAAAAAB4c\/e6VYTlPw_2c\/s1600-h\/02_-%C2%9A%C3%8Bb%40DK%5B3%5D.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" title=\"02_\u8a2d\u5b9a\u4ecb\u9762\u5340\u7d44\u614b\" alt=\"02_\u8a2d\u5b9a\u4ecb\u9762\u5340\u7d44\u614b\" src=\"https:\/\/i0.wp.com\/lh3.ggpht.com\/_YF2-PvwqBh4\/SerJeRH3BcI\/AAAAAAAAB4g\/qaIAA13sAlc\/02_-%C2%9A%C3%8Bb%40DK_thumb%5B1%5D.png?resize=640%2C508\" width=\"640\" height=\"508\" border=\"0\" \/><\/a><\/p>\n<p>\u4ee5\u4e0b\u70ba\u4f7f\u7528 sp_configure \u4f86\u555f\u7528 xp_cmdshell\uff1a<\/p>\n<div>\n<div id=\"highlighter_614765\">\n<pre class=\"lang:tsql decode:true \">--01 \u67e5\u8a62\u662f\u5426\u5df2\u7d93\u555f\u7528 xp_cmdshell\r\nSELECT name N'\u7d44\u614b\u9078\u9805\u7684\u540d\u7a31', value N'\u91dd\u5c0d\u9019\u500b\u9078\u9805\u6240\u8a2d\u5b9a\u7684\u503c', value_in_use N'\u9019\u500b\u9078\u9805\u76ee\u524d\u6709\u6548\u7684\u57f7\u884c\u503c',\r\ndescription N'\u7d44\u614b\u9078\u9805\u7684\u63cf\u8ff0'\r\nFROM sys.configurations\r\nWHERE name='xp_cmdshell'\r\n\r\n--02 \u8a2d\u5b9a\u555f\u7528 xp_cmdshell\r\nUSE master;\r\nGO\r\nEXEC sp_configure 'show advanced option', '1';\r\nGO\r\nRECONFIGURE\r\nGO\r\n--\r\nEXEC sp_configure 'xp_cmdshell', '1'\r\nRECONFIGURE WITH OVERRIDE\r\nGO\r\n\r\n--03 \u518d\u5ea6\u67e5\u8a62\u662f\u5426\u5df2\u7d93\u555f\u7528 xp_cmdshell\r\nSELECT name N'\u7d44\u614b\u9078\u9805\u7684\u540d\u7a31', value N'\u91dd\u5c0d\u9019\u500b\u9078\u9805\u6240\u8a2d\u5b9a\u7684\u503c', value_in_use N'\u9019\u500b\u9078\u9805\u76ee\u524d\u6709\u6548\u7684\u57f7\u884c\u503c',\r\ndescription N'\u7d44\u614b\u9078\u9805\u7684\u63cf\u8ff0'\r\nFROM sys.configurations\r\nWHERE name='xp_cmdshell'<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>http:\/\/sharedderrick.blogspot.tw\/2009\/04\/sql-server-200 &hellip; <a href=\"https:\/\/jason695.why3s.tw\/wordpress\/2013\/10\/02\/sql-server-2008-%e4%bb%8b%e9%9d%a2%e5%8d%80%e7%b5%84%e6%85%8bsurface-area-configuration%ef%bc%8csac%ef%bc%9a%e5%95%9f%e7%94%a8-xp_cmdshell\/\" class=\"more-link\">\u95b1\u8b80\u5168\u6587 <span class=\"screen-reader-text\">SQL Server 2008 \u4ecb\u9762\u5340\u7d44\u614b(Surface Area Configuration\uff0cSAC)\uff1a\u555f\u7528 xp_cmdshell<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[47],"tags":[],"class_list":["post-2340","post","type-post","status-publish","format-standard","hentry","category-sql-server","no-featured-image"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/2340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/comments?post=2340"}],"version-history":[{"count":0,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/posts\/2340\/revisions"}],"wp:attachment":[{"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/media?parent=2340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/categories?post=2340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jason695.why3s.tw\/wordpress\/wp-json\/wp\/v2\/tags?post=2340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}