March 16, 2011 at 8:52 am
When I launch this vbscript (shown below) with xp_cmdshell in Server Management Studio, the script (which is on another machine) is executed fine, however the xp_cmdshell doesn’t stop running
This is my code:
EXEC xp_cmdshell '\\xxx.xxx.xxx.xxx\vbscript\myvbscript.vbs "my_first_variable" "my_second_variable"'
When I do a “sp_who” I get status: runnable and cmd: EXECUTE on this process.
First what am I doing wrong. The script isn’t returning anything (It’s actually launching a bulk emailing)
Second, how can I kill this process? Do I have to restart my SQL server?
Thank you
March 16, 2011 at 9:43 am
Most likely the script has thrown an exception and it needs action (like clicking on Ok). Try running the script in command prompt under the context of the SQL Server service account and see if you get any errors.
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
March 16, 2011 at 11:35 am
You can kill the process by using the KILL <SPID> command. And do what Pradeep suggested. Look at the command in a command line utility to make sure what sorts of output you're getting (though I'd recommend testing with a smaller email list).
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply