Issue with .ldf file

  • Transaction log of a SQL Server database from growing unexpectedly

    and causing the space issue.

    We then follow these stpes:

    1.Truncate the inactive transactions by taking the transaction log backup.

    2.Shrink the transaction log file

    But Is there any automated way or a stored procedure(scripts) to resolve this issue?

  • jeet_personal (6/20/2009)


    But Is there any automated way or a stored procedure(scripts) to resolve this issue?

    Regular scheduled log backups.

    If you don't need point in time recovery (ie, if you're sure that restoring to the last full backup is acceptable) then switch to Simple recovery and let the log maintain itself.

    Please read through this - Managing Transaction Logs[/url]

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The automated way of handling this is to perform regular transaction log backups. Every hour would be a good start, but you then need to follow up with the business and figure out what an acceptable loss of data is and adjust the frequency of your log backups.

    Review the article I link to in my signature about managing transaction logs.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 3 posts - 1 through 2 (of 2 total)

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