DB/MS SQL Server
xp_cmdshell 권한
나모찾기
2012. 9. 5. 16:33
대상: SQL Server 2008
만약 xp_cmdshell 을 저장 프로시저에서 수행했는데 동작하지 않는다면 아래를 체크해본다.
xp_cmdshell 명령 사용가능 전환
-- 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
데이터베이스의 권한 부여
- 데이터베이스 선택후 우 클릭, [속성]
- 사용 권한 (페이지 선택; 좌측메뉴)
- 설정된 '사용자 또는 역할'이 무엇인지 기억하고, 위의 '서버 사용 권한 보기'를 클릭
- [서버 속성]의 '로그인 또는 역할'에서 아까 설정된 사용자의 사용 권한을 확인
- '서버제어'에 대한 권한을 부여해준다.