I've deleted my SQL 2005 log file, am I messed? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

I’ve deleted my SQL 2005 log file, am I messed?

Ok, after seeing that my sql 2005 log file was taking up 190 gigs of hard drive space, and after I went and tried to make the files smaller, without success I decided that since its just a log file, that I should delete and recreate an empty log file to start over. Low and behold I cant do that. I’ve tried to copy an empty log file from another SQL database without success. Did I delete all my data?
Am I really, really screwed? My regular data file is 5 gigs in size
When you detach your db properly, delete on the OS level the log and then attach the db referencing only the MDF file, SQL Server will complain about the missing log, but should attach the db. But you should see thsi as a kind of brute-force method to shrink the log. Normally you would back it up regularly and take care of the size. —
Frank Kalis
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
quote:Originally posted by FrankKalis When you detach your db properly, delete on the OS level the log and then attach the db referencing only the MDF file, SQL Server will complain about the missing log, but should attach the db. But you should see thsi as a kind of brute-force method to shrink the log. Normally you would back it up regularly and take care of the size. —
Frank Kalis
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
Heute schon gebloggt?http://www.insidesql.de/blogs
I was able to physically see the datafile through SQL, it just wouldnt open up tables etc.
Log file means SQL database file or error log file?
Can you see any error on the error log file?
Have you restarted the SQL server services? Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
quote:Originally posted by satya Log file means SQL database file or error log file?
Can you see any error on the error log file?
Have you restarted the SQL server services? Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
http://www.SQL-Server-Performance.Com
This posting is provided �AS IS� with no rights for the sake of knowledge sharing.

What I deleted was the database.ldg file which was at 190 + gigs and growing. What I have is the databse.mdf file which is nearly 6 gigs
What kind of recovery model do you have in that database? Luis Martin
Moderator
SQL-Server-Performance.com All in Love is Fair
Stevie Wonder
All postings are provided “AS IS” with no warranties for accuracy.
]]>