|
Search:
Advanced search
|
Browse by category:
|
Contact Us |
Shrinking the Transaction Log in SQL Server 2000 with DBCC SHRINKFILE |
|||||
Here I am describing, how to shrink the log file in SQL Server 2000. A shrink operation attempts to shrink the file immediately. However, in some circumstances it may be necessary to perform additional actions before the log file is shrunk to the desired size. When DBCC SHRINKFILE is run, SQL Server 2000 shrinks the log file by removing as many virtual log files as it can to attempt to reach the target size. If the target file size is not reached, SQL Server places dummy log entries in the last virtual log file until the virtual log is filled and moves the head of the log to the beginning of the file. The following actions are then required to complete the shrinking of the transaction log:
NOTE: If the target size is not reached, proceed to the next step. 2. Run this code if you want to truncate the transaction log and not keep a backup of the transaction log. Truncate_only invalidates your transaction log backup sequence. Take a full backup of your database after you perform backup log with truncate_only: BACKUP LOG test WITH TRUNCATE_ONLY The transaction log has now been shrunk to the target size. ![]() |
|||||
Powered by
Deru Communications (Webhosting Knowledgebase)
