2010. 2. 26. 18:39

SQL 2005 xp_cmdshell 복구

SQL 2005 에서는 기본적으로 xp_cmdshell 이 비활성화 되어 있는 상태입니다.
다음과 같이 활성화 합니다.



-------------- 2005 ------------------------
use master
if object_id('xp_cmdshell')is null
exec sp_addextendedproc'xp_cmdshell','xplog70.dll'
go

exec sp_configure'show advanced options',1
reconfigure
go

exec sp_configure'xp_cmdshell',1
reconfigure
go




----------------2008 ----------------------
-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO

-- To enable the feature.
EXEC sp_configure
'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE

GO