Question : what's holding a shrink in log

there is a need to shrink the log (no truncate only or no_Log ) file; there is ample free space in the file that is not being used. The DB is FULL mode.

but the shrink operation does not happen. Apparently there is something putting off the shrink operation from happening. The log file is 15 GB, only 20 MB used, so I would like to bring the size of the file to 5 GB, and watch how much it grows upto in usedspace between TLBs.

is there a DMV that will help to see what may be holding off the shrink? any other ideas.

i would rather not put the DB in simple mode.

Answer : what's holding a shrink in log

It wont shrink if there is no checkpoint, and some transactions like an unbound update will not perform the checkpoint.

Have a read of : http://www.experts-exchange.com/articles/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Managing-the-Transaction-Log-for-the-Accidental-DBA.html

It is for 2005 and 2008, but also applies to 2000.

If you are asking about DMV's, then assume you are talking about your 2008 Database ?

If migrated from 2000 there was a "bug" with the initial size / growth and requires a bit of manual intervention first.

To get it back into the right way of behaving you might need to truncate.

Assuming it is 2005 / 2008, I would be inclined to use SSMS, right clik on the database, go into tasks, then shrink, then files and select the transaction log from the drop down and use the shrink with reorganising pages. It will show all the stats about size, space, available, etc. Also shows the min size when selecting a new size. Please make sure it is big enough to manage your real transaction log activity.

Have a read of that article above - I know the Author - can recommend him :)
Random Solutions  
 
programming4us programming4us