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.
Author |
Topic |
sqlserverdeveloper
Posting Yak Master
243 Posts |
Posted - 2007-11-27 : 14:25:37
|
I want to schedule a sql job to run at specific time for restarting the sql services(MSSQLServer and SQLServerAgent) and also want to send notification to all the users 5 minutes before restarting them. Please help. Thanks. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-11-27 : 14:43:30
|
This is a bad idea. You can schedule the restart by using the NET START and NET STOP DOS commands. You can do this through the Windows Scheduler or AT.For notifications though, I doubt you'll be able to notify them from the database server without writing something. You can try NET SEND though and loop through sysprocesses.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
anonymous1
Posting Yak Master
185 Posts |
Posted - 2007-11-27 : 14:43:56
|
if sql is stopped then the sql agent is stopped and therefore could not initial the start of sql. you probably want to do this in a scheduled task. as far as notifying the users if you have web pages connecting under pooled connections, that is not inherent. depending on your network you can send net messages to machines connected to sql, but my guess is that is not what you are after. |
 |
|
evilDBA
Posting Yak Master
155 Posts |
Posted - 2007-11-27 : 15:34:16
|
Strange, why do you need to restart SQL server? |
 |
|
|
|
|