SQL Server 2008 Express R2 restores after restart (and fails)

sql-server-2008

Almost every time I restart the machine hosting a SQL Server 2008 R2 express server, the database goes through the restore process. Most of the time, the database will become stuck in the restore process.

This error was found in the windows event log: The SQL Server (__NAMEHERE__) service terminated unexpectedly. It has done this 1 time(s).

This was found in the sql logs:

2011-12-09 10:12:51.16 Server SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
2011-12-09 10:13:18.86 spid13s Service Broker manager has shut down.
2011-12-09 10:13:18.86 spid13s Error: 17054, Severity: 16, State: 1.
2011-12-09 10:13:18.86 spid13s The current event was not reported to the Windows Events log. Operating system error = (null). You may need to clear the Windows Events log if it is full.

Any obvious reason as to why I cannot restart the system without the database needing to go through a restore.

Best Answer

Are you sure it is a restore process? When SQL Server starts, all the databases go through a process called recovery - which ensures all the transactions that were committed are ok, and those that weren't committed are rolled back. (when a database is restored, it goes through recovery as well)

Those logs just tell me that SQL Server's service stopped because of a system shutdown (reboot?). What happens when you start the SQL Server service manually? Does it run under a domain Windows account, or a local system account?