Quantcast
Channel: SQLServerCentral » SQL Server 2008 » Data Corruption (SS2K8 / SS2K8 R2) » Latest topics
Viewing all articles
Browse latest Browse all 223

log file does not match primary file

$
0
0
Hi,I have a question regarding the error "log file does not match primary file". last month, one of our 2005 databases ( lets call DB1 (simple mode) ) was moved to a 2008 R2 RTM x64 server. One of two people moved it by either restored .bak or copied .mdf & .ldf & attached, but I'm thinking the second. This past Saturday the server rebooted at 6:18am, not a planned reboot, immediately after the database became "inaccessible" and the error "log file does not match primary file" was in the log. We use a third party for backups, all we tried (which are in the form of .mdf & .ldf) would not attach and resulted in the same error. The network guy tried a direct restore through the software and that created a database in suspect mode. When I tried to update it to emergency mode, I got the same error. I tried two ways of creating the database with only the .mdf, both failed with the error message that "the database was not shut down cleanly and there were open transactions or that this could happen because the transaction log was deleted", so database would not create. My question is, can anyone shed any light on what may have caused this? Is there anything I could have done prior to trying the restore or to detect this issue earlier? Is it possible it was an issue from day one that did not pop up until the reboot? I ended up taking a backup of the original database and restoring it on the new server and ran CHECKDB, no errors. So we have data from a month ago, not a big deal for this database but would be a disaster if this happened to something else. Thank you for any guidance here,-karen

Viewing all articles
Browse latest Browse all 223

Trending Articles