Solved

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

Posted on 2010-08-16
4
454 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now