1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This message will disappear after you have made at least 12 posts. Thank you for your cooperation.

How can I exclude a single database from a TDP MSSQL backup?

Discussion in 'TSM Client' started by foobar2devnull, Mar 14, 2011.

  1. foobar2devnull

    foobar2devnull New Member

    Joined:
    Nov 30, 2010
    Messages:
    95
    Likes Received:
    1
    Occupation:
    System and Backup Administrator
    Location:
    Belgium
    Linux TSM Server 6.2.2.0 - TSM Client 6.2.2.0 - TDP MSSQL 5.5.4.2

    Hi all,

    I had the following lines in my dsm.opt file
    Code:
    INCLUDE "\...\meta\...\*" 
    INCLUDE "\...\data\...\*" 
    EXCLUDE "\...\master\...\log*"
    EXCLUDE "\...\msdb\...\log*"
    A couple of databases can not be backed up due to structural errors so I decided to exclude them by adding the following two lines at the end of the one listed above

    Code:
    EXCLUDE "\...\db1\...\*"
    EXCLUDE "\...\db1-prd\...\*"
    but it still looks like they are being backed up:

    Code:
    03/13/2011 22:03:10 Backup of SQL Database db1 will not be attempted.
    03/13/2011 22:03:10 ACO5422E Received the following from the MS SQL server:
    03/13/2011 22:03:10 Specified cast is not valid. (HRESULT:0x80004002)
    03/13/2011 22:03:10 Backup of SQL Database db1-prd will not be attempted.
    03/13/2011 22:03:10 ACO5422E Received the following from the MS SQL server:
    03/13/2011 22:03:10 Specified cast is not valid. (HRESULT:0x80004002)
    So I'm clearly not doing it properly. How would you do it?
     
    Last edited: Mar 14, 2011
  2.  
  3. Trident

    Trident Senior Member

    Joined:
    Apr 2, 2007
    Messages:
    279
    Likes Received:
    26
    Occupation:
    IT operations
    Location:
    Oslo, Norway
    Hi,

    Try this
    tdpsqlc backup * full /excludedb=db1,db2,db3
    tdpsqlc backup * log /excludedb=db1,db2,db3
     
    foobar2devnull likes this.
  4. foobar2devnull

    foobar2devnull New Member

    Joined:
    Nov 30, 2010
    Messages:
    95
    Likes Received:
    1
    Occupation:
    System and Backup Administrator
    Location:
    Belgium
    Thanks for your help Trident and sorry for the late reply, I was on a TSM course last week.
    The fault was mine, I was excluding a directory rather than simply excluding the db file name

    so I replaced:
    EXCLUDE "\...\db1\...\*"
    with:
    EXCLUDE "\...\db1.*"
    On a side note though, can the command line option excludedb be found in the tdp.opt file?

    Thanks.
     
  5. Trident

    Trident Senior Member

    Joined:
    Apr 2, 2007
    Messages:
    279
    Likes Received:
    26
    Occupation:
    IT operations
    Location:
    Oslo, Norway
    I do not think you can use the excludedb parameter in dsm.opt

    I have only seen it with tdpsqlc.
     
  6. Tyrese

    Tyrese New Member

    Joined:
    Oct 1, 2011
    Messages:
    5
    Likes Received:
    0
    This looks about right. This is how I would do it. However, I am running into some real coding issues on a payroll utility that I am working on...(very similar to Paycor), and I could really use some help. I do not wish to discuss the nature of my problem publicly, since I need to keep this project under wraps for the time being until it is ready to launch, so it would be great if someone who is knowledgeable can contact me privately. Thank you.
     
    Last edited: Oct 25, 2011

Share This Page