Error 9004 means an error occurred while processing the log for database, so it will not attach. Here are the steps that worked for me, starting with emergency mode.
SQL SERVER – 2008 – Introduction to Row Compression
Row Compression in SQL Server 2008 stores zero and null values without using disk space. Check the savings first with sp_estimate_data_compression_savings.
SQL SERVER – 2008 – Introduction to New Feature of Backup Compression
SQL Server 2008 adds Backup Compression. I back up AdventureWorks with and without compression, compare file sizes and show how to turn it on at server level.
Three Scripts for a First Look at Any Server
A first look at any server needs three read-only T-SQL checks: configuration, databases and backups, and current activity.
Untested Backup: The Joke That Ends With a Resignation Letter
An untested backup is the darkest joke in the DBA world. Here’s how the story usually ends, and the simple restore drill that keeps you out of it.
SQL SERVER – 2005 – Restore Database Using Corrupt Datafiles (.mdf and .ldf) – Part 2
A last resort for corrupt datafiles with no backup: emergency mode, single user, then DBCC CHECKDB with repair_allow_data_loss. Back up the files first.
SQL SERVER – 2005 – Restore Database Using Corrupt Datafiles (.mdf and .ldf)
Can you restore database using corrupt datafiles when there is no full backup and both .mdf and .ldf are damaged? My honest answer and the one thing to try.






