Problem starting SQL Server Database (urgent)

Can anyone help?

We are trying to start our SQL Server db and getting the message:-

"Error 9003, severity: 20, state: 1

The LSN (4:120:1) passed to logscan in database 'model' is invalid".

Big points available.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

CyberWizardConnect With a Mentor Commented:
this problem occurs more often, some info I've found on it:

Message 9003 is "The LSN %S_LSN passed to log scan in database '%.*ls' is invalid."
which indeed is a serious error. If it prevents SQL Server from starting it must be
one of the system databases that are it.

You find more information in the errorlog about which database that is corrupt. (Look
in C:\program files\Microsoft SQL Server\MSSQL\Log).

or in your case your sql server may be installed in d:\
you'll probably find in the log files that the model log is expected in a different location than it now is.

I suggest you move it to the location where sql wants it and try to start the sql server again.

just curious, are you running sql server 2k evaluation version?

additional info
you probably have somtehing like this in your log file:

2002-05-25 10:58:20.44 server3 Using 'SSNETLIB.DLL' version '8.0.194'. 2002-05-25
10:58:20.51 spid5 Starting up database 'model'.

2002-05-25 10:58:20.51 spid5 udopen: Operating system error 3(error not found) during
the creation/opening of physical device C:\Program Files\Microsoft SQL
Server\MSSQL\data\model.mdf. 2002-05-25 10:58:20.51 spid5 FCB::Open failed: Could not
open device
C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf for virtual device number
(VDN) 1. 2002-05-25 10:58:20.51 spid5 Device activation error. The physical file
name 'C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf' may be incorrect.

2002-05-25 10:58:20.51 spid3 Server name is 'SERVER3'. 2002-05-25 10:58:20.52 spid5
Device activation error. The physical file name 'C:\Program Files\Microsoft SQL
Server\MSSQL\data\modellog.ldf' may be incorrect. 2002-05-25 10:58:20.56 spid5
Database 'model' cannot be opened due to inaccessible files or insufficient memory or
disk space. See the SQL Server errorlog for details.

2002-05-25 10:58:20.51 spid5 Device activation error. The physical file name
'C:\Program Files\Microsoft SQL Server\MSSQL\data\model.mdf' may be incorrect.

and answer:

The path you are having problem with at is in master..sysdatabases.

How this may all at a sudden may have changed to C:\, I don't have a clue.

Possibly the easiest solution is to copy the files to the location where SQL Server wants them.

you can find this information and discussion on the following forum:

good luck

Brendt HessSenior DBACommented:
Is this a replicated database?  If so, then the problem appears that the distributor has got itself ahead of the publisher.  This is possible when you have restored the publisher from old backup or there is some sort of bug or fatal error on the publisher causing the sql server to shutdown prior to this error.

You can check the min xact_seqno on the distributor for given publisher with
select min(xact_seqno) from MSrepl_transactions where publisher_database_id in (select id from MSpublisher_databases where publisher_id IN (select srvid from master..sysservers) and publisher_db='dbname') and compare this with

PUBLISHER distendlsn:
dbcc traceon(3604)
dbcc dbtable (publisher)

If this is not a distributed DB:

The error message is indicating a potential data integrity issue with your log and/or database.  Please contact Microsoft SQL Server Support (1-800-936-4900) for assistance with this issue.

unless wizart is correct you have a corrupted model database.

If model database is corrupted you can try to

1 make sure sql server is stopped
2 delete log file for model database and expect sql server to rebuild it
reinstall sql server, which will re-build all system databases, including model, msdb, and master databases.

then copy existing master and msdb physical files into the location where new instalation expects those. Obviously if this path is taken the first thing need to be done is to store a copy of master and msdb databases in a safe location.

The good thing is that model database is only used as a blueprint to create databases user need in the future. As such, it is important that when sql server is re-installed its installation settings 100% match those of original install.

A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Just an add-on to miron's comment; you can use the 'rebuildm' utility to recreate the system tables without re-installing.  Then restore master from a backup, or re-attach the existing databases.
yes that's possible, you would have to rebuild master but than you would also have to recreate any user accounts.
this is already in the link I have provided above.

quote from the forum:

Even though the SQL Server is installed on D: the default location of the databases
seems to be set to C:, so its looking in 'C:\Program Files\Microsoft SQL
Server\MSSQL\data\ folder for model.mdf' and modellog.ldf. You would have to make
sure that these are in the right location for the server to start.

Otherwise you can start the server from command prompt by

sqlservr -c -T3608

This will prevent recovery of all databases except model.

Usually the resolution is to rebuild the master databases

To rebuild the master database 1. Shutdown SQL Server; then run Rebuildm.exe in the
Program Files\Microsoft SQL Server\ MSSQL\ Binn directory. 2. Click Browse. 3. Select
the \Data folder on the Microsoft® SQL Server? compact disc or in the shared network
directory from which SQL Server was installed; then click OK. 4. Click Settings.
Verify or change the character set, sort order, and Unicode collation used for the
master database and all other databases. 5. The default character set, sort order,
and Unicode collation are shown initially, which may not be the values selected
during SQL Server Setup. You can select the same combination used earlier or select a
new combination; then click OK. 6. Click Rebuild. The Rebuild Master utility
reinstalls the master database.

In the process you can make sure the data folder is set to D

Later , after rebuilding master you will have to re-attach all the user databases
using sp_attach_db

You also will lose all the logins and will have to recreate them , and then relink
the database users using sp_change_users_login

so have you had any luck trying to solve the problem?
but that's when all else fails.

solution was followed by this warning:

This posting is provided "AS IS" with no warranties, and confers no rights.
You could try backing up a model database from another server  and restoring it to this server (does assume that there is nothing unusual in model database on either machine). To do this you would probably need to start up with a parameter -T3608,
hello, you specified the help was urgent so I expect you have already tried some or all of the suggestions given.

so can you respond to this and specify if the problem has been resolved or if not what the results were of the suggestions given?
this way we can help you further to find a solution.

if the problem has been resolved by one of the suggestions please feel free to accept a comment as an answer and award the promised points for the help you received.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.