{"id":2772,"date":"2013-08-12T19:39:44","date_gmt":"2013-08-12T10:39:44","guid":{"rendered":"http:\/\/auctionpro.co.kr\/?p=2772"},"modified":"2015-09-29T10:27:49","modified_gmt":"2015-09-29T01:27:49","slug":"mssql2008%ec%97%90%ec%84%9c-xp_cmdshell-%ed%99%9c%ec%84%b1%ed%99%94-%ec%8b%9c%ed%82%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/www.auctionpro.co.kr\/?p=2772","title":{"rendered":"MSSQL2008\uc5d0\uc11c XP_CMDSHELL \ud65c\uc131\ud654 \uc2dc\ud0a4\uae30"},"content":{"rendered":"<p><code><br \/>\n-- To allow advanced options to be changed.<br \/>\nEXEC sp_configure 'show advanced options', 1<br \/>\nGO<br \/>\n-- To update the currently configured value for advanced options.<br \/>\nRECONFIGURE<br \/>\nGO<br \/>\n-- To enable the feature.<br \/>\nEXEC sp_configure 'xp_cmdshell', 1<br \/>\nGO<br \/>\n-- To update the currently configured value for this feature.<br \/>\nRECONFIGURE<br \/>\nGO<br \/>\n<\/code><\/p>\n<p>\ucc38\uc870<br \/>\nMS-SQL Server 2000 \uc5d0\uc11c \uc0ac\uc6a9\ud558\ub358 xp_cmdshell \uc744 MS-SQL Server 2005, 2008 \uc5d0\uc11c \uc0ac\uc6a9\ud558\uace0 \uc2f6\uc744\ub54c\ub294<\/p>\n<p><code>SELECT * FROM sys.configurations WHERE name = 'xp_cmdshell'<\/code><\/p>\n<p>\uc744 \uc0ac\uc6a9\ud558\uc5ec xp_cmdshell \ud56d\ubaa9\uc758 value \uac12\uc744 \uccb4\ud06c\ud55c\ub2e4.<br \/>\nvalue \uac12\uc774 0\uc73c\ub85c \ub418\uc5b4 \uc788\uc744 \uacbd\uc6b0 \uc774\uac83\uc744 1\ub85c \ubcc0\uacbd\ud558\uba74 \uc0ac\uc6a9\uc774 \uac00\ub2a5\ud558\ub2e4.<\/p>\n<p>sys.configurations \uac12\uc744 \ubcc0\uacbd\ud560 \ub54c\ub294 sp_configure \ub77c\ub294 \uc2dc\uc2a4\ud15c \uc800\uc7a5\ud504\ub85c\uc2dc\uc800\ub97c<br \/>\n\uc774\uc6a9\ud558\uc5ec \uac12\uc744 \ubcc0\uacbd\ud55c\ub2e4.<\/p>\n<p><code>EXEC sp_configure 'show advanced options', 1<br \/>\ngo<br \/>\nRECONFIGURE<br \/>\ngo<br \/>\nEXEC sp_configure 'xp_cmdshell', 1<br \/>\ngo<br \/>\nRECONFIGURE<br \/>\ngo<\/code><\/p>\n<p>\uc704\uc640 \uac19\uc774 \ubcc0\uacbd\ud558\uba74 \uc0ac\uc6a9\uc774 \uac00\ub2a5\ud558\ub2e4.<\/p>\n<p>\uac04\ud639, \uc704 \uc2a4\ud06c\ub9bd\ud2b8 \uc2e4\ud589\uc2dc \ub2e4\uc74c\uacfc \uac19\uc740 \uc5d0\ub7ec\uac00 \ucd9c\ub825\ub41c\ub2e4\uba74<\/p>\n<p>&#8216;\uc2dc\uc2a4\ud15c \uce74\ud0c8\ub85c\uadf8\uc5d0 \ub300\ud55c \uc784\uc758 \uc5c5\ub370\uc774\ud2b8\ub294 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4.&#8217;<\/p>\n<p>\uc774 \ubb38\uc81c\ub294 sp_configure \uc800\uc7a5 \ud504\ub85c\uc2dc\uc800\uc758 \uc5c5\ub370\uc774\ud2b8 \ud5c8\uc6a9 \ub9e4\uac1c \ubcc0\uc218\uac00 1\ub85c \uc124\uc815\ub41c \uacbd\uc6b0 \ubc1c\uc0dd\ud55c\ub2e4. \uc774 \ubb38\uc81c\ub97c \ud574\uacb0\ud558\ub824\uba74 \uc5c5\ub370\uc774\ud2b8 \ud5c8\uc6a9 \ub9e4\uac1c \ubcc0\uc218\ub97c 0\uc73c\ub85c \uc124\uc815\ud55c\ub2e4.<\/p>\n<p><code>SELECT * FROM sys.configurations WHERE name = 'allow updates'<\/code><\/p>\n<p>allow updates \uc758 \uc124\uc815\uac12\uc774 1\ub85c \ub418\uc5b4\uc788\uc744 \uacbd\uc6b0 \uc544\ub798\uc758 \uc2a4\ud06c\ub9bd\ud2b8\ub97c \uc2e4\ud589\ud558\uc5ec 0\uc73c\ub85c \ubcc0\uacbd\ud55c\ub2e4.<\/p>\n<p><code>EXEC sp_configure 'allow updates', '0'<br \/>\ngo<br \/>\nRECONFIGURE WITH OVERRIDE<br \/>\ngo<\/code><\/p>\n<p>\uc704\uc640 \uac19\uc774 \uc2e4\ud589 \ud6c4 \ub2e4\uc2dc sp_configure \uac12\uc744 \ubcc0\uacbd\ud558\uba74 \ub41c\ub2e4.<\/p>\n<p>\ucc38\uace0 )<br \/>\nhttp:\/\/msdn.microsoft.com\/ko-kr\/library\/ms190693(SQL.100).aspx<br \/>\nhttp:\/\/technet.microsoft.com\/ko-kr\/library\/ff487039.aspx<br \/>\n[\ucd9c\ucc98] MS-SQL Server 2008 \uc5d0\uc11c xp_cmdshell \uc0ac\uc6a9 \uc124\uc815|\uc791\uc131\uc790 winc21<\/p>\n<p>=&gt;\uc624\ub958<\/p>\n<p>\uad6c\uc131 \uc635\uc158 &#8216;show advanced options&#8217;\uc774(\uac00) 1\uc5d0\uc11c 1(\uc73c)\ub85c \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4. RECONFIGURE \ubb38\uc744 \uc2e4\ud589\ud558\uc5ec \uc124\uce58\ud558\uc2ed\uc2dc\uc624.<br \/>\n\uba54\uc2dc\uc9c0 5845, \uc218\uc900 16, \uc0c1\ud0dc 1, \uc904 2<br \/>\nAWE(Address Windowing Extensions)\uc5d0\ub294 \ud604\uc7ac \ud504\ub85c\uc138\uc2a4\uc758 \uc561\uc138\uc2a4 \ud1a0\ud070\uc5d0 \uc5c6\ub294 &#8216;\uba54\ubaa8\ub9ac\uc758 \ud398\uc774\uc9c0 \uc7a0\uae08&#8217; \uad8c\ud55c\uc774 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.<br \/>\n\uad6c\uc131 \uc635\uc158 &#8216;xp_cmdshell&#8217;\uc774(\uac00) 0\uc5d0\uc11c 0(\uc73c)\ub85c \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4. RECONFIGURE \ubb38\uc744 \uc2e4\ud589\ud558\uc5ec \uc124\uce58\ud558\uc2ed\uc2dc\uc624.<br \/>\n\uba54\uc2dc\uc9c0 5845, \uc218\uc900 16, \uc0c1\ud0dc 1, \uc904 2<br \/>\nAWE(Address Windowing Extensions)\uc5d0\ub294 \ud604\uc7ac \ud504\ub85c\uc138\uc2a4\uc758 \uc561\uc138\uc2a4 \ud1a0\ud070\uc5d0 \uc5c6\ub294 &#8216;\uba54\ubaa8\ub9ac\uc758 \ud398\uc774\uc9c0 \uc7a0\uae08&#8217; \uad8c\ud55c\uc774 \uc788\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<p>\uc0d8\ud50c<\/p>\n<p>[snippet id=&#8221;210&#8243;]<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>&#8212; To allow advanced options to be changed. EXEC sp_configure &#8216;show advanced options&#8217;, 1 GO &#8212; To update the currently configured value for advanced options. <a class=\"mh-excerpt-more\" href=\"https:\/\/www.auctionpro.co.kr\/?p=2772\" title=\"MSSQL2008\uc5d0\uc11c XP_CMDSHELL \ud65c\uc131\ud654 \uc2dc\ud0a4\uae30\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[16],"tags":[],"class_list":["post-2772","post","type-post","status-publish","format-standard","hentry","category-mssql-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2772","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2772"}],"version-history":[{"count":0,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/2772\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2772"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2772"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.auctionpro.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2772"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}