August 26

MSSQL: Shrink a DB transation log

MSSQL shrink a DB transation log
Start the SQL Query tool
Tool – SQL Query Analyzer

1. Type: BACKUP LOG <database name> WITH TRUNCATE_ONLY
2. Execute the command with the play button >

The database will is now flush, but it still need to have the size reduce
3. Shrink the database: Right Click the Database – All Tasks – Shrink Database
4 Click OK

The Shrink Command line is: DBCC SHRINKFILE(DatabaseName_log,2

Copyright 2021. All rights reserved.

Posted August 26, 2011 by Timothy Conrad in category "Databases

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B