• Reply to nkm123 - Sorry, I was not able to reach you via the email you used.

    - - - - - - -

    >>> "Mike Hinds" 2008-04-24 10:29:16 AM >>>

    You are doing well. You are on the right track with INIT.

    Add another job step to the Sunday Full and the Mon-Fri Diff. The code is easy.

    -- Log Init Step

    backup log [test] to [test_Log] with init

    This step must run immediately after the Full or Diff step is completed.

    It empties your log backup device file every day.

    I use backup devices to make coding easier. In SQL 2000 they are in

    Management | Backup, and in SQL 2005 they are in Server Objects | Backup Devices. I name the data device the same as the database, 'Test.Bak' and the log backup device would be 'Test_Log.bak'. If you don't do this you can use the whole path:

    -- Log Init Step

    backup log [test] to disk = 'C:\Log\test_Log.bak' with init

    and this should work just as well.

    Let me know how this works for you.

    Thanks,

    - Mike

    ----------

    Mike Hinds, Database Administrator

    1st Source Bank - IT Technical Services

    PO Box 1602

    South Bend, IN 46634-1602

    >>>

    Hi Mike,

    Sorry for trouble you but when I was going through one of post for

    searching my issue I found solution written by you but thing is that I am

    new and still don't know how to write this code so please help me to write

    this code :---

    Senario:-

    1) Full BackUp :- Every sunday (7PM)

    2) Diff BackUp :- Mon- Sat (7PM)

    3) Trans Log :- 15 min (daily)

    Two folder 1)Data Folder 2) Log Folder

    I append diff backup to Full in Data Folder

    Log files are in Log Folder

    This is same as your case.. But I just want to remove or delete all logs

    when full or diff backup happen... I have seen your answer to use INIT but

    I don't know how to use this .. is any wizard there which will delete or I

    have to use some code in some job...

    Please help me to let me know what code need to be used...

    Dtatabse Name :- Test

    Folder :- DATA and LOG

    Thanks!

    Mike Hinds Lead Database Administrator1st Source BankMCP, MCTS