Hi All,
I am facing a error while attaching a .mdf file to DB. I am getting an error .mdf is not a primary database file.
When i try to attach using sp_attach_db i get the below error. Is there anyway to recover the file?
exec sp_attach_db 'SPDEV_Content_Portal1','R:\Program Files\Microsoft SQL Server\MSSQL11.ODDEV\MSSQL\Data Encrypt\SPDEV_Content_Portal.mdf',
'T:\Program Files\Microsoft SQL Server\MSSQL12.ONEDATADEV\MSSQL\DATA','T:\Program Files\Microsoft SQL Server\MSSQL12.ONEDATADEV\MSSQL\DATA\SPDEV_Content_Portal_log.ldf'
Msg 824, Level 24, State 6, Line 1
SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x7cb3089c; actual: 0xa4f23959). It occurred during a read of page (0:0) in database ID 0 at offset 0000000000000000 in file 'R:\Program Files\Microsoft SQL Server\MSSQL11.ODDEV\MSSQL\Data Encrypt\SPDEV_Content_Portal.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.
Regards
Rajesh
Rajesh Kumar