Enable TSQL xp_cmdshell command

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

A simple script to enable xp_cmdshell in SQL Server

sp_configure 'show advanced options',1
GO
RECONFIGURE
GO
sp_configure xp_cmdshell,1
GO
RECONFIGURE
Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *