SQL Server blocked access to procedure ‘sys.xp_cmdshell’
If you get this message:
SQL Server blocked access to procedure ‘sys.xp_cmdshell’ of component ‘xp_cmdshell’ because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of ‘xp_cmdshell’ by using sp_configure. For more information about enabling ‘xp_cmdshell’, see “Surface Area Configuration” in SQL Server Books Online.
That’s because, by default, xp_cmdshell is disabled in SQL Server 2005 for security reasons.
To turn it on, run this script:
EXECUTE SP_CONFIGURE 'show advanced options', 1
RECONFIGURE WITH OVERRIDE
GOEXECUTE SP_CONFIGURE 'xp_cmdshell', '1'
RECONFIGURE WITH OVERRIDE
GOEXECUTE SP_CONFIGURE 'show advanced options', 0
RECONFIGURE WITH OVERRIDE
GO
[...] Caso o SQL Server bloqueie o acesso a procedure xp_cmdshell é só habilita-la. [...]
Salvando resultado de consultas em arquivo no SQL Server « Rafael Pinto
17/07/2009 em 22:18