SQL Server blocked access to procedure 'sys.xp_cmdshell'

412
Views
1
Answers

I am executing xp_cmdshell bcp query and I get this error

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.
edit | flag
William Patrick
Asked on: Apr 15, 2013 at 7:16PM

1 Answers

163
0
163

You need to enable the use of xp_cmdshell. Run the below commands to enable it

-- To allow your 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 cmdshell.
EXEC sp_configure
'xp_cmdshell', 1
GO
-- To update the currently configured value for this feature.
RECONFIGURE
GO
edit | flag
Gokul A
Answered on: Apr 15, 2013 at 7:27PM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags