Shrinking db_ControlManager_Log.ldf Using SQL Commands

  1. Backup the Control Manager database using the SQL Server Management Studio.
  2. From the available databases, select the db_ControlManager database.
  3. Execute the following SQL Script:
    DBCC shrinkfile('db_ControlManager_log', 10)
  4. Verify the size of db_ControlManager_Log.LDF is less than 10MB.

    If db_ControlManager_Log.LDF was not reduced in size, use the following SQL command to identify the Database Recovery Mode used:

    SELECT name as DatabaseName, DATABASEPROPERTYEX(name, 'Reco
    very') as RecoveryMode FROM master.dbo.sysdatabases where n
    ame='db_ControlManager'

    If the Database Recovery Mode is FULL, execute following SQL script:

    -- Truncate the log by changing the database recovery model
     to SIMPLE.
    ALTER DATABASE db_ControlManager
    SET RECOVERY SIMPLE;
    GO
    -- Shrink the truncated log file to 10 MB.
    DBCC SHRINKFILE (db_ControlManager_Log, 10);
    GO
    -- Reset the database recovery model.
    ALTER DATABASE db_ControlManager
    SET RECOVERY FULL;
    GO
    

    For detailed information on shrinking SQL databases and SQL commands, refer to the Microsoft SQL Server Administration documents.