Monday, March 12, 2012

Open and close SQL server via command prompt

I need command line to open and close SQL server
I'am working with a mirroring batch file, It performs a mirroring of a works
tation (database files) in a lab and a secured backuped server
Someone can help me
thanksI assume you mean start and stop the SQL Server service?
NET START MSSQLSERVER
NET STOP MSSQLSERVER
Don't forget to handle the SQL Server agent server, which is dependent on th
e SQL Server service. Also, if it
is a named instance, you need to adjust the service name (see the "Services"
windows applet).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Capone Raphael" <capone.raphael@.skynet.be> wrote in message
news:5409F787-DF3E-4B4F-A6FD-950B5AFA7268@.microsoft.com...
> I need command line to open and close SQL server
> I'am working with a mirroring batch file, It performs a mirroring of a workstation
(database files) in a lab
and a secured backuped server
> Someone can help me
> thanks|||I am not sure what you mean by "open and close." =20
If you need to connect via the command line, try osql.exe
--=20
Keith
"Capone Raphael" <capone.raphael@.skynet.be> wrote in message =
news:5409F787-DF3E-4B4F-A6FD-950B5AFA7268@.microsoft.com...
> I need command line to open and close SQL server=20
> I'am working with a mirroring batch file, It performs a mirroring of a =
workstation (database files) in a lab and a secured backuped server
>=20
> Someone can help me=20
>=20
> thanks

No comments:

Post a Comment