January 20, 2015 at 4:24 am
Hi Everybody,
Please how do i recover from this error while trying to attach my database:
Could not open new database 'MediaMonitoring'. Create database is aborted
msg 9003, level 20, state 1, line 1
The log scan number (993799:2191:1) passed to log scan in database 'MediaMonitoring' is not valid. This error may indicate data corruption or that he log file (.ldf) does not match the data file (.mdf).
Please i don't have a backup for the database and the database is quite large about 18gb.
Please what can i do.
Thanks
Tim
January 20, 2015 at 4:41 am
If your database is not production than you can attached mdf file without any ldf file and it will automatically take care of creating new ldf file. check following link for further detail
HTH
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
January 20, 2015 at 4:54 am
free_mascot (1/20/2015)
If your database is not production than you can attached mdf file without any ldf file and it will automatically take care of creating new ldf file. check following link for further detailHTH
Thanks free_mascot,
tried your link, but its still bringing the same error above
what should do next
Thanks
Tim
January 20, 2015 at 5:24 am
free_mascot (1/20/2015)
If your database is not production than you can attached mdf file without any ldf file and it will automatically take care of creating new ldf file.
No, it won't.
SQL can only recreate a log file if the database was cleanly shut down prior to the log being deleted/lost. If there are errors about log scan or missing ldf, then the database was not cleanly shut down and the log cannot be recreated automaticallu
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 20, 2015 at 5:25 am
timotech (1/20/2015)
Hi Everybody,Please how do i recover from this error while trying to attach my database:
Could not open new database 'MediaMonitoring'. Create database is aborted
msg 9003, level 20, state 1, line 1
The log scan number (993799:2191:1) passed to log scan in database 'MediaMonitoring' is not valid. This error may indicate data corruption or that he log file (.ldf) does not match the data file (.mdf).
No backup, mis-matched log file?
How much of that database are you willing to lose?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 20, 2015 at 8:05 am
GilaMonster (1/20/2015)
timotech (1/20/2015)
Hi Everybody,Please how do i recover from this error while trying to attach my database:
Could not open new database 'MediaMonitoring'. Create database is aborted
msg 9003, level 20, state 1, line 1
The log scan number (993799:2191:1) passed to log scan in database 'MediaMonitoring' is not valid. This error may indicate data corruption or that he log file (.ldf) does not match the data file (.mdf).
No backup, mis-matched log file?
How much of that database are you willing to lose?
Well, its not the way you're viewing it, there's actually a backup, but its back dated to september last year, but any solution will be appreciated.
Thanks
Tim
January 20, 2015 at 12:11 pm
Can you restore a backup?
If so, do so.
If not, you'll have to hack the DB into the server and repair it, you may lose data, you may lose transactional consistency, you may loose referential integrity, it may not work at all.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 20, 2015 at 2:44 pm
GilaMonster (1/20/2015)
Can you restore a backup?If so, do so.
If not, you'll have to hack the DB into the server and repair it, you may lose data, you may lose transactional consistency, you may loose referential integrity, it may not work at all.
how do i hack the DB?
January 21, 2015 at 1:52 am
I'm going to assume by that question that you don't have a backup.
If you do have a backup you can restore, please rather do that.
The hack is on Paul Randal's blog post - http://www.sqlskills.com/blogs/paul/disaster-recovery-101-hack-attach-a-damaged-database/
Please note, it is not guaranteed to work. It's a last resort for when there's no backup, the database is damaged and the owner of the DB is happy with potentially inconsistent data in the database after it is repaired. If it works, you should check for rows in violation of foreign keys and other logical data problems.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 19, 2020 at 10:12 am
http://www.stellarinfo.com/blog/attach-sql-database-without-transaction-log-file/
Is there any other option?
SQL Database Recovery Expert 🙂
Viewing 10 posts - 1 through 9 (of 9 total)
You must be logged in to reply to this topic. Login to reply