Sunday, March 11, 2012

Error 5172

Hi,

I have a SQL Server 2000 running in a Windows 2003 Server. I restarted the server but SQL didn't startup, showing in the event viewer Error: 5172, Severity: 16, State: 15

Can anybody help me?

Thanks in advance,

Octavio Vargas

octavio.vargas@.macimex.com

The error text for error 5172 is along the lines of:

"The Header For File '.....ldf'' is not a valid database file header."

So it sounds like one of the system databases is corrupt - possibly the master database, particularly as SQL Server can't start. The lack of an error message in the text you quoted suggests that SQL Server can't access the master.dbo.sysmessages table.

If you have a recent backup of your master database then try restoring it - otherwise you may have to rebuild it.

Have a look at these links for more info:

http://msdn2.microsoft.com/en-us/library/aa173515(SQL.80).aspx

http://msdn2.microsoft.com/en-us/library/aa213831(SQL.80).aspx

Once it has been rebuilt you should re-apply any service packs and hotfixes then re-install any custom objects that you have that reside in the master database.

Chris

|||

Error 5172 is "The header for file '%ls' is not a valid database file header. The %ls property is incorrect.".

This indicates that you probably could well have a corrupt database. The full message should tell you which database and what property it is objecting to.

Also

What were the messages around this message in the log?|||

Thanks Chris,

I don't have a backup of my master database, only for my user databases.

If i rebuild the master database, can i lose all my DTS and jobs?

|||

In the log appears the next message:

Stack overflow - Dump not possible

I have SP1 in Windows 2003 server and SP4 in SQL Server 2000

|||

I still think that the first error you provided is the biggest clue to the source of the error.

Chris

|||

The jobs and DTS packages are stored in the msdb database, however they will be lost when you rebuild the master database as msdb is also rebuilt.

On this basis I would take copies of the msdb mdf and ldf files before you attempt to rebuild the master database. Once the rebuild has been completed and SP4 has been applied, stop the SQL Server service, rename the newly created msdb data and log files, copy the old (previously copied) files to the same folder then restart SQL Server. This *might* work, however if it doesn't then you'll need to re-instate the newly created data and log files.

Note that DTS packages are stored in msdb.dbo.sysdtspackages so you could actually attach the old msdb files (under a different database name) then use the Import/Export wizard to copy the data into the new msdb database.

Once you've been through the rebuild process I would recommend that, going forward, you take backups of the master and msdb databases on a regular basis.

Chris

|||

I was more interested in the lines before which will tell us what database it was trying to start up when it threw the error. Error messages are much easier to interpret in context.

Microsoft are not charging you by the line here so it is useful to put up at least a few messages either side of the one and if there is a fatal error/stop message it is useful to run to that (as you know that you have all the messages up to the failure. You can clear the IP addresses and server names from the messages if that is sensitive, but the existance and meat of the messages is useful in helping with your problem.

|||In the event viewer it only shows the number error, but in the message log it looks like it was trying to open the master database.|||

In that case, then, it seems like your master database is corrupt.

Chris

No comments:

Post a Comment