Many friends will meet me the same problem, because the machine loaded with SQL Server2005, causing the machine to slow down, there is no way to let SQL Server (MSSQLSERVER) service is not started by default. But every time you want to use SQL Server, you have to start it from the Control Panel-management tool-service, it is more troublesome, hehe.
So think of starting and shutting down SQL Server (MSSQLSERVER) from under DOS, run it inside and execute it, the command code is as follows:
Start: net start mssqlserver
STOP: net stop mssqlserver
Later thinking more convenient, wrote a bat command as follows, can be more convenient to start stopping SQL Server (MSSQLSERVER). Enter 1 to return the car, start the service, enter 2 return the car, close the service
@ECHO OFF
set/p var= operation [1: Start, 2: Stop]:
If%var%==1 goto start
If%var%==2 goto stop
: Start
NET start MSSQLServer
Goto END
: Stop
net stop MSSQLServer
Goto END
: Stop
net stop MSSQLServer
Goto END
: End
The above is a personal summary of some of the contents can be consulted, want to learn more about the database tutorial knowledge can be landed e Mentor network.
Use MSSQLServer service on DOS bat