January 4, 2012 at 9:25 am
Can someone help me with the sql to schdule restart of sql service and aagent service and also send mesage 15 min before to the users logged in?
January 4, 2012 at 9:42 am
Tara-1044200 (1/4/2012)
Can someone help me with the sql to schdule restart of sql service and aagent service and also send mesage 15 min before to the users logged in?
You should look to accomplish this outside of SQL Server, a sql server agent job cannot fire a script to stop the service, the same service it needs to execute any script in the first place
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
January 4, 2012 at 10:01 am
yes, i agree. i ,may need to create a windows job and so i am hitting the forum if someone has done this before that can be shared. Thanks
January 4, 2012 at 11:30 am
is it possible to send a pop up message to the sql server users?
January 5, 2012 at 8:31 am
Not that I think it's the best way to go about it, but technically...
It should be possible, using the sql server agent in a couple of different ways, to send a net send or email message to the machines currently connected to sql server, and stop the sql server service, using a mess of t-sql, xp_cmdshell and dos commands. The sql server service can be set to auto-restart itself.
http://msdn.microsoft.com/en-us/library/ms188767.aspx
http://msdn.microsoft.com/en-us/library/ms189597.aspx
http://msdn.microsoft.com/en-us/library/ms175046.aspx
http://technet.microsoft.com/en-us/library/cc736564(WS.10).aspx
http://msdn.microsoft.com/en-us/library/ms189635(v=SQL.100).aspx
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply