Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

xp_cmdshell completes with error code 1

$
0
0

Hello,

I have a problem with SQL servers and the xp_cmdshell command.  Both servers have the same setup  and same accounts with same permissions but one server will complete an xp_cmdshell command without an error code and the second server also completes the xp_cmdshell command with error code 1.  See below example.  Any help would be awesome.  Thanks!

declare @Error int
exec @Error = master..xp_cmdshell 'dir "c:\" '
select @Error

Running same command on server 2.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>