Guys, Recently i came across a situation where the log file of an SQL Server Std 2008 database got corrupt. i was unable to view the database properties and contents. I did the following: 1. Detach the corrupted database 2. Create a new Database with the same Name, and same data file name 3. Stop Sql Server service 4. Replace the new data file with the Old file 5. Start SQL Server 6. Database is started in Suspect Mode 7. Set the Databse in Emergency Mode 8. Set Database in Single User Mode 8. Run DBCC CheckDB Repair Allow Data Loss 9. ReStart SQL Server Service 10. Set the DB back to MultiUser Mode. Hope this helps.
But you will have to be aware of the implications of it. Since a new log file is being built for the new database the recovery process will not occur and data may not consistent (business aspect) always. Though ofcourse this is the only way possible.
Refer to this http://sqlserver-qa.net/blogs/tools...-no-transaction-log-file-sql-server-2005.aspx blog post ...explaining the reasonse and steps.
this worked for me EXEC sp_resetstatus "yourDBname"; ALTER DATABASE "yourDBname" SET EMERGENCY DBCC checkdb("yourDBname") ALTER DATABASE "yourDBname" SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB ("yourDBname", REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE "yourDBname" SET MULTI_USER i create the db with same name , stop sqlservice and replace both db and log file and then run this