Solved

logs files D:\Program Files\Commvault\ContentStore\Data\CommServ\cx_log1.ldf consuming more than 600Gb how to trim the size

  • 6 January 2022
  • 5 replies
  • 1883 views

Badge +3

Hi all

i found a large files in commvault installation path, 

D:\Program Files\Commvault\ContentStore\Data\CommServ\cx_log1.ldf consuming 600Gb 

how do i trim the size? appreciate all the help.

 

thanks

 

icon

Best answer by dingdong 6 January 2022, 10:46

View original

5 replies

Userlevel 7
Badge +15

Hi @dingdong 

Thanks for raising this question!

cx_log1.ldf is the SQL log file for the Commserve database.

If you’re finding SQL database files are consuming large amounts of disk space unexpectedly, try running DBMaintenance -full that will perform a shrink operation on the database.

Please note, this is an intensive task and it is recommended to stop Commserve services before running DBMaintenance -full.

Depending on the workload involved and time since last maintenance, this could an extended period of 30 minutes or more for large, fragmented databases, so you should plan for this maintenance task.

Performing CommServe Database Maintenance Using the DBMaintenance Utility

Progress can be tracked in dbmaintenance.log.

Thanks,

Stuart

Badge +3

 

Hi @dingdong 

Thanks for raising this question!

cx_log1.ldf is the SQL log file for the Commserve database.

If you’re finding SQL database files are consuming large amounts of disk space unexpectedly, try running DBMaintenance -full that will perform a shrink operation on the database.

Please note, this is an intensive task and it is recommended to stop Commserve services before running DBMaintenance -full.

Depending on the workload involved and time since last maintenance, this could an extended period of 30 minutes or more for large, fragmented databases, so you should plan for this maintenance task.

Performing CommServe Database Maintenance Using the DBMaintenance Utility

Progress can be tracked in dbmaintenance.log.

Thanks,

Stuart

 

hi Stuart,

thank you for your advise… will schedule the maintenance…

 

regards

Ding

Userlevel 1
Badge +1

Hi Ding,

I suspect there is no backup configured for the commServ database.

To check the most recent backup https://www.sqlshack.com/sql-server-database-backup-and-restore-reports/

Run the query to understand the log usage

select * from sys.dm_db_log_space_usage 

Based on the log consumption, perform the below operation:

For example, used_log_space_in_percent as large size of the database then follow the below steps:

  1. Change the recovery model of the database to SIMPLE
  2. Shrink the log file
  3. Change the recovery model back to FULL
  4. Initiate a FULL backup

 

        ALTER DATABASE CommServ

        SET RECOVERY SIMPLE

        GO

        DBCC SHRINKFILE (cx_log1, 100)

        GO

        ALTER DATABASE CommServ

        SET RECOVERY FULL

If not,

  1. Initiate T-Log backup
  2. Shrink the log file

I would recommend to follow the steps mentioned by Stuart.

whatever I mentioned its more towards analyzing and fixing the large log file issue.

Thanks,

Prashanth

 

Badge +3

Hi @dingdong 

Thanks for raising this question!

cx_log1.ldf is the SQL log file for the Commserve database.

If you’re finding SQL database files are consuming large amounts of disk space unexpectedly, try running DBMaintenance -full that will perform a shrink operation on the database.

Please note, this is an intensive task and it is recommended to stop Commserve services before running DBMaintenance -full.

Depending on the workload involved and time since last maintenance, this could an extended period of 30 minutes or more for large, fragmented databases, so you should plan for this maintenance task.

Performing CommServe Database Maintenance Using the DBMaintenance Utility

Progress can be tracked in dbmaintenance.log.

Thanks,

Stuart

i just run the DBmaintenace , the log shrunk Thanks  @Stuart Painter 

Badge +3

Hi Ding,

I suspect there is no backup configured for the commServ database.

To check the most recent backup https://www.sqlshack.com/sql-server-database-backup-and-restore-reports/

Run the query to understand the log usage

select * from sys.dm_db_log_space_usage 

Based on the log consumption, perform the below operation:

For example, used_log_space_in_percent as large size of the database then follow the below steps:

  1. Change the recovery model of the database to SIMPLE
  2. Shrink the log file
  3. Change the recovery model back to FULL
  4. Initiate a FULL backup

 

        ALTER DATABASE CommServ

        SET RECOVERY SIMPLE

        GO

        DBCC SHRINKFILE (cx_log1, 100)

        GO

        ALTER DATABASE CommServ

        SET RECOVERY FULL

If not,

  1. Initiate T-Log backup
  2. Shrink the log file

I would recommend to follow the steps mentioned by Stuart.

whatever I mentioned its more towards analyzing and fixing the large log file issue.

Thanks,

Prashanth

 

hi @Prashanth Jayaram , at first i am about to run it from the management studio, but concern if the log mght be used or monitored by the Commvault systems.  thanks a lot

regards

 

Ding

Reply