Solved

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

Posted on 2010-08-16
4
475 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

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…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

628 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