Log size growing very fast

  • NOTHING

    CHECKPOINT

    LOG_BACKUP

    NOTHING

    REPLICATION

    NOTHING

    CHECKPOINT

    NOTHING

    NOTHING

    REPLICATION

    REPLICATION

    This is the result I get, when I try this,

    SELECT name

    FROM sys.database_files

    WHERE type_desc = 'LOG'

    DBCC SHRINKFILE ('XYZ_Log', 1000)

    DBCC SHRINKFILE(XYZ_Log)

    size keep on growing

  • How to fix it please?

  • can I get a syntax to check the data file size and log file size please,

  • bubby (3/3/2014)


    can I get a syntax to check the data file size and log file size please,

    sp_helpdb dbnamehere

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Thanks

  • Issue: XYZ database (log) size was growing very fast, after any maintenance task was carried such as indexing or shrink log file,

    Problem: The Size would grow out of control

    Resolution: Following steps were followed to come to the resolution,

    1.Below command to see the details of log_reuse_wait_description,

    SELECT [log_reuse_wait_desc]

    FROM [master].[sys].[databases]

    --WHERE [name] = N'DB_Name';

    2.Change the database for Replication, or remove the replication,

    sp_removedbreplication 'XYZ'

    go

    3.Then shrink the database

    SELECT name

    FROM sys.database_files

    WHERE type_desc = 'LOG'

    DBCC SHRINKFILE ('XYZ_Log', 100)

Viewing 7 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic. Login to reply