How to minimize the transaction log size of K2 Database?
Based on log details provided by my DBA, I noticed the top queries executing in K2 DB belong to schema “Utility”, “Identity” and “Server”. Below are the K2 processes causing the huge transaction log:-
Identity.AcquireLockForIdentity
Server.kLogProcInsts
Identity.ReleaseLockForIdentity
Utility.EncryptionBegin
May I know is there a way that can minimize the transaction log size?
Page 1 / 1
Hello @EricLee
You can shrink the transaction log file if you change the recovery mode from full to simple, using following commands:
2. Can we shrink the K2 database? Will this affect active processes?
Kindly consider archiving old data that is no longer deemed as relevant. Please refer to this KB article on performing a K2 archive for more information: http://help.k2.com/KB000322#
Regards
Elvis
Hi Elvis,
May I know what is the max size limit of the transaction log file that recommended by K2? We would like to schedule task to auto shrink before the it hit the limit.
Regards,
Eric
Hi EricLee,
The installation creates databases with a transaction log size limit of 2TB for K2Server and K2ServerLog
You may also need to consider truncating as well. Please see the following: Database Truncation: http://technet.microsoft.com/en-us/library/ms189085(v=sql.105).aspx * Full Recovery Model: truncation happens during transaction log database backup * Truncation does not reduce the size of a physical log file. Reducing the physical size of a log file requires shrinking the file. For information about shrinking the size of the physical log file, see Shrinking the Transaction Log
This value is automatically set by SQL Server if you create the database using the CREATE DATABASE script without specifying any maximum size.
Since this is done by SQL this is not a limitation of our product. The likelihood of reaching the 2TB Transaction log file is also low in an environment where the databases are backed up regularly.
Kind regards,
Dumisani
As a temporary solution, create schedule job backup transaction database log every one hour, and create another schedule to delete trn files every 5 hours or set time.