How to shrink log of mirrored SQL database?

Quick tip for SQL 2008 R2:
1. Full backup your database.

2. Backup transaction logs.

3. Check log file status:
DBCC LOGINFO ("YOUR_DB_NAME")

4. If you found Status 2 in step 3 run:
DBCC SHRINKFILE (YOUR_DB_NAME_log, EMPTYFILE);

5. Repeat step 3 and 4 until you get Status 0.

6. Shrink transaction logs:
DBCC SHRINKFILE("YOUR_DB_NAME_log",1)

2 comments:

  1. Thank you very much. It procedure has helped me.

    ReplyDelete

(c) 2016 www.fedenko.info - Vyacheslav Fedenko