Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2004
    Posts
    23

    Unanswered: Backup - Restore

    DB2 version = 6.1
    Operating sys = NT 4.0

    There are two different Servers.

    Production & Test.

    I took online backup of the Production database.

    While I took this backup, I provided location of the TEST Servers's backup folder.

    Becuase I don't have sufficient space on Production box to keep any extra backup.

    Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

    (1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
    OR
    RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

    Getting this error for both commands:

    Error : SQL2542N No match for a database image file was found based on the source
    database alias and timestamp provided.

    How to come out from this problem ?
    Please advice.

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

    Re: Backup - Restore

    In the from portion

    D:\\DBBackup\

    will do ... DB2 builds the rest of the path

    Cheers

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

  3. #3
    Join Date
    Jan 2004
    Posts
    23
    I also tried the following command but getting the same error.

    RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\ TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

  4. #4
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: Backup - Restore

    Originally posted by Darsh
    DB2 version = 6.1
    Operating sys = NT 4.0

    There are two different Servers.

    Production & Test.

    I took online backup of the Production database.

    While I took this backup, I provided location of the TEST Servers's backup folder.

    Becuase I don't have sufficient space on Production box to keep any extra backup.

    Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

    (1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
    OR
    RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

    Getting this error for both commands:

    Error : SQL2542N No match for a database image file was found based on the source
    database alias and timestamp provided.

    How to come out from this problem ?
    Please advice.
    I think since the database names are different you should use "RESTORE ... INTO":

    RESTORE DB SIEBPDB TAKEN AT ... INTO SIEBTDB WITH 2 BUFFERS ...

  5. #5
    Join Date
    Jan 2004
    Posts
    23
    Last edited by Darsh; 02-05-04 at 13:08.

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Have you tried to use your control centre

    RESTORE DATABASE SIEBPDB FROM F:\\DBBackup into siebtdb TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

    If you have only one image in the path, you can even omit the taken at timestamp clause ...

    You can get the command from command reference or by typing in db2 ? restore

    or use the control centre

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

  7. #7
    Join Date
    Sep 2002
    Posts
    456

    Re: Backup - Restore

    First of all, as the error message says the timestmap you are providing is wrong, so check that. Second here are the commands to do redirect restore...these are generic and you should edit them to your needs...


    --===========================
    -- Restore database redirect
    --===========================

    1. Restore using the redirect option
    e.g.

    RESTORE DATABASE PROD
    FROM d:\backup
    INTO MTEST
    NEWLOGPATH d:\TEST\logs
    REDIRECT
    ;


    2. Set tablespace containers
    e.g.

    set tablespace containers for 0 using (path 'd:\TEST\syscat\')
    ;
    set tablespace containers for 1 using (path 'd:\TEST\tmp\')
    ;
    set tablespace containers for 2 using (path 'd:\TEST\user1\')
    ;

    3. Continue the restore process
    e.g.

    restore database PROD continue

    4. Rollforward Query Status
    e.g.
    rollforward database PROD query status

    5. Rollforward the database
    e.g.
    rollforward database TEST to <timestamp> and complete overflow log path 'd:\dir-name'


    Hope this helps.

    dollar

    Originally posted by Darsh
    DB2 version = 6.1
    Operating sys = NT 4.0

    There are two different Servers.

    Production & Test.

    I took online backup of the Production database.

    While I took this backup, I provided location of the TEST Servers's backup folder.

    Becuase I don't have sufficient space on Production box to keep any extra backup.

    Now, I want to Restore Production database backup to the Test Server - Database and I'm using this command.

    (1) RESTORE DATABASE SIEBPDB FROM F:\\DBBackup TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING
    OR
    RESTORE DATABASE SIEBTDB FROM D:\\DBBackup\Siebpdb.0\Db2\Node0000\Catn0000 TAKEN AT 20040123143142 WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING

    Getting this error for both commands:

    Error : SQL2542N No match for a database image file was found based on the source
    database alias and timestamp provided.

    How to come out from this problem ?
    Please advice.

  8. #8
    Join Date
    Dec 2003
    Posts
    39

    redirect

    Please check the following commond and customise it according to ur need

    db2 restore db nc3db from /nc3temp to /db2/db200001/dbnc3db into nc3db redirect without rolling forward without prompting;
    db2 "set tablespace containers for 0 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0000.0')"
    db2 "set tablespace containers for 1 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0001.0')"
    db2 "set tablespace containers for 3 using (path '/db2/db200001/dbnc3db/db200001/NODE0000/SQL00001/SQLT0002.0')"

  9. #9
    Join Date
    Jan 2004
    Posts
    23
    I'm getting this error :

    "Bad container"

    Do you suggest to use MOVE ?

    If so, how to ?

  10. #10
    Join Date
    Jan 2004
    Posts
    23
    RESTORE DATABASE SIEBPDB FROM \\CMD0CLA\Backup TAKEN AT 20040204230004 INTO WRKSIEB WITH 2 BUFFERS BUFFER 1024 WITHOUT PROMPTING ;


    ERror :

    SQL0298N Bad container path. SQLSTATE=428B2

  11. #11
    Join Date
    Sep 2002
    Posts
    456
    Check that the path you specify is in right format

    dollar

    Originally posted by Darsh
    I'm getting this error :

    "Bad container"

    Do you suggest to use MOVE ?

    If so, how to ?

Posting Permissions

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