arturosm
asked on
MS SQL Server 2008 Restart command
Hello.
I need to call a command or API function to stop and then restart SQL Server 2008 each other day. Before, I had MSSQL Server 2000 and used the following commands from within my program:
net stop SQLServerAgent
net stop MSSQLServer
then
net start MSSQLServer
net start SQLServerAgent
But with SQL Server 2008 they don´t work, it seems the services are named different than in previous versions (for example the SQL 2000 version).
Note:
I'm using SQL Server 2008 Express Edition for the testing and I'm not sure if the service is called the same in the "regular" (not Express) edition.
Any idea how to do this ?
Regards.
I need to call a command or API function to stop and then restart SQL Server 2008 each other day. Before, I had MSSQL Server 2000 and used the following commands from within my program:
net stop SQLServerAgent
net stop MSSQLServer
then
net start MSSQLServer
net start SQLServerAgent
But with SQL Server 2008 they don´t work, it seems the services are named different than in previous versions (for example the SQL 2000 version).
Note:
I'm using SQL Server 2008 Express Edition for the testing and I'm not sure if the service is called the same in the "regular" (not Express) edition.
Any idea how to do this ?
Regards.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
My pleasure.
MO
MO
ASKER