Question How to shrink the Notification Server transaction log?
The Altiris database can get too large, sometimes this is because the transaction log has grown exponentially. Often the transaction log will be around 500 meg in size. The default transaction log for Notification Server is Altiris_log.ldf.
Check to see if the recovery method being used is Simple and not Full. Generally a database that is truly in simple recovery mode should not ever have a large transaction log file; however if the database had been in Full recovery mode, before it will actually switch to the simple recovery mode, a full backup of the database is required. Until the full backup is finished the database will continue to run in its original recovery mode.
Sometimes a transaction log gets too large and must must be manually cleaned out. The following script will clean out the completed transactions out of the log and then attempt to shrink the log to its original size. It may be required to run the script a second time after a few minutes as some active transactions may be lingering and prevent the full shrink
Notification Server 6.X
BACKUP LOG "Altiris" WITH TRUNCATE_ONLY DBCC Shrinkfile('Altiris_Log',truncateonly)
Notification Server 7.X
BACKUP LOG "Symantec_CMDB" WITH TRUNCATE_ONLY DBCC Shrinkfile('Symantec_CMDB_Log',truncateonly)
If the original transaction log is still too big, it may be that the "original" size of the log was set to the higher size. The following command will reset the log size to 10MB (10 is just an example, but don't set smaller than 2MB).
In order to avoid the same issue in the future, schedule full backup and either switch the database to Simple Recover mode (don't forget to do a full database backup after switching) or schedule additional database transaction log backups. This will keep transactions cleaned out of the log making room for new transactions so that the log size will not be forced to grow.
Imported Document ID: HOWTO1752
Subscribing will provide email updates when this Article is updated. Login is required.