Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

The database model is marked RESTORING...

$
0
0

Newbie to SQL Server.

We are running SQL Server 2008 on Windows Server 2008 R2. And it has been running just fine for several months. For no apparent reason, our SQL Server service stopped last night, after a reboot required by updates, and every attempt to restart it produces:

Event id 3402: "The database 'model' is marked RESTORING and is in a state that does not allow recovery to be run."

Event id 1814: "Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive."

A lot of the discussions on the net link to this page.

So I tried the recipe included. First, I tried to restore model.mdf and modellog.ldf from backups created by the server backup program. The backup set I used was from a week ago, a time I know the database was working. Then I got copies of the same files from an installation of SQL Server Express 2008. Last, I got copies from a fresh install of SQL Server 2008. In each case I got the same messages whenever I tried to start the SQL Server service normally.

Here is the procedure I used:

1- sqlservr -T3608 -c -f -T3609

2- sqlcmd -E -SADMIN:<servername> (Default Instance)

3- use tempdb

4- go

5- sp_detach_db 'model'

6- Copy model* to the default DATA directory.

7- sp_attach_db 'model', '\path\to\model.mdf', '\path\to\modellog.ldf'

8 exit (sqlcmd)

9- Stop sqlservr process with Ctrl-C

10- Restart SQL Server from Administrative Tools/Services

I also tried a few other suggestions to no avail.

At this stage I am ready to call it quits and reinstall. The problem is that we have a commercial database that appears to be tied to the instance. I'd rather avoid a support call. Besides reinstalling work around the problem, but I have no way of preventing it from happening since I won't know what caused it in the first place.

I'd appreciate any help, pointers or solutions.

Thanks in advance,

Philippe


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>