3

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.

5
  • 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.
    – Beau Geste
    May 3, 2010 at 19:59
  • 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...
    – Guy
    May 3, 2010 at 20:45
  • 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, 2010 at 6:22
  • 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, 2010 at 6:50
  • Checking if the service is up and restarting it if it isn't may be a quick fix, but it doesn't solve the root problem. I don't know what might be causing this, but I'm quite sure SQL Server instances are not supposed to shut down unless told to do so.
    – Massimo
    Aug 2, 2015 at 13:48

1 Answer 1

1

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).

1
  • 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, 2011 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .