Home > Archive > MS SQL Server > October 2006 > SQL .bat file for startup









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQL .bat file for startup
Microsoft News Group

2006-10-24, 6:31 pm

Does anyone have the code for a .bat file so I can start SQL Express and SQL
Server without starting it in services each time?


Dan Guzman

2006-10-24, 6:31 pm

Is there some reason you don't want set the service start mode to Automatic?
You can also start services from the command prompt using NET START command:

NET START "SQL SERVER (SQLEXPRESS)"


--
Hope this helps.

Dan Guzman
SQL Server MVP

"Microsoft News Group" < mflynn@cvmediaonline
.com> wrote in message
news:%230BAdw$3GHA.1252@TK2MSFTNGP04.phx.gbl...
> Does anyone have the code for a .bat file so I can start SQL Express and
> SQL
> Server without starting it in services each time?
>



Hari Prasad

2006-10-24, 6:31 pm

Hi,

Just include the below commands in a batch (.BAT) file.

NET START "SQL SERVER (SQLEXPRESS)"



"Microsoft News Group" < mflynn@cvmediaonline
.com> wrote in message
news:%230BAdw$3GHA.1252@TK2MSFTNGP04.phx.gbl...
> Does anyone have the code for a .bat file so I can start SQL Express and
> SQL
> Server without starting it in services each time?
>



Hari Prasad

2006-10-24, 6:31 pm

Hi,

Just include the below commands in a batch (.BAT) file.

NET START "SQL SERVER (SQLEXPRESS)"
NET START "SQL Server Agent (SQLExpress)
NET START "SQL Server (InstanceName)
NET START "SQL Server Agent (InstanceName)

Then add a shortcut to the BAT-file into the Startup-folder. Change the
instance name based on ur installation.

Thanks
Hari
SQL Server MVP



"Microsoft News Group" < mflynn@cvmediaonline
.com> wrote in message
news:%230BAdw$3GHA.1252@TK2MSFTNGP04.phx.gbl...
> Does anyone have the code for a .bat file so I can start SQL Express and
> SQL
> Server without starting it in services each time?
>




Hari Prasad

2006-10-24, 6:31 pm

Hi,

Just include the below commands in a batch (.BAT) file.

NET START "SQL SERVER (SQLEXPRESS)"
NET START "SQL Server Agent (SQLExpress)
NET START "SQL Server (InstanceName)
NET START "SQL Server Agent (InstanceName)

Then add a shortcut to the BAT-file into the Startup-folder. Change the
instance name based on ur installation.

Thanks
Hari
SQL Server MVP



"Microsoft News Group" < mflynn@cvmediaonline
.com> wrote in message
news:%230BAdw$3GHA.1252@TK2MSFTNGP04.phx.gbl...
> Does anyone have the code for a .bat file so I can start SQL Express and
> SQL
> Server without starting it in services each time?
>




Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com