Results 1 to 12 of 12

Thread: DB2 TSM backup

  1. #1
    Join Date
    Apr 2003
    Posts
    20

    Unanswered: DB2 TSM backup

    Hi,
    I've been trying to backup to TSM (z/OS) from a DB2 client (AIX).
    I keep getting this error and can't find a solution anywhere:

    db2 => backup db tsmtest use tsm
    SQL2071N An error occurred while accessing the shared library
    "/home/db2inst1/sqllib/adsm/libtadsm.a". Reason code: "1".
    db2 =>


    I then tried to replace the lib file that came with DB2 with the one that came with TSM. I now get the following error:

    db2 => backup db tsmtest use tsm
    SQL2071N An error occurred while accessing the shared library
    "/home/db2inst1/sqllib/adsm/libtadsm.a". Reason code: "2".

    Is it obvious to anyone what the problem might be??
    It runs on a p690 partion and I have tried several different.

    Cheers
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  2. #2
    Join Date
    Apr 2003
    Posts
    191

    Re: DB2 TSM backup

    Hi Henrik,

    if you do remote backups I would expect you need to get the tsm environment right.

    What does env | grep DSM say? Did you set up a tsm password?

    Did you ever before do a successful backup of another host's database from a client?

    How do you do your backups at the time being?

    Johann

  3. #3
    Join Date
    Apr 2003
    Posts
    20
    Hi Johann,

    all my servers are backed up via TSM (except for the DB2 part). I have tried to back up three DB2 databases to TSM but they all give me that error.
    It's something fundemental, probably, but I have never tried this before.

    [bob5](db2inst1:/home/db2inst1) #env | grep DSM
    DSM_LOG=/var/adm/dsm.error
    DSM_DIR=/usr/tivoli/tsm/client/ba/bin
    DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt

    The dsm.sys file says to generate passwords?? The backup works anyway but that runs as root whereas the DB2 login in db2inst1. Is that the problem??

    Cheers
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  4. #4
    Join Date
    Apr 2003
    Posts
    17
    The error is a very general one and could mean almost anything about your tsm setup.

    First, does db2adutl work? Try "db2adutl query" and see if you get anything back. You are likely to get a tsm return code, along the lines of '-406'. (Can't find the options file) Those should be looked up in the "Tivoli Storage Manager Messages" manual, available on the Tivoli site as a pdf. Specifically, you want Appendix B, "API return codes with explanations"

    At first glance, I would check the value of the DSMI_ variables, the set that refer to the tsm api. On AIX for instance, typical values would be:

    DSMI_CONFIG=/usr/tivoli/tsm/client/api/bin/dsm.opt
    DSMI_DIR=/usr/tivoli/tsm/client/api/bin
    DSMI_LOG=/usr/tivoli/tsm/client/api/bin/

    This assumes you have already installed the api component.

  5. #5
    Join Date
    Apr 2003
    Posts
    191
    Hi Henrik,

    > It's something fundemental, probably, but I have never tried this before.

    Two things come to my mind:
    a) The password. There is a password that needs to be generated for user db2inst1. Don't quite remember, but please check ~/sqllib/adsm/dsmapipw.
    b) Where do you set your DSM environment? At our place, nothing works unless it is included in ~/sqllib/db2profile. It simply does not work if set in .profile. It is really a strange sort of quirk.

    > [bob5](db2inst1:/home/db2inst1) #env | grep DSM
    > DSM_LOG=/var/adm/dsm.error
    > DSM_DIR=/usr/tivoli/tsm/client/ba/bin
    > DSM_CONFIG=/usr/tivoli/tsm/client/ba/bin/dsm.opt

    Strange thing here is you got DSM_*, I got DSMI_* variables, just like browen. Typo?

    > The dsm.sys file says to generate passwords??

    PASSWORDACCESS GENERATE seems to be fine, same here.

    browen's db2adutl test is a good first indication if your tsm environment is flawed or not. In our experience it is not sufficient to predict successful backups and recoveries, though.

    Cheers,

    Johann

  6. #6
    Join Date
    Apr 2003
    Posts
    20
    Well, db2adutl query gives:

    [bob5](root:/) #db2adutl query
    exec(): 0509-036 Cannot load program db2adutl because of the following errors:
    0509-150 Dependent module libApiDS.a(dsmapish.o) could not be loaded.
    0509-022 Cannot load module libApiDS.a(dsmapish.o).
    0509-026 System error: A file or directory in the path name does not exist.

    Anyone know where libApiDS.a comes from??

    Cheers
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  7. #7
    Join Date
    Apr 2003
    Posts
    20
    I've tried all your suggestions now and still the same error.
    The DSM_* variables was in the documentation and they work. I've added the DSMI_* just to be sure.

    dsmapipw gives the same error:

    [bob5](db2inst1:/home/db2inst1/sqllib/adsm) #./dsmapipw
    exec(): 0509-036 Cannot load program ./dsmapipw because of the following errors:
    0509-150 Dependent module libApiDS.a(dsmapish.o) could not be loaded.
    0509-022 Cannot load module libApiDS.a(dsmapish.o).
    0509-026 System error: A file or directory in the path name does not exi
    st.


    Cheers
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  8. #8
    Join Date
    Apr 2003
    Posts
    17
    Hmm...is the API for TSM definitely installed? It looks like that library is missing in your error message. Also, the DSM_variables would be for normal client operations, not the API. The API is seperate and may not be installed automatically.

  9. #9
    Join Date
    Apr 2003
    Posts
    20
    They are installed:

    [bob5](uq7a8:/home/uq7a8) $lslpp -l | grep tivoli | grep api
    tivoli.tsm.client.ba.aix51.64bit.api
    [bob5](uq7a8:/home/uq7a8) $ls /usr/tivoli/tsm/client/api
    bin bin64
    [bob5](uq7a8:/home/uq7a8) $

    The file it can't find isn't there though

    Cheers
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  10. #10
    Join Date
    Apr 2003
    Posts
    17
    That's the 64 bit api. Are you using a 64 bit version of db2? If not, then that Api won't work--at least in my experience.

  11. #11
    Join Date
    Apr 2003
    Posts
    20
    But all the tivoli files say 64 bit?? And there aren't any files for 5.1 and 32bit, only 4.3 32bit.

    The OS is only 32 bit though. I'm getting confused!!

    I just found this in the AIX 5.1 API documentation:

    <--
    Build
    -----

    To build the 64 bit sample use the following files.
    The library name is libApiTSM64.a
    The sample make file is makeapiTSM64.aix
    The multithreaded make file is makemtTSM64.aix.
    -->

    What does that mean??



    Cheers
    Henrik Morsing
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

  12. #12
    Join Date
    Apr 2003
    Posts
    20
    Browen, THAT DID IT

    I replaced the aix51.64bit API with the aix43.32bit and it works :-D

    Strange?!?

    Thanks for your help.

    Cheers

    Henrik Morsing
    ---
    Henrik Morsing
    Certified AIX 4.3 Systems Administration
    & p690 Technical Support

Posting Permissions

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