Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent Help Needed - SQLServer Wont start 1

Status
Not open for further replies.

Soulless

IS-IT--Management
Aug 12, 2003
66
GB
I have MS SQLServer running on Windows Small Business
Server. I tried to restore a previous version of our
database over the new one but something went wrong and
the process stopped.
Now whenever I start the SQL Server it stops after a few
seconds and I get the following message in Event Viewer:

17052:
Database 'model' cannot be opened and is in the middle of
a restore.

How can I stop this restore, with SQL Server not even
starting?

Any ideas will be really helpful.
 
Intersting ... Lets see if we can get SQL Server running again and work it from there.

Find the model.mdf and model.ldf in the SQL Server folder on your disk. rename them to model.mdf2 and model.ldf2 for safe keeping.

Start SQL Server ... Does it Start???

Thanks

J. Kusch
 
I could only find a model.mdf file, there doesnt appear to be a model.ldf file.

When the SQL Server was started I got the same error message in Event Viewer as before and the server stopped again.
 
You recieved the same message of "Database 'model' cannot be opened and is in the middle of a restore." even when you renamed the model.mdf to model.mdf2?

Thanks

J. Kusch
 
Yes, I got exactly the same message even with the files being renamed.
Any more ideas?

Thanks
 
OK ... lets see if QA (Query Analyser) can egt in there. Open QA, paste these commands, execute and lets see if we can at least communicate w/ SS(SQL Server)

USE master
GO
exec sp_configure 'allow updates', 1
GO
RECONFIGURE WITH OVERRIDE
GO

exec sp_resetstatus Model
GO

exec sp_configure 'allow updates', 0
GO
RECONFIGURE WITH OVERRIDE
GO

Try to start SS and lets see what happens.

Thanks

J. Kusch
 
I have tried QA myself and it comes up with this error message:

Unable to Connect to Server 'Server'
Server MSG 17, Level 16, State 1
SQL Server does not exist or access denied.

I get the same message whether I use Windows Authentication or SQL Server authentication.

Thanks
 
It almost sounds like you tried to restore the Model database using the WITH NORECOVERY option.

If possible, try running

RESTORE DATABASE model WITH RECOVERY

-SQLBill
 
SQLBill how can I run that if I cant get into QA or Enterprise Manager? Is there another way?

Thanks
 
There is something else wrong. The loss of the Model database should not keep you from using Query Analyzer or Enterprise Manager.

Are you sure you were only restoring your database and not all of them? (especially MASTER) Unless you were restoring more than just your database, the Model database should not have been restored.

So, I guess the first thing to find out is why was SQL Server restoring MODEL?

You might have to reinstall SQL Server and then restore your database to the new install.

-SQLBill
 
I agree w/ Bill ... may need a fresh install. You may also want to open a couple of the error logs in the MSSQL\Log folder. They are named ERRORLOG.* where the * represents each archived errorlog that was created by a system shutdown or an SP_recycle_log command.

Open the most recent ones and see if there is any info being logged that may give us more clues as to what is happening.

Thanks

J. Kusch
 
Thanks for all your help, but I am gonna do a fresh install like you suggested. I was trying to avoid it, but its gonna be the quickest thing to do.

Thanks for all your help.
 
Still may want to take a look at those error logs before the resintall ... in case it rears its ugly head again!

Thanks

J. Kusch
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top