November 24, 2005 at 11:57 pm
Hi all
I created a database 6 months ago with unlimited file growth option
The primary file size is 500 MB but the transaction file size is more than 5 GB
Shrink database / DBCC shrinkdatabase works but it does not frees much space
How can I make it around 1 GB
Thanks
AB
November 25, 2005 at 12:25 am
AB
Once you have shrunk the database you will need to shink the file to free up the space
dbcc shrinkfile (<t-log>, 500) -- shinks the t-log to 500Meg in sise
Hope this helps...
Ford Fairlane
Rock and Roll Detective
November 25, 2005 at 2:27 am
1. detach database
2. attach database without log file
3. change database recovery option to simple
November 25, 2005 at 3:01 am
Or simpler. Change the recovery model to Simple. Backup the database and shrink the file!
November 27, 2005 at 12:14 am
If you need to be able to recover your database you shouldn't change the recovery model to Simple. Just do the following:
1. Make full backup of your database
2. Make transaction log backup. This will reduce your transaction log
Generally it is very good sometimes to look through Books Online
November 27, 2005 at 11:14 pm
Hi Guys
Thanks for your advice.
The problem has been solved now.
I actually did this ...
Thanks
December 1, 2005 at 3:12 pm
Another simple way without having to detach/attach
1. BACKUP LOG dbname WITH NO_LOG
2. DBCC SHRINKFILE (log_name, size in MB, truncateonly)
3. Take a full backup immeditely and setup trans log backups on schedule.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply