Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Automatically start MS SQL Server Expand / Collapse
Author
Message
Posted Monday, May 26, 2008 9:31 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, May 5, 2014 3:53 AM
Points: 26, Visits: 279
Can anyone suggest a way to bring-up the MS SQL Server if it is down apart from manually doing it. I would appreciate if someone can guide that through a script. I'm fighting and struggling to get a solution to it. Thanks in advance!
Post #506509
Posted Monday, May 26, 2008 9:56 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:27 AM
Points: 35,349, Visits: 31,889
What do you mean? SQL Server will load on boot unless someone has tampered with the initial settings. Do you mean power was removed from the server and you want to "turn the server on"?

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #506518
Posted Monday, May 26, 2008 10:11 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, May 5, 2014 3:53 AM
Points: 26, Visits: 279
I mean that for whatever reason- If I need to start the SQL Server services including the agent, how do I do it through a script? I want to avoid a person sitting and just monitoring the server and bringing it up when it goes down because of any reason (may be power off/shutdown).
Post #506525
Posted Monday, May 26, 2008 10:24 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, October 2, 2014 12:09 PM
Points: 4,358, Visits: 9,538
SQL Server runs as a service on Windows. You set the service to start automatically and every time Windows is restarted, SQL Server will be automatically started.

Just set all SQL Server services that you want started when the server start to automatic. To do this, open Configuration Manager, select the services you want and modify the startup from Manual to Automatic.

Jeff


Jeffrey Williams
Problems are opportunites brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs
Post #506530
Posted Monday, May 26, 2008 10:27 AM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Sunday, January 29, 2012 1:45 AM
Points: 710, Visits: 1,284
u can create a batch to do so just write this in:
net start MSSQLSERVER. if u have a default instance.
if u have a named instance just replace the MSSQLSERVER with ur instance name.
and for the agent write ur agent service name.
u can get the service name from the control panel---> administrative tools---> services


..>>..

MobashA
Post #506531
Posted Monday, May 26, 2008 10:51 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, May 5, 2014 3:53 AM
Points: 26, Visits: 279
Hi Jeff, Jeffery, mobasha

Thank you so much for your suggestions. This is the answer I wanted to confirm. Although I knew what you all have extended over to me but still would like if you could try to get over some script to bring SQL Server online or running. If any of you can try to manage it, it would be of a great help to me. Thanks again!
Post #506538
Posted Monday, May 26, 2008 11:14 AM
SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Thursday, October 2, 2014 12:09 PM
Points: 4,358, Visits: 9,538
What do you want a script to do?

Check to see if SQL Server is running, and if not - start it? If so, I wouldn't want to just restart SQL Server automatically, because - if it crashed it crashed for a reason and just automatically restarting the service could cause additional corruption.

But, if you are really looking for something like that - then there are several options. Use a batch file that issues a NET START command and schedule it every few minutes, or install Powershell and look into Get-Service and Start-Service cmdlets, or use VBScript and use WMI to access the service and restart as needed, or other option.

Jeff


Jeffrey Williams
Problems are opportunites brilliantly disguised as insurmountable obstacles.

How to post questions to get better answers faster
Managing Transaction Logs
Post #506546
Posted Monday, May 26, 2008 11:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, May 27, 2008 10:35 PM
Points: 2, Visits: 5
Hello everyone

I just installed SQL Server 2005 Evaluation edition on my desktop and laptop. Everything has been working fine; I've configured all of my services to run automatically and everything. However, today when I attempted to run SSMS I get an error that says that the Sql Server Agent could not start on the local computer. I've made sure that the account that I configured everything on is the account that I'm logged into but I'm still getting errors. Could anyone possibly help me out?

Also on my laptop I am attempting to connect to DAC with SQLCmd but it keeps telling me that the SQL Native Client has timed out; login expired. I unistalled all services and installed again and I am still getting the same errors.

If anyone could help me I would greatly appreciate it.
Post #506547
Posted Monday, May 26, 2008 3:09 PM


Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Sunday, January 29, 2012 1:45 AM
Points: 710, Visits: 1,284
for the service if its not a problem change the account to local administrator and make sure that u r writing the right password.
and for the DAC please dont be offended but i have to ask, have u enabled the DAC connections from the Surface Configuration Aria?


..>>..

MobashA
Post #506577
Posted Monday, May 26, 2008 4:35 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 8:27 AM
Points: 35,349, Visits: 31,889
One thing that you should be made aware of... Unless you're installing the Developer's Edition of SQL Server, it must run on a Windows Server.

--Jeff Moden
"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".

First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."

(play on words) "Just because you CAN do something in T-SQL, doesn't mean you SHOULDN'T." --22 Aug 2013

Helpful Links:
How to post code problems
How to post performance problems
Post #506599
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse