June 24, 2002 at 1:05 am
We have a database that is containing a
warehouse.
It's log file has grown to 43 GB .
But it's no need to have it this lagre.
How do I shrink this lagre log file without
doing any harm to the database ?
Jørgensen
Norway
June 24, 2002 at 2:20 am
Hi,
Is the log file backed up? If TLog's are not backed up, they will continue to grow until they eat up all of your disk space! So if you haven't backed it up, thats the first job! This will remove leave only the active portion of the log. If you then go into EM, and view the DB/Log size/usage. You will see how much of the 43GB file is used. You can then shrink the file accordingly using DBCC SHRINKFILE ('MYDB_Log', <Size MB>). The size you shrink the file to depends on how many transactions you will pass through and how often the data is backed up.
Clive Strong
June 24, 2002 at 4:45 am
In a warehouse you should also think about if you need your log files. Our warehouse is updated on a nightly basis and then a backup is taken of the database, therefore no transactions take place on the database. I have now switched the database to recovery model simple and run a maintenance plan each weekend which shrinks the database.
June 24, 2002 at 9:42 am
If the log file doesn't shrink (after following both posts above), there is a script in the library here that will help.
Steve Jones
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply