Re: Restart Services
From: Keith Kratochvil (sqlguy.back2u_at_comcast.net)
Date: 08/11/04
- Next message: Mary Chipman: "Re: Front End options"
- Previous message: tram: "Re: Restart Services"
- In reply to: tram: "Re: Restart Services"
- Next in thread: tram: "Re: Restart Services"
- Reply: tram: "Re: Restart Services"
- Reply: tram: "Re: Restart Services"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 11 Aug 2004 12:05:27 -0500
Create a startup procedure that will email you when the server starts. You
will need to mark it to run on startup.
exec sp_procoption 'The_stored_procedure_to_run_on_startup, 'startup',
'true'
-- Keith "tram" <tram_e@hotmail.com> wrote in message news:26ee1067.0408110852.6b537c35@posting.google.com... > Vyas, > > How do we setup mail notification (alert) when sql server restarts > after stopping? We were getting stop alert, but not when it comes back > UP. Any suggestions would be apprecitaed. > > Thanks > > > > > "Narayana Vyas Kondreddi" <answer_me@hotmail.com> wrote in message news:<ezYubnkdEHA.228@TK2MSFTNGP11.phx.gbl>... > > How to restart SQL Server at regular intervals? > > http://vyaskn.tripod.com/restart_sql_server_service.htm > > -- > > HTH, > > Vyas, MVP (SQL Server) > > http://vyaskn.tripod.com/ > > > > > > "Noor" <noor@ngsol.com> wrote in message > > news:OsvN9UfdEHA.3616@TK2MSFTNGP10.phx.gbl... > > Thanks Hari and Keith... > > > > Noor > > > > "Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message > > news:uIyaaVYdEHA.2352@TK2MSFTNGP09.phx.gbl... > > > Hi Noor, > > > > > > I agree with Keith, Put the below contents in a batch file:- > > > > > > NET STOP SQLSERVERAGENT > > > NET STOP MSSQLSERVER > > > NET START MSSQLSERVER > > > NET START SQLSERVERAGENT > > > > > > After that schedule this batch using the Windows scheduler or use the AT > > > command. > > > > > > See the help of AT command by executing the below from command prompt:- > > > > > > AT/? > > > > > > > > > Note: Ensure that Task schedular service is running all the time. AT > > comand > > > and Windows schedular user this service. > > > > > > Thanks > > > Hari > > > MCDBA > > > > > > > > > "Keith Kratochvil" <sqlguy.back2u@comcast.net> wrote in message > > > news:erWb75WdEHA.3528@TK2MSFTNGP12.phx.gbl... > > > > Do you want to stop the services so that you can backup your databases? > > > > Perhaps you could use the Transact-SQL BACKUP command to backup your > > > > databases to disk that you could then backup using your backup software. > > > > > > > > If you don't have the available disk space to backup the databases and > > you > > > > can afford some downtime probably the better option is to issue > > > > sp_detach_db, then have the backup software backup your databases, and > > then > > > > issue sp_attach_db. > > > > > > > > > > > > If you want to stop SQL Server from a job you could try creating a batch > > > > file that issues the appropriate NET STOP and NET START commands. You > > can > > > > then schedule a job to call the batch file. I have not tried this, so I > > > > don't know if it will work or not, but that is one way you could do it > > > > within a [SQL] job. If the SQL Server job does not work you could also > > > > schedule a job within NT to call the batch file. > > > > > > > > -- > > > > Keith > > > > > > > > > > > > "Noor" <noor@ngsol.com> wrote in message > > > > news:O6M1c4TdEHA.1656@TK2MSFTNGP09.phx.gbl... > > > > > Dear Professional > > > > > > > > > > I want to restart the msSqlServer and msSqlAgent Services once a day > > through > > > > > JOB, how can I perform this > > > > > > > > > > Thanks > > > > > NOOR > > > > > > > > > > > > > > > > > > > >
- Next message: Mary Chipman: "Re: Front End options"
- Previous message: tram: "Re: Restart Services"
- In reply to: tram: "Re: Restart Services"
- Next in thread: tram: "Re: Restart Services"
- Reply: tram: "Re: Restart Services"
- Reply: tram: "Re: Restart Services"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|