none
Content log database will not shrink in size... larger than actual content database

    问题

  • I have followed the instructions here to shrink my database log files. They all shrank except for the content database log, which is 35GB whereas the actual content database is only about 25GB. Aso, per suggestions that I have seen elsewhere, I ran a SQL backup of the content database. Nothing seems to be shrinking this log database. Any ideas? Thanks.
    2012年6月10日 12:19

答案

  • What is your current database recovery mode? You can switch so simple, shrink and switch back to full recovery. I would recommend to take immediate backup after shrinking in simple mode.

    Marek Chmel, WBI Systems (MCTS, MCITP, MCT, CCNA)
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you.

    2012年6月10日 12:50
  • USE SP_DB;
    GO
    -- Truncate the log by changing the database recovery model to SIMPLE.
    ALTER DATABASE SP_DB
    SET RECOVERY SIMPLE;
    GO
    -- Shrink the truncated log file to 1 MB.
    DBCC SHRINKFILE (SP_DB_log, 1);
    GO
    -- Reset the database recovery model.
    ALTER DATABASE SP_DB
    SET RECOVERY FULL;
    GO
    2012年6月10日 14:21

全部回复

  • What is your current database recovery mode? You can switch so simple, shrink and switch back to full recovery. I would recommend to take immediate backup after shrinking in simple mode.

    Marek Chmel, WBI Systems (MCTS, MCITP, MCT, CCNA)
    Please Mark As Answer if my post solves your problem or Vote As Helpful if a post has been helpful for you.

    2012年6月10日 12:50
  • USE SP_DB;
    GO
    -- Truncate the log by changing the database recovery model to SIMPLE.
    ALTER DATABASE SP_DB
    SET RECOVERY SIMPLE;
    GO
    -- Shrink the truncated log file to 1 MB.
    DBCC SHRINKFILE (SP_DB_log, 1);
    GO
    -- Reset the database recovery model.
    ALTER DATABASE SP_DB
    SET RECOVERY FULL;
    GO
    2012年6月10日 14:21