Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: TSM server

  1. #1
    Join Date
    Jun 2009
    Posts
    272

    Unanswered: TSM server

    we currently use TSM for our backups. We totally have two different TSM servers. Our test backups point to TSMserver1 and Production backups point to TSMserver2.
    When I do a redirected restore from production to test, I need to change the TSM server of the test databse to point to TSMServer2 in the dsm.opt file and give the db2adutl grants for the production backup so that the test server could see it. After that I can run a restore on test database.

    Is there anyway to do the redirected restore without changing the TSM server ?

  2. #2
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    According to IBM DB2 9.5 Information Center for Linux, UNIX, and Windows

    dsm.sys needs to be updated if you're using passwordaccess=prompt
    Last edited by db2girl; 04-08-10 at 23:47.

  3. #3
    Join Date
    Jun 2009
    Posts
    272
    In the link which you provided its been talked about "password = prompt" and "password = generate" environments. Our environment is "password = genearte" environment but we have two different TSM servers . The tsm server name is provided in dsm.opt file.

    Considering the first example "password = generate" in the link which you provided, the node dps could read the backups, logs and load copy images of the first db zample by this command "db2adutl query db zample nodename bar owner roecken" provided db2adutl grants are granted and both the nodes have a setting of the same TSM server in dsm.opt file.


    My question is what if node BAR has the TSM setting of TSM server1 and node dps has the setting of TSM server2 in dsm.opt ? All I do is to change the setting of node dps to point to TSM server1 after which dps could read the backups of zample database. But is there any other way this can be accomplished without changing the TSM server in dsm.opt file

  4. #4
    Join Date
    Jan 2010
    Posts
    335
    I think you can override the settings in th dsm.opt by specifing parameters in the restore command. You also have to grant the user before.

  5. #5
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    I don't see any option to override the TSM server name on the restore command. So, you need to modify TSM server name in dsm.opt (what you're currently doing) or possibly modify TSM server address in dsm.sys. Or create two dsm.opt files (one points to test TSM server and the second one points to prod TSM server). You will also need to have two entries in dsm.sys. But you'll need to modify dsmi_config to point to prod's dsm.opt and restart the instance prior to restoring the db. I don't really see any other way.

  6. #6
    Join Date
    Jun 2009
    Posts
    272
    I have the entries of TSM server1 and TSM server2 in dsm.sys file. I also have two server names in dsm.opt file with one commented out. Whenever I wanted to do such redirected restores, I swap the commented server name with the other one. That is all !!!The backups and log archivals will then start going to the new TSM server.


    Can you please explain what do you mean by "But you'll need to modify dsmi_config to point to prod's dsm.opt and restart the instance prior to restoring the db".


    As soon as I change dsm.opt file to point to prod TSM server, I can start seeing the prod backups and restore starts working. But I don't really restart the instance and change any other configuration

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    The reason you don't need to restart the instance is because you're using one dsm.opt file (with one server commented out). If you were using two opt files (ie. dms.opt.test to point to test TSM server and dms.opt.prod to point to prod TSM server), then you would have to restart the instance for DSMI_CONFIG change (this would have to be changed to point to prod TSM server if you were using two opt files) to take effect.

  8. #8
    Join Date
    Jun 2009
    Posts
    272
    I just did that experiment. I didn't need to restart the instance for it. All I need is to export the DSMI_CONFIG with the new filename. It starts taking the new dsm.opt file.

    Here is what I did
    (user1@host1)/db2udb/user1:
    $ env | grep -i dsmi
    DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
    DSMI_LOG=/usr/tivoli/tsm/client/api/bin64
    DSMI_DIR=/usr/tivoli/tsm/client/api/bin64


    (user1@host1)/db2udb/user1:
    $ cat /usr/tivoli/tsm/client/api/bin64/dsm.opt
    SErvername TSM_SER1
    *SErvername TSM_SER2



    (user1@host1)/db2udb/user1:
    $ db2adutl query full db sample

    Query for database SAMPLE


    Retrieving FULL DATABASE BACKUP information.
    1 Time: 20100407204521 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    2 Time: 20090812204527 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    3 Time: 20090805204527 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1


    Retrieving INCREMENTAL DATABASE BACKUP information.
    No INCREMENTAL DATABASE BACKUP images found for SAMPLE


    Retrieving DELTA DATABASE BACKUP information.
    No DELTA DATABASE BACKUP images found for SAMPLE



    $ cp /usr/tivoli/tsm/client/api/bin64/dsm.opt ./dsmtest.opt
    (user1@host1)/db2udb/user1:
    $ export DSMI_CONFIG=/db2udb/user1/dsmtest.opt
    (user1@host1)/db2udb/user1:
    $ env | grep -i dsmi
    DSMI_CONFIG=/db2udb/user1/dsmtest.opt
    DSMI_LOG=/usr/tivoli/tsm/client/api/bin64
    DSMI_DIR=/usr/tivoli/tsm/client/api/bin64

    $ cat /db2udb/user1/dsmtest.opt
    SErvername TSM_SER1
    *SErvername TSM_SER2

    (user1@host1)/db2udb/user1:
    $ vi /db2udb/user1/dsmtest.opt

    (user1@host1)/db2udb/user1:
    $ cat /db2udb/user1/dsmtest.opt
    *SErvername TSM_SER1
    SErvername TSM_SER2

    $ db2adutl query full db SAMPLE

    Query for database SAMPLE


    Retrieving FULL DATABASE BACKUP information.
    1 Time: 20100406144702 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    2 Time: 20100331204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    3 Time: 20100324204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    4 Time: 20100317204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1


    Retrieving INCREMENTAL DATABASE BACKUP information.
    No INCREMENTAL DATABASE BACKUP images found for SAMPLE


    Retrieving DELTA DATABASE BACKUP information.
    No DELTA DATABASE BACKUP images found for SAMPLE
    Last edited by blazer789; 04-09-10 at 18:06.

  9. #9
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Interesting... It used to be that the instance had to be restarted for this change to take affect. What does the following show:

    db2set DSMI_CONFIG

    ps eww <PID of db2sysc for this instance>

  10. #10
    Join Date
    Jun 2009
    Posts
    272
    $ db2set DSMI_CONFIG
    /db2udb/user1/dsmtest.opt

    $ ps -ef | grep sysc
    user2 483396 491550 0 Mar 04 - 0:18 db2sysc 0
    user1 766072 745594 0 Mar 04 - 0:19 db2sysc 0
    user1 1765598 565454 1 17:22:26 pts/1 0:00 grep sysc
    (user1@gondola)/db2udb/user1:
    $ ps eww 766072
    PID TTY STAT TIME COMMAND
    766072 - A 0:19 db2sysc 0 DB2DIR=/opt/IBM/db2/V9.1 HOME=/db2udb PWD=/db2udb TZ=EST5EDT DB2INSTANCE=user1 DB2INSTDEF=user1 DB2LPORT=0 DB2NODE=0 DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt DSMI_DIR=/usr/tivoli/tsm/client/api/bin64 LANG=C USER=db2udb CLASSPATH=/db2udb/user1/sqllib/java/db2java.zip:/db2udb/user1/sqllib/java/db2jcc.jar:/db2udb/user1/sqllib/java/sqlj.zip:/db2udb/user1/sqllib/function:/db2udb/user1/sqllib/java/db2jcc_license_cu.jar:. LOCPATH=/usr/lib/nls/loc DB2SYSC_EXEC_OWNER=DB2 PATH=/db2udb/user1/sqllib/bin:/db2udb/user1/sqllib/adm:/bin: LIBPATH=/db2udb/user1/sqllib/lib64:/db2udb/user1/sqllib/function:

  11. #11
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Can you try to backup the db to see where it gets stored?

  12. #12
    Join Date
    Jun 2009
    Posts
    272
    Okay. Trying it. The backup takes 15 minutes to finish. I will post it after 15 minutes

  13. #13
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    I suspect the backup will get stored on the TSM server pointed to by:
    DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt

  14. #14
    Join Date
    Jun 2009
    Posts
    272
    You were right. Backup got stored in the TSM file defined in the file DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt

    (user1@host1)/db2udb/user1:
    $ db2 "force applications all" ; db2 "deactivate db sample" ; db2 "backup db sample use tsm"
    DB20000I The FORCE APPLICATION command completed successfully.
    DB21024I This command is asynchronous and may not be effective immediately.

    DB20000I The DEACTIVATE DATABASE command completed successfully.

    Backup successful. The timestamp for this backup image is : 20100409172955

    (user1@host1)/db2udb/user1:
    $ db2adutl query full db sample

    Query for database SAMPLE


    Retrieving FULL DATABASE BACKUP information.
    1 Time: 20100406144702 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    2 Time: 20100331204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    3 Time: 20100324204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    4 Time: 20100317204522 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1


    Retrieving INCREMENTAL DATABASE BACKUP information.
    No INCREMENTAL DATABASE BACKUP images found for SAMPLE


    Retrieving DELTA DATABASE BACKUP information.
    No DELTA DATABASE BACKUP images found for SAMPLE

    (user1@host1)/db2udb/user1:
    $ export DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin64/dsm.opt
    (user1@host1)/db2udb/user1:
    $ db2adutl query full db sample

    Query for database SAMPLE


    Retrieving FULL DATABASE BACKUP information.
    1 Time: 20100409172955 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    2 Time: 20100407204521 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    3 Time: 20090812204527 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1
    4 Time: 20090805204527 Oldest log: S0000000.LOG DB Partition Number: 0 Sessions: 1


    Retrieving INCREMENTAL DATABASE BACKUP information.
    No INCREMENTAL DATABASE BACKUP images found for SAMPLE


    Retrieving DELTA DATABASE BACKUP information.
    No DELTA DATABASE BACKUP images found for SAMPLE

  15. #15
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,369
    Please check this technote:
    IBM - Configuring DB2 and TSM in Unix / Linux


    Keep in mind that the db2adutl and dsmapipw utilities use the TSM API environment variables (the DSMI variables) that are set in their current working shell. Therefore, any changes to the DSMI environment variables will be seen immediately by these utilities. However, DB2 utilizes the environment variables from memory that are loaded when the instance is started. Therefore, any changes to these DSMI environment variables require the DB2 instance to be recycled (i.e. db2stop/db2start) for the changes to take affect.


    I kind of forgot about not needing to restart the instance for db2adutl

Posting Permissions

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