Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    Bangalore
    Posts
    18

    Unanswered: regarding restore db statement

    Hello friends,

    i have some problem when issuing this command, just want to know is this valid or not:

    "" db2 restore db ntdbb from /dev/backup into ntdb2 taken at 20061222054454 without rolling forward without prompting""

    here i want to change the database name also. so, i given ""into ntdb2"

    can any one plz...

    Thanks & Regards

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    First what version of DB2 and OS are you using? Second, what is the exact problem you are having? Third, does ntdb2 already exist on the server?

    Andy

  3. #3
    Join Date
    Jul 2007
    Location
    Bangalore
    Posts
    18
    i am using db2 udb v8.1 with redhat enterprise linux4.1,

    suppose to restore the database, before this i used the following commands:

    # db2 restore db ntdbb /dev/backup into ntdb2 comprlib /home/db2inst1/sqllib/lib/libdb2compr.so;

    # db2 rollforward db ntdb2;

    # db2 rollforward db ntdb2 to end of logs;

    In this case it shows an error message "" SQL4970N roll-forward requery on db "ntdb2" cannot reach the specified stop point (end-of-log 'or' point-in-time) bcz of missing log file(s) on node(s) "0" ""

    I checked the specified directory for log files but i didn't found any thing there...

    so, i tryed to use the above command to restore database....

    the ntdb2 isn't exist....

  4. #4
    Join Date
    Apr 2007
    Posts
    26
    You have to create database ntdb2 before restoring into it.Do you have this created already?If not, create it first then run your restore command again.

  5. #5
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Actually, you do not need to have the NTDB2 DB already existing before you do the restore, just include the clause: TO <target directory>.

    The actual problem you are having is that you are missing the necessary logs to properly do the restore. If the backup was done with the INCLUDE LOGS clause, you need to use the LOGTARGET clause on the restore to extract the log files.

    HTH

    Andy

Posting Permissions

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