DB CM_log.ldf with large size

Lazher YAAKOUBI 381 Reputation points
2021-11-04T19:00:52.04+00:00

Hi,

I have sccm in the Always On availability group, the CM database size = 5GB but the log file CM_log.ldf = 50GB,

how can i reduce the size?

thanks.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,710 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,552 questions
{count} votes

Accepted answer
  1. AmeliaGu-MSFT 13,961 Reputation points Microsoft Vendor
    2021-11-05T09:20:14.947+00:00

    Hi LazherYAAKOUBI-7887,
    If the database is in full recovery mode, the virtual log file cannot be reused if it has not been backed up. This may cause the log_reuse_wait_desc column to report the LOG_BACKUP value.
    Please take log backup of the database in the primary replica. And you must have created at least one full backup before you can create any log backups.
    Please refer to Create a Full Database Backup and Back Up a Transaction Log which might be helpful.
    Once log backup completes, you can consider to shrink the log file to reduce size:

    DBCC SHRINKFILE(FILENAME,SIZE(MB))  
    

    Please check this doc.
    Best Regards,
    Amelia


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful