January 5, 2003 at 12:47 pm
I'm trying to use the SHUTDOWN command from a Stored procedure, but SQL Server will not allow me to do that. However, I can run the SHUTDOWN command in a job.
Is there a way I can call that job to run from a stored procedure or any alternative? Any help will be greatly appreciated.
January 5, 2003 at 2:53 pm
You should be able to run the job using sp_start_job. Shutdown doesnt work in a proc (or in a transaction, according to the error message). Possibly you could use xp_cmdshell to run net stop, though you'd have to pipe in the 'Y' to it.
Can I ask why you're doing this?
Andy
January 5, 2003 at 5:21 pm
Agree, seems like shooting oneself in the foot. What about the AT command? Can access it through xp_cmdshell.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply