SQL Server Performance

xp_sqlmaint

Discussion in 'General Developer Questions' started by aaditya2000, May 16, 2006.

  1. aaditya2000 New Member

    I need help to write Transaction Log BACKUP JOB with the help of xp_sqlmaint. i try to gather require information, but some how it is not working. i will appreciate if some one can help me to put all together.
    I am trying to do is to create transaction log backup job which runs every hour & delete any 2 or 3 days older Transaction log so to maintain log size smaller.Any help will be highly appreciated.
  2. thomas New Member


    exec xp_sqlmaint ' -S SERVERNAME-D Northwind -BkUpLog c: emp -CrBkSubDir -BkUpMedia DISK -DelBkUps 2days -Rpt C: empNwind_bkuplog.txt'

    This is assuming you are using Windows Authentication (omits -U username -P password)
  3. satya Moderator

    ... you would get the syntax information from the command prompt by typing xp_sqlmaint /?.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page