Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 xp_cmdshell hangs

Author  Topic 

star2000
Starting Member

2 Posts

Posted - 2011-01-05 : 17:51:15
Hello out there!

Looking for some help with xp_cmdshell. Using MS Server Management Studio 2005, every statement I try hangs. It just sits and spins and I have to kill it. After starting out with more complicated commands, I tried just this:

EXEC master.sys.xp_cmdshell 'c:\windows\notepad.exe'
GO

and still nothing. No error messages.

Any suggestions?

Thanks in advance.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-05 : 17:52:18
You can't do that via xp_cmdshell. If you look in Task Manager, you will see all of the different ones you've tried as they opened inside the SQL Server process which you are unable to see from your session.

So you can't open up notepad from xp_cmdshell or any application that requires user input.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

star2000
Starting Member

2 Posts

Posted - 2011-01-05 : 18:00:38
Thank you Goddess!
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-05 : 18:08:08
You're welcome, glad to help.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -