Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

db2 restore db in a separate server in DB2 8.1.5 in AIX 5.1

Posted on 2004-10-08
3
Medium Priority
?
1,967 Views
Last Modified: 2012-05-05
Hi experts,

My env is:  DB2 8.1.5 in AIX 5.1 system and on connecting to database we can see:
Database Connection Information...

Database server        = DB2/6000 8.1.5
 SQL authorization ID   = DB2INST1
 Local database alias   = xxxxx

I have a full backup from Server A, but I need to restore the it on Server B to create a testdb with the same

name.  When I try to do a restore,
by: db2 restore db xxxxx from xxxxx.0.db2inst1.NODE0000.CATN0000.20040910133320.001
I get the error:  SQL2036N  The path for the file or device
"xxxxx.0.db2inst1.NODE0000.CATN0000.20040910133320.001" is not valid.

I know the bkup exists because I FTP'ed it from prod to test.  verified by listing it in test.  How do I

recover successfully to create a testdb in the target server? Same name of db, instance, and every thing else.

Do I need to drop the exiting database befor doing the recover?  Quickly need to fix this.  Any help will be appreciated.
0
Comment
Question by:dbruk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Expert Comment

by:ghp7000
ID: 12262019
Do you have exactly the same path set up in server B as that in server A? Or did you upload only the .001 file?
Are you sure that in server B the node is set to 0?
Have you tried starting the restore from directory xxxx.0? In that case, your command would simply be restore db db_name
You do not need to drop the existing database, you will be prompted to overwrite the existing database once the restore starts


0
 

Author Comment

by:dbruk
ID: 12262715
Thanks ghp7000.  Answers to your questions:
Do you have exactly the same path set up in server B as that in server A?  No.
Database created on:
A's path(source): /AXXXXX/db2inst1/db2inst1/NODE0000/SQL00003/  ... ETC.
Database created on:
B's path(target): /AXXXXX/db2inst1/NODE0000/SQL00003/  ... ETC.
(note: db2inst1 appears twice in A.  Is that an issue? Can change it, if required.)
 Or did you upload only the .001 file?  Y.
Are you sure that in server B the node is set to 0? Y.
Have you tried starting the restore from directory xxxx.0? N.  My command was exactly as below:
db2 restore db xxxxx from xxxxx.0.db2inst1.NODE0000.CATN0000.20040910133320.001
(xxxxx.0.db2inst1.NODE0000.CATN0000.20040910133320.001 was a good full backup of A
That was FTP'ed successfully from source to target.)
In that case, your command would simply be: restore db db_name
Did try that. Got err msg: SQL2522N  More than one backup file matches the timestamp value provided for
the backed up database image.

Look forward to hearing from experts.  Thanks.
0
 
LVL 13

Accepted Solution

by:
ghp7000 earned 500 total points
ID: 12265063
yes, thats your problem, in order for the restore to work, you have to have the restore image (that means the001 file) in the same path as on the source server.
Example:
Server A has a backup image stored at xxxxx.0.db2inst1.NODE0000.CATN0000.20040910133320.001
Server B must have the same image in the same path.
If server B already has path name xxxxx.0.db2inst1.NODE0000.CATN0000 with another 001 file in it, then you have two different backup images that you can use to restore the database. In that case, your command would be:
db2 restore db <db_name> taken at 20040910133320
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question