Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    35

    Unanswered: Log shipping: Clean up log files

    Hi,
    I need some advise in the log shipping. The log files in the primary server get cleaned up according to what I have specified in the maintenance plan. But the log files that got shipped to the secondary server stay there for ever wasting my hard disc. Will it make any problem if I remove them or can I set it up to remove all files earlier than past 2 hrs? Please advise.
    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    When log shipping, you can delete all of the logs that arrive before the most recent full backup arrives. So if you get a full backup every day at 02:00 and a log file sent every hour, when the new full backup arrives you can delete all 23 of the existing log files.

    -PatP

  3. #3
    Join Date
    Jan 2004
    Posts
    35
    I do not get full backup everyday. The full backup came only once when I started the log shipping for the first time and then it is all just the transaction log files. Since I never get full backup anymore, can I remove all log files except the latest one?

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The way that log shipping works is that you restore a full backup, then apply each log file in order to the database. Each of the log files effectively brings the database "up to the moment" that the log file was finished. If you encounter even one missing log file, you are done, you can't restore any more.

    The short answer is that you need to keep your most recent full backup, plus all of the log files generated since then.

    -PatP

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    You can get a great overview of log shipping at Microsoft's Tech-Net web site.

    -PatP

  6. #6
    Join Date
    Feb 2004
    Location
    india
    Posts
    67
    hi,
    I had the same problem and i found a solution
    use obsolete.exe ( a free utility to delete files more than n days)

    Rgds
    VRSrinivas

  7. #7
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Make sure to test such third party tools before implementing on production SQL server.

    http://www.sql-server-performance.co...g_shipping.asp to explain more about LS>
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •