Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2010-08-16
4
Medium Priority
?
485 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
3 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …

782 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