Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently developing a new ASP.NET project hosted on a Windows Server 2008 RC2 with an SQL Server 2008 Express database. I have three SQL Server instances (for different purposes) running which currently all contain a single database.

For apparently no reason, these instances tend to shut down after some days. There might be low or no traffic to these instances, because there might be some days in a row, where I can't develop.

It now occurred several times, that one or two of these three instances just shut down, so that I can't access the database, without manually starting the instance.

I can't seem to find a event log entry for the shutdown, which is most likely because I just enabled logging (why is the default setting off?).

So the questions are: * Why does an SQL Server instance shut down? (Is there such a thing as a "Shut down instance after 3 days of inactivity"? * How can I achieve that the instances are running 24/7?

Edit: I solved this problem by writing my own application that checks for the status of the SQL Server services. My program will start via a batch file, that gets called by the Windows Task Scheduler every 5 minutes.

share|improve this question
add comment

3 Answers

Do all instances shutdown together? If so, the only thing I can think of is some sort of power management that is sending some sort of "we are about to shutdown due to power" message and the instances are responding.

share|improve this answer
    
No, they do not shut down at all once. sometimes just instance 1, another time 2 and 3, then some days later just 3, and so on –  user42119 May 4 '10 at 6:22
add comment

Take a look in the MS SQL Server log files for clues. Usually:

c:\programme files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log or look at the logs from SQL Management Studio.

If SQL is crashing then there will be some evidence available...

share|improve this answer
    
I looked at the logs, but there is nothing that would indicate a shutdown without waking up the instance afterwards. There are entries of backups and of wakening up after idle time. If another shutdown occurs, I'll know where to look. Thanks so far –  user42119 May 4 '10 at 6:50
add comment

SQL Server Express does go into an idle state, so I believe, when it's not being used: http://blogs.msdn.com/b/sqlexpress/archive/2008/02/22/sql-express-behaviors-idle-time-resources-usage-auto-close-and-user-instances.aspx

(Sorry, I didn't look at the date.... sometimes SF shows really old posts).

share|improve this answer
    
No problem with the date ;) The idle state is not a problem. It occurs to me that this is a issue of rebooting the server and starting the instance. I wrote a batch that starts the database service if the service is not running –  user42119 Mar 10 '11 at 8:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.