I'm doing a stored procedure that will enable xp_cmdshell, if it is not enabled yet, on the SQL Server 2005 instance.
I have the code belloe, to put inside the stored proc (so that it enables the
xp_cmdshell), but , befour i run this commands i need to know if the option is not already enabled.
How can i do this?
EXEC sp_configure ‘show advanced options’, 1
– To update the currently configured value for advanced options.
– To enable the feature.
EXEC sp_configure ‘xp_cmdshell’, 1
– To update the currently configured value for this feature.