다음을 통해 공유


xp_cmdshell 서버 구성 옵션

xp_cmdshell 옵션은 시스템 관리자가 xp_cmdshell 확장 저장 프로시저를 시스템에서 실행할 수 있는지 여부를 제어할 수 있는 SQL Server 서버 구성 옵션입니다. 기본적으로 xp_cmdshell 옵션은 새 설치에서는 사용할 수 없도록 되어 있지만 다음 코드 예제에서 볼 수 있듯이 정책 기반 관리를 사용하거나 sp_configure 시스템 저장 프로시저를 실행하여 사용 가능하도록 할 수 있습니다.

-- 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  

참고 항목

서버 구성 옵션(SQL Server)
정책 기반 관리를 사용하여 서버 관리