SQL SERVER   The header for file Path is not a valid database file header. The  ...
If you are coming to this page by searching, then I am sure that you are in big trouble. I have come across this error and my SQL Server was not getting started. When I looked into ERRORLOG, I found below errors about the PageAudit Property. 2016-12-30 15:45:36.36 spid9s Starting up database ‘model’.
2016-12-30 15:45:36.37 spid9s Error: 5172, Severity: 16, State: 15.
2016-12-30 15:45:36.37 spid9s The header for file ‘C:\Program Files\Microsoft SQL Server\mssql12.DAR_P11D\MSSQL\DATA\model.mdf’ is not a valid database file header. The PageAudit property is incorrect.
2016-12-30 15:45:36.39 spid9s Error: 945, Severity: 14, State: 2.
2016-12-30 15:45:36.39 spid9s Database ‘model’ cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
2016-12-30 15:45:36.39 spid9s SQL Trace was stopped due to server shutdown. Trace ID = ‘1’. This is an informational message only; no user action is required.

So, since the model database was having serious corruption, SQL was not getting started. The error message essentially means that file header has been corrupted and SQL Server is not able to understand it.

WORKAROUND/SOLUTION

In my case since it was model database, there were two possible options.

Get MDF and LDF file from some other server which has “exactly” same version of SQL Server. This would cause to lose data from the previous model database and will get it from another server. If we have a backup of the model and we wish to restore it first, then we need to rebuild system databases using the setup.exe command line. Before rebuilding, we need to keep a copy of MSDB and MASTER database files. As soon as we rebuild, all system database would be as fresh as new installations. After rebuilding, we can restore backups and bring SQL back to life.

After I followed option 1, SQL Server came back online, but SQL Agent was giving trouble. I looked into SQLAgent.out file and here was the information.

2016-12-30 17:04:25 ? [100] Microsoft SQLServerAgent version 12.0.2269.0 (X64 unicode retail build) : Process ID 83880
2016-12-30 17:04:25 ? [495] The SQL Server Agent startup service account is NT Service\SQLAgent$SAPSQL.
2016-12-30 17:04:25 ? [393] Waiting for SQL Server to recover database ‘msdb’…
2016-12-30 17:04:25 ? [101] SQL Server version 12.00.2269 (0 connection limit)
2016-12-30 17:04:25 ? [102] SQL Server ODBC driver version 11.00.2100
2016-12-30 17:04:25 ? [103] NetLib being used by driver is DBNETLIB; Local host server is CLD-SQL01\MIMECAST_MSO
2016-12-30 17:04:25 ? [310] 8 processor(s) and 17970 MB RAM detected
2016-12-30 17:04:25 ? [339] Local computer is CLD-SQL01 running windows NT 6.2 (9200)
2016-12-30 17:04:25 ! [000] SQLServerAgent cannot start because the msdb database is not available for normal access
2016-12-30 17:04:25 ? [000] Configuration option ‘show advanced options’ changed from 0 to 1. Run the RECONFIGURE statement to install. [SQLSTATE 01000] (Message 15457) Configuration option ‘Agent XPs’ changed from 1 to 0. Run the RECONFIGURE statement to install. [SQLSTATE 01000] (Message 15457) Configuration option ‘show advanced options’ changed from 1 to 0. Run the RECONFIGURE statement to install. [SQLSTATE 01000] (Message 15457)
2016-12-30 17:04:25 ? [098] SQLServerAgent terminated (normally)

If you read through above lines, it is easy to identify that below is the cause:

SQLServerAgent cannot start because the msdb database is not available for normal access

When I connected to SQL Server, I found that MSDB database was in suspect state. So, I need to restore that from the backup.

If you ever face error mentionedin a blog title, restore from backup is the only option left. If you find some other solution, please share via comments.

Reference: Pinal Dave ( https://blog.sqlauthority.com )

本文数据库(mssql)相关术语:熊片数据库 mssql数据库 oracle数据库 pubmed数据库 access数据库 万方数据库

主题: SQLSQL ServerSAPWindowsUTTI
分页:12
转载请注明
本文标题:SQL SERVER The header for file Path is not a valid database file header. The ...
本站链接:http://www.codesec.net/view/531660.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 数据库(mssql) | 评论(0) | 阅读(36)