Discussion Locked

Ditto~! I need a bit of SQL help

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

The sql db is way too large.
The mdf is 14.5GB and the ldf is 314GB.
I need to reduce the size of this before I run out of space.
There's no space gained in Shrink so now what?
Thank you

7 replies

by puppybreath

the commands are:

backup log db1 with truncate_only

note: db1 is the database name **** Run this first ****

dbcc shrinkfile (db1_log,1)

note: db1_log is the name of the log file - the 1 tells it to shrink the log file to 1 MB

by puppybreath

If you get the expected results, you can always build an automated task later.

BTW, make sure you have a current backup before trying this. I've never had it fail or corrupt anything but I'd rather be safe than sorry.

by puppybreath

You would have to determine which records you want to delete and then remove them using a SQL query.

This discussion is closed to new replies.