We have a Ms SQL database server 2005.
The problem is that the ldf file got too big. And Now the server harddisk is full.
Because of this we can't open or modify the database. 0t is offline so shrink does not work.
How can we solve this problem without damaging the actual data ?
thanks
Thanks but we can not reach the database right now. We have found a way.
We may delete the ldf file and then use sb_attach query to recreate the ldf file.
Our solution work for smaltrivial databases.
But the mdf file size is 30 GB and the ldf file is 140 GB.
We are kind of scary to delete the ldf file :)
Only operation we can do to the database is to detach it. Shrink or etc is not working currently, or back up...
David Todd
Hi,
have you tried
backup log myDatabaseName with truncate_only
and then shrinking the file?
You may need a couple of iterations.
First make sure you have a full-backup. after log is shrunk take full backup.
Cheers
David
parabellum
ASKER
thanks but like i said ,
when i right click my database , back up or shrink is inactive.
so i can not use back up right now.
I have other partitions that have enough disk space.
But i am so afraid of playing with the ldf file. (0f i lost the database that will be a real pain....)
But i see that only way to free up my partition is to somehow delete the ldf file and the use sb_attach.
We may delete the ldf file and then use sb_attach query to recreate the ldf file.
Our solution work for smaltrivial databases.
But the mdf file size is 30 GB and the ldf file is 140 GB.
We are kind of scary to delete the ldf file :)
Only operation we can do to the database is to detach it. Shrink or etc is not working currently, or back up...