Results 1 to 8 of 8

Thread: Restoring DB

  1. #1
    Join Date
    May 2003
    Posts
    57

    Unanswered: Restoring DB

    Hello all,

    one more problem with restoring db.
    I have two db (both DB2 v.7.1 on AIX 4, two different servers): PROD i TEST. I tried to overwright TEST with PROD with this command:

    db2 restore db use tsm taken at 2003... to /test/test/db2inst1 into TEST replace existing without prompting ;

    PROD is 30GB and this was working during the night (about 10 hours) and in the morning I saw that it didn't succeded and this is the error:

    "SQL0298N Bad container path SQLSTATE 428B2"

    TEST is situated in a directory /test/test/db2inst1/NODE0000/SQL0001/...

    In the db2diag.log it is written :
    "2003-06-19-03.22.59.763676 Instance:db2inst1 Node:000
    PID:19886(db2agent (TEST)) Appid:*LOCAL.db2inst1.030618143403
    database_utilities sqludrsa Probe:0 Database:TEST
    Restore terminated."

    Please if someone can help me what to do? Restore is terminated so I don't know where is it now... do I have to rollback something or try again... All tablespaces are empty
    NODE0000/SQL0001/SQLT0002.0
    NODE0000/SQL0001/SQLT0001.0
    NODE0000/SQL0001/SQLT0002.0

    Thank you in advance.


    Nicole

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Restoring DB

    You might need to do a redirected restore operation ...

    Look at the 'Usage Notes' in the command reference under RESTORE Command

    HTH

    Sathyaram

  3. #3
    Join Date
    May 2003
    Posts
    57

    One more question...

    Hi Sathyaram, thanks for your reply...

    I've just read carefully "all" about redirection and understand that I have to do this:

    db2 restore db use tsm taken at 2003... to /test/test/db2inst1 into TEST redirect;

    set tablespace containers for 0 using (path '/test/test/db2inst1/NODE0000/SQL0001/SQLT0000.0 )
    ...

    set tablespace containers for 5 using
    (...)

    db2 restore db continue use tsm taken at 2003... to /test/test/db2inst1 into TEST replace existing without prompting

    But I', not sure should I replace the last command with only:
    "db2 restore db prod continue "

    Thank you in advance,
    Nicole

  4. #4
    Join Date
    May 2003
    Posts
    57
    I have done restore with redirect and have created new tablespaces and at the end got this:

    >db2 restore db use tsm taken at 2003... to /test/test/db2inst1 into TEST redirect
    SQL1277N Restore has detected that one or more table space containers are
    inaccessible, or has set their state to 'storage must be defined'.
    DB20000I The RESTORE DATABASE command completed successfully.

    > db2 "set tablespace containers for 3 using (path '/test/test/dat1/')"
    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
    > db2 "set tablespace containers for 4 using (path '/test/test/dat2/')"
    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.
    > db2 "set tablespace containers for 5 using (path '/test/test/dat3/')"
    DB20000I The SET TABLESPACE CONTAINERS command completed successfully.

    > db2 restore db ppzprod continue
    SQL2008N The callerac parameter is not within valid range or the requested action is out of sequence


    At the moment I don't understand why is restore completed succesfully before I created new tablespaces... and what significates the message at the end?

    Thank you for help in advance,
    Nicole

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: One more question...

    It is enough if you say 'restore db prod contine' ...

    But bear in mind , all commands have to form part of the same script ...

    ie

    Script : restore_prod.db2

    restore db prod into test use tsm taken at 20030501 ;

    set tablespace containers for 10 using (file 'abc.dat' 10000) ;

    restore db prod continue ;

    And from the command line, issue

    db2 -tvf restore_prod.db2 > restore_prod.out

    (Excuse me for the poor syntax above ... please use the correct ones ..)

    But, I'm not convinced that these default tablespaces with default path require redirection .... If there are containers other than the default ones, you will need redirection ...

    You do not need to do anything with the database before trying to do a restore again .... If there is some problem, just make a note of it and then drop the database and recreate it ...

    HTH

    Sathyaram

    You can t

  6. #6
    Join Date
    May 2003
    Posts
    57
    Thank you for your help...
    Now I have another problem:

    after the command
    > db2 "restore db ppzprod continue"
    SQL2025N An I/O error "50" using media"TSM"

    For some reason I tried again and received this:
    > db2 "restore db ppzprod continue"
    SQL2008N The callerac parameter is not within valid range or the requested action is out of sequence

    I'm still searching web to find what is error 50..

    Thank you,
    Nicole

  7. #7
    Join Date
    Aug 2003
    Location
    Columbus,OH
    Posts
    1

    Re: Restoring DB

    Have you ever determined why the error code -50 related to. I have the same issue currently with a restore of a db2 udb database using TSM.

    Jim
    Originally posted by NNicole
    Hello all,

    one more problem with restoring db.
    I have two db (both DB2 v.7.1 on AIX 4, two different servers): PROD i TEST. I tried to overwright TEST with PROD with this command:

    db2 restore db use tsm taken at 2003... to /test/test/db2inst1 into TEST replace existing without prompting ;

    PROD is 30GB and this was working during the night (about 10 hours) and in the morning I saw that it didn't succeded and this is the error:

    "SQL0298N Bad container path SQLSTATE 428B2"

    TEST is situated in a directory /test/test/db2inst1/NODE0000/SQL0001/...

    In the db2diag.log it is written :
    "2003-06-19-03.22.59.763676 Instance:db2inst1 Node:000
    PID:19886(db2agent (TEST)) Appid:*LOCAL.db2inst1.030618143403
    database_utilities sqludrsa Probe:0 Database:TEST
    Restore terminated."

    Please if someone can help me what to do? Restore is terminated so I don't know where is it now... do I have to rollback something or try again... All tablespaces are empty
    NODE0000/SQL0001/SQLT0002.0
    NODE0000/SQL0001/SQLT0001.0
    NODE0000/SQL0001/SQLT0002.0

    Thank you in advance.


    Nicole

  8. #8
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Restoring DB

    I think it is a generic IO error, like Tape Drive not available etc ...

    Not 100% sure anyway

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

Posting Permissions

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