Click here to Skip to main content
11,802,442 members (71,712 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: SQL-server-2005 C# VB ASP.NET SQL , +
Hi All,

How to know whether xp_cmdshell in sql server 2008 crashes or not,
i used this xp_cmdShell in multiple procedures but some times it is crashes and not working , for that i need to send an email when the xp_cmdshell is crashed, can any body help me how can i know the crashes of xp_cmdShell

Thanks & Regards
Posted 18-Mar-13 20:06pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

What do you mean by "crashes"?? xp_cmdshell doesn't crash, so your statement doesn't make any sense.

It does, however, return a 0 or 1 depending on if the command was successfully launched. It does NOT tell you if the command it launched was executed successfully or not.

OH, and for future reference, you might want to read these[^].
Sudheer Nimmagadda at 20-Mar-13 0:47am
Hi Dave Kreskowiak,

thanks for your reply, but xp_cmdshell is return 0 or 1 based on result its ok,
But my problem is every day at the same time we have to run multiple procedures,
these procedures are using xp_cmdshell and if it is bulk usage on that time it is crashes and not working, please give me how can i know whether the xp_cmdshell is working or not
Dave Kreskowiak at 20-Mar-13 7:44am
Again, what do you mean by "crashes"? That isn't an acurate description of exactly what happens.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 KrunalRohit 366
1 OriginalGriff 365
2 F-ES Sitecore 295
3 Afzaal Ahmad Zeeshan 230
4 CPallini 230
0 OriginalGriff 2,950
1 Maciej Los 1,910
2 KrunalRohit 1,862
3 CPallini 1,645
4 Richard MacCutchan 1,157

Advertise | Privacy | Mobile
Web04 | 2.8.151002.1 | Last Updated 19 Mar 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100