How to fix a damaged database

Scenario:
No SQL Server backups, but a file-level backup is available
When you try to attach or restore, you get an error related to log scan number.
Then you try the attach_rebuild_log option, you get an error complaining the server was not cleanly shut down.

Reason:
The file backup did not make the log in consistent state.

Solution: 
Step 1 - Rename the "damaged" mdf and ldf files (e.g., xxxOld.mdf xxx_LogOld.ldf)
Step 2 - Create a new database, but make the logical and physical names the same as the original damaged files.
Step 3 - Take the new database offline(now the database meta-data are in sys.databases)
Step 4 - Rename the two file names to xxxNew.mdf and xxxNew.ldf, and change the two original damaged ones back to the original names.
Step 5 - Try to set the database online,but the database should be in SUSPECT mode
Step 6 - Set the database to EMERGENCY (ALTER DATABASE ...SET EMERGENCY)
Step 7 - Run the script below to rebuild a new log:
ALTER DATABASE Whatever
REBUILD Log ON (Name=YourChoiceLogName, FileName='c:\NewLogFile.log')


Step 8 - It should be in Restricted User mode.set it to Multi_User mode 

The database should be back online now, but you will loose the data not committed to the databases.

Note: This is a recap from Sean McCown's video Watching Hack-attak a damaged DB