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.
| Author |
Topic |
|
ann06
Posting Yak Master
171 Posts |
Posted - 2008-10-11 : 08:12:29
|
| I have a database test size shown in the properties box is 39718 mb and space available is 37406 mbthe datafile is 820 mb and the logfile is 38900i tried to make the truncate then shrink for the log but its not releasing the space occupied shrink file for log is showing current size is 38899 mb, space used is 48 mbi also ran the dbcc shrink (test) and its not releasing the space in the log file i also tried to do the truncate then shrink its not releasing the spacewhy it is not shrinking the log file although nobody is using the database? |
|
|
SimpleSQL
Yak Posting Veteran
85 Posts |
Posted - 2008-10-11 : 11:19:07
|
| Try DBCC SHRINKFILE, it is possible you have a active VLF (Virtual Log file) at the end of the transaction log, causing it not to shrink. |
 |
|
|
ann06
Posting Yak Master
171 Posts |
Posted - 2008-10-13 : 02:55:07
|
| I tried this also with no success, anyway i just changed to recovery model to simple it shrinked i don't know if it was virtual log file activeThanks |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-13 : 03:06:16
|
The log file size (physical) and log file content are two separate things.See log file as a suitcase when going on vacation.If you have packed your suitcase (log file) with 6 shirts and you decides to use a smaller suitcase (shrink log file), you can't! The 6 shirts will not fit into the new suitcase.You will either have to unpack the shirts and put them on the bed (backup log file), before getting a smaller suitcase from closet. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|