数据库文件MDF有问题,100一定给~说给就给~

nvzishanhun123456789 2003-08-29 07:51:56
运行程序:
EXEC sp_attach_db @dbname = N'sy',
@filename1 = N'c:\sydata\sy.mdf',
@filename2 = N'c:\sydata\sy.ldf'


结果
Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'c:\sydata\sy.mdf' is not a valid database file header. The PageAudit property is incorrect.

等待解决方案~100分 (一定给)
...全文
104 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
谢谢各位支持,可还是不行,不过分我还是要给的~
leimin 2003-08-30
  • 打赏
  • 举报
回复
一般这样的问题,你需要重新安装MSSQLSERVER,因为会影响MODEL,MSDB数据库。
leimin 2003-08-30
  • 打赏
  • 举报
回复
sulution:
Remove the DPT Class driver and update to newer version of DPTDISK.SYS(v1.02 contained in the 2.18 version of Storage Manager).

Use the following steps:

1. Go to My Computer – Select C:\winnt\system32\drivers. Once you get to the Drivers directory, select View and then Options. Once the Options windows opens select the View tab. In the Hidden Files box, click Show All Files and then Apply and OK.

2. Locate and right click on the file DPTDISK.SYS in the Drivers directory and select Properties. Under Attributes, if the Read Only box is checked, please uncheck it and click Apply.

3. You will be brought back to the Drivers directory, highlight the file DPTDISK.SYS and press delete. It will confirm that you want to delete the file, answer YES. Close all open windows.

4. Reboot the machine and install updated DPTI2O.sys and DPTDISK.sys driver files from the 2.18 version of Storage Manager.
leimin 2003-08-30
  • 打赏
  • 举报
回复
If you detach the database by using the sp_detach_db stored procedure and then try to attach the database by using the sp_attach_db stored procedure, the following error message may occur:

Server: Msg 5172, Level 16, State 15, Line 1
The header for file 'd:\pubs.mdf' is not a valid database file header. The PageAudit property is incorrect.
The same error messages may also occur with other models of the DPT RAID controller card.
CAUSE
This problem occurs from a particular combination of the firmware version on the DPT controller card and the version of the DPT Performance Enhancing driver, Dptdisk.sys.
WORKAROUND
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

zjcxc 2003-08-29
  • 打赏
  • 举报
回复
试大力的方法,
如果不行,那真的没有什么好办法了.
pengdali 2003-08-29
  • 打赏
  • 举报
回复
新建一同名数据库(文件名,文件组都和原来的一样),然后停止数据库服务,用原来文件替换新建的数

据库文件,启动数据库,该数据库被设未suspect

然后把数据库改成紧急模式:
sp_configure 'allow', 1
reconfigure with override
update sysdatabases set status = 32768 where name = '数据库名'

把LDF文件改名,再执行
DBCC REBUILD_LOG ('数据库名', 'E:\fdzz\database\fdzz1204_Log.LDF' )

恢复数据库紧急模式
update sysdatabases set status = 0 where name = '数据库名'
执行
restore database 数据库名 WITH RECOVERY
sp_configure 'allow', 0
reconfigure with override

然后用DBCC CHECKDB ('数据库名')看看有没有错误

如果上面还是不行,试试吧数据库设为紧急模式,应该可以看到数据了,在把数据导出到一个新的数据库

txlicenhe 2003-08-29
  • 打赏
  • 举报
回复
用企业管理器试试呢?

27,579

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧