October 30, 2003 at 12:32 am
Our database exists more then 2 years. Now .mdf file is 264 mb and .ldf file 204 mb and is steadily growing. How can I make it small again?
October 30, 2003 at 5:17 am
Perform a transaction log backup and then shrink the file. In BOL, see BACKUP LOG and DBCC SHRINKFILE. Scheduled tran log backups should keep the size under control thereafter.
--Jonathan
--Jonathan
October 30, 2003 at 7:34 am
Thank You
October 30, 2003 at 8:04 am
dbcc shrinkdb also can help u. Check BOL
October 31, 2003 at 12:11 am
Another way is to detach the database, rename or remove the log file and attach again.
When attaching the database, SQL will prompt you to create a new log file.
In this way, your trans log will be only few kb.
Important: Must backup your trans log before doing this
October 31, 2003 at 1:17 am
Are you taking log backups? If not then you should set the recovery model to simple for the database.
I would also recommend changing the recovery model for the model database to simple so that new databases are automatically created with this option.
Cursors never.
DTS - only when needed and never to control.
Cursors never.
DTS - only when needed and never to control.
October 31, 2003 at 4:54 am
I'm very grateful to all who answered
October 31, 2003 at 11:11 am
Exercise care with the database recovery option. Its best to leave this to "Full" for all databases and make regular backups. Change to "Simple" or "bulk Logged" only as necessary for large data loads that can be repeated if necessary.
-Isaiah
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply