Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 DBCC SHRINKFILE

Author  Topic 

dewacorp.alliances

452 Posts

Posted - 2006-12-03 : 01:30:01
Hi all

I got the following database that has:
Data: 7147.69 MB Used Space, 783 Free Space
Tlog: 105.MB Used Space, 6500 Free Space

Before I define the 'managed' size for TLog, I normally sets the Tlog as 10% first by doing DBCC Shrinfile for the TLOG and then let the Index Defrag/Reindex kick in and then will know how much TLog will be.

So when I ran DBCC Shrinkfile for TLOG for instance:
DBCC SHRINFILE ('XXX', 790) ---> 10% of Data

The TLOG doesn't want to change to 790 and instead having 3,500 MB.

So then I ran EXECUTE sp_spaceused @updateusage = 'true' against that DB.

Then I run again the DBCC SHRINFILE ('XXX', 790) and it did change the size that I want but I notice that TLOG becoming:
23.79MB used space and 766MB free space.

How come the used space is moved from 105.MB to 23.79.MB? Is this DBCC SHRINKFILE truncate the log by default? Can someone clarify me on this? Also, when this routine happening NO TLOG backup is happening.

Thanks




   

- Advertisement -