Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 7696

Unable to Restore Database .bak file and the backup with verify fails

$
0
0

I'm having a nasty issue with a SQL 2000 server that has been migrated into a 2008 R2 environment. Something was done at some point to the database where there is an NDF file that is in a defunct state. I am not sure if this is the direct cause of the problem I have but it is the only issue I have found outstanding.

I inherited an environment when a RAID was failing on a 2000 Windows Server with SQL 2000. I created a .bak file of the database and tried to restore that .bak file on the new 2008 R2 server but it did not work. Ultimately, I ended up copying the .mdf and .ldf file and was able to get it to mount as a new database on the new server. Since then all operations are working successfully and the database is great. I created a backup plan and it ran successfully for over a week.

I then decided to check and verify that the database is actually restorable. When I tried to restore the .bak file to a test database, I got the error:
"Restore failed for Server 'servername'
System.Data.SqlClient/SqlError: The media family on device 'D:\Backup Folder\Database\database_live.bak' is incorrectly formed. SQL Server cannot process this media family. "

I ran the query:
SP_HelpDB TMW_Live
This generated 1 database name and then 3 files. The .mdf and ldf file. Then a TSFirstDBase file that has a location that did not exist on the old (or new server) e:\mssql7\data\TSFirstDabase_Data.ndf

filegroup is NULL and all size data is 0 KB (usage: data only)

I ran:

select * from sys.database_files; ## results:
The NDF file is in state_desc defunct.

It seems that this file is no longer used but is still locked to the database somehow. Could this be the culprit of my backup issues? If so, how could I unlink this file to the database?


Viewing all articles
Browse latest Browse all 7696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>