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 |
jeff00seattle
Starting Member
5 Posts |
Posted - 2008-11-17 : 12:25:41
|
While running a SQL script by calling sqlcmd with DOS Batch script, I noticed that the following message was outputed:SQLServerAgent is not currently running so it cannot be notified of this action.Is there a way to check if SQLServer, SQLServerBrowser, or SQLServerAgent are currently running or not through Command line so that I may incorporate it within my Batch script?ThanksJeff in Seattle |
|
craig79
Starting Member
33 Posts |
Posted - 2008-11-17 : 17:14:52
|
xp_servicecontrol 'querystate', 'SQLSERVERAGENT'goxp_servicecontrol 'querystate', 'MSSQLSERVER'goxp_servicecontrol 'querystate', 'MSSQLServerBrowser'goquote: Originally posted by jeff00seattle While running a SQL script by calling sqlcmd with DOS Batch script, I noticed that the following message was outputed:SQLServerAgent is not currently running so it cannot be notified of this action.Is there a way to check if SQLServer, SQLServerBrowser, or SQLServerAgent are currently running or not through Command line so that I may incorporate it within my Batch script?ThanksJeff in Seattle
|
 |
|
|
|
|