2

I am using some dos commands to do file operations & bcp command in my sql server stored procedure. So I am setting xp_cmdshell on and off many times. I am doing this multiple times because, if I just enable once at the start of SP and disables at the end of SP, many times I get the error saying xp_cmdshell not enabled.

SO I am enabling and disabling at each dos command in my SP. By doing this, is there any load on sql server or any performance issues?

Also I want a way to set this xp_cmdshell enabled always. Is there any way to do this?

halfer
  • 19,824
  • 17
  • 99
  • 186
AnandPhadke
  • 13,160
  • 5
  • 26
  • 33
  • Enable xp_cmdshell always; see this question on Stack Overflow: [Enable 'xp_cmdshell' SQL Server](https://stackoverflow.com/q/5131491/243373) – TT. Oct 09 '17 at 06:19

0 Answers0