Solved

XP_CMDSHELL store procedure keep running on SQL Server 2005 - What could be the problem ?

Posted on 2010-08-16
4
461 Views
Last Modified: 2012-05-10
Hi Friends,

I have One Winows Application.

When I run Windows Application EXE, it is running well and finishing up in 1 Min. duration.

When I Exeucte this Exe from XP_CMDSHELL , it is keep running on SQL Server.

Execute MAster..XP_CMDSHELL 'C:\Test.Exe'

Can anyone guide me, why it is keep running through XP_CMDSHELL ?

Thanks.
0
Comment
Question by:SQLNewBieUSA
4 Comments
 
LVL 8

Expert Comment

by:dba2dba
ID: 33451246
two possibilities:

1) If you try to execute a program that requires user input, the xp_cmdshell process will hang. Some command line utilities are interactive and you need to set some switches so that it runs in quiet mode, maybe this utility works that way too.

2) The Account SQL Server is running should have the necessary privileges to run the program. When you run from command prompt, it runs under your account while in xp_cmdshell it runs under sql service account.
0
 
LVL 5

Accepted Solution

by:
ThakurVinay earned 500 total points
ID: 33452318
can you able to run any other commands with XP_CMDSHELL

check the XP_CMDSHELL is enable at configuration manager

hth
vinay
0
 

Author Comment

by:SQLNewBieUSA
ID: 33455548
dba2dba --

Thanks for replying me.

My XP_CMDSHELL only required path for .EXE.

I am just trying to call .EXE file from XP_CMDSHELL - it does not need any other parameter or user interaction.

pls correct me if i am wrong
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question