Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Automatically start MS SQL Server


Automatically start MS SQL Server

Author
Message
Ambuj Mathur
Ambuj Mathur
SSC Rookie
SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)SSC Rookie (30 reputation)

Group: General Forum Members
Points: 30 Visits: 282
Jeffery: Do you have any script that uses the net start command utility that sufices such scenario? If so, do you mind forwarding it to me? Thanks!
CrazyMan
CrazyMan
Right there with Babe
Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)Right there with Babe (774 reputation)

Group: General Forum Members
Points: 774 Visits: 1597
Hi Ambuj
You can use the below 2 scripts to check wether ur SQL server is running or not

-- This Gives u the state of SQL server, Running or Stopped
master.dbo.xp_servicecontrol 'QueryState', 'MSSQLServer'

-- You can start or stop SQL server with the line below from DOS Prompt
Net Start MSSQLServer

Remember to Start SQL Server Agent once you have started


Hope this helps
David Kingman
David Kingman
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 68
I had a situation over the long weekend where the SQL Server was restarted manually and even though all the SQL Server Services were set to start "Automatically" the SQL Server Agent did not come up. Fortunately most of my batch loads do not use the job scheduler but run by way of DOS batch scripts.

When I went to restart the Service I noticed that in the properties for the Services for all the SQL Server services that in the recovery tab that the First Failure, Second Failure and Subsequent failures were all defaulted to "take no action".

My question is what should they be set to "Restart the Service"? I searched MSDN and the web and didn't find anything on this subject. Is there any harm is setting them all to "Restart the Service"? (we have no OLTP databases only OLAPs in this server).

This leads me to wonder why wouldn't they be defaulted to "Restart the Service".

Thanks,

DaveK
Bob Fazio
Bob Fazio
SSC Eights!
SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)

Group: General Forum Members
Points: 968 Visits: 683
Jeff Moden (5/26/2008)
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.

Express edition is can also be run on a PC. However, express is a limited version.
Bob Fazio
Bob Fazio
SSC Eights!
SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)

Group: General Forum Members
Points: 968 Visits: 683
Why do we keep talking about scripts. There is no need for one. Go to
Control-Panel -> Administrative tools -> Services...

Find the "SQL Server *" services. the one's with (MSSQLSERVER) or (SQLEXPRESS) or whatever your instance name is, are the ones specific to your instance.

Generally the Browser is disabled.

You can also use the SSMS and right click on your server. Using SQL Server Configuration Manager you can configure the services to start automatically.

Start -> Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager

Something else worth looking at:
Start -> Programs -> Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration

I hate to state the obvious some times, but RTFM.
David Kingman
David Kingman
SSC Rookie
SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)SSC Rookie (27 reputation)

Group: General Forum Members
Points: 27 Visits: 68
I am not talking about scripts. (?) I was referring to the default parameters for the SQL services:
services>properties>recovery tab>First failure, Second failure, Subsequent failures and why they are all set to "Take No Action".

Maybe I should have started a new thread.
Bob Fazio
Bob Fazio
SSC Eights!
SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)SSC Eights! (968 reputation)

Group: General Forum Members
Points: 968 Visits: 683
Sorry, that's a monitoring issue. MOM is an option here.

Or you could just create a windows task that runs every hour... Smile
net start "SQL Server (MSSQLSERVER)"

It would fail usually, but wouldn't hurt anything.

You could of course get more creative. One way I have mananged complicated scripts is to install cyqwin and with cron.

Windows powershell, vbscript, WSH are also options.

However, I prefer perl as my scripting language.
Manoj-485464
Manoj-485464
SSC-Enthusiastic
SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)SSC-Enthusiastic (139 reputation)

Group: General Forum Members
Points: 139 Visits: 130
There is only one way to start the SQL services. That is also manually. Go to Controll pannel and servies. Go to Property of SQL services and change to automatically start when windows start.

Make sure you type your svc a/c and password

Manoj

MCP, MCTS (GDBA/EDA)

oldsoul1313
oldsoul1313
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 5
No offense taken. As far as the Server Agent not responding, I have checked and triple-checked to make sure that my account is administrator and that I have the correct password. I've looked up the cause and solution for a 1068 error and I still am unable to fix it. The only thing I can think of doing is uninstalling and reinstalling it. For the second time.
I'm just at a loss with the DAC connection. I'm using the All-in-One Database Administration book for taking the three exams for MCITP so I'm following the directions to the T. I've went through the Surface Area Configuration and established my remote connections. I'm making sure that my SQLCmd is accurate and it's still saying that my Native Client has timed out or logon expired.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search