473,465 Members | 1,652 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

db2 relocatedb or redirected restore?

Hi there,

Command Reference book stated for db2relocatedb command:
Copy the files/devices belonging to the databases being copied onto the
system where the new instance resides. The path names must be changed
as necessary. However, if there are already databases in the directory
where the database files are moved to, you can mistakenly overwrite the
existing sqldbdir file, thereby removing the references to the existing
databases. In this scenario, the db2relocatedb utility cannot be used.
Instead of db2relocatedb, an alternative is a redirected restore.

But I still cannot understand the difference between db2relocatedb and
redirected restore. For example,

Host: SysA, Instance: Inst1, Database: DB1, DB_PATH: /home/db2inst1
Host: SysB, Instance: Inst1, Database: DB2, DB_PATH: /home/db2inst1

I want to move DB1 from SysA to SysB, and which method should be used?
Any comments?

Dec 8 '06 #1
4 5536
I'd do neither. The simplest is to take a backup and use the RESTORE
command. Use the "INTO new-database-alias" parameter on the restore
command and you will have your database moved.

Lots of good information in the manuals.

Phil Sherman

Laurence wrote:
Hi there,

Command Reference book stated for db2relocatedb command:
Copy the files/devices belonging to the databases being copied onto the
system where the new instance resides. The path names must be changed
as necessary. However, if there are already databases in the directory
where the database files are moved to, you can mistakenly overwrite the
existing sqldbdir file, thereby removing the references to the existing
databases. In this scenario, the db2relocatedb utility cannot be used.
Instead of db2relocatedb, an alternative is a redirected restore.

But I still cannot understand the difference between db2relocatedb and
redirected restore. For example,

Host: SysA, Instance: Inst1, Database: DB1, DB_PATH: /home/db2inst1
Host: SysB, Instance: Inst1, Database: DB2, DB_PATH: /home/db2inst1

I want to move DB1 from SysA to SysB, and which method should be used?
Any comments?
Dec 8 '06 #2
Actually, I'd like to know how to differentiate db2relocatedb and
redirected restore? The objective between two seems the same...
could someone instruct me?

Dec 8 '06 #3
One difference i could see is

1. With RELOCATE DB command if you are moving from one HOST to another
HOST
you will copy all the contents of the DATABASE DIRECTORIES and YOU HAVE
TO COPY
then only your RELOCATE DB command will work or your db2inidb command
will work

For example

Host 1 to Host2

DB_NAME=x,y
DB_PATH=/home/db2inst1,/home/db2inst2
LOG_DIR=/xlog,/ylog
INSTANCE=db2inst1,db2inst2

Will be your relocate.cfg file.....but apart from this you will also
need to tar
the contents of /home/db2inst1/db2inst1/NODE0000 and have to REPLACE
them in
/home/db2inst2/db2inst2/NODE0000.

Then only u can issue db2inidb command

So in the above case all the other database directories in the db2inst2
are gone.
So that is why the command you referred to is telling you to use
RESTORE command in those cases....

With RESTORE ....you don't REPLACE the contents of

/home/db2inst2/db2inst2/NODE0000...you will only APPEND to it. So the
existing databases are safe.

i hope it is clear...

If both the SOURCE and TARGET databases are on the same host then the
above case is not valid.

Cheers...
Shashi Mannepalli

Laurence wrote:
Actually, I'd like to know how to differentiate db2relocatedb and
redirected restore? The objective between two seems the same...
could someone instruct me?
Dec 8 '06 #4
Hi there,

I found this URL
http://www-128.ibm.com/developerwork...amb/index.html,
and for people reference.

Dec 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Vikrant | last post by:
Friends, Due an application (old) install program problem, Under AIX I could only create DB2 instance, I could also catalog it. Its complex application and I am not expert in creating full...
1
by: Vikrant | last post by:
Hi Kelly This is from old response by you. What is 'callerac' parameter in REDIRECTED restore, how can I provide 'callerac' value ? Thanks, VKG =====
9
by: GL | last post by:
I am running DB2 8.1.1 on AIX 5.1 Having a problem with a redirected restore. Once into the restore continue phase, I immediately get the following “SQL2059W A device full warning was...
1
by: Jack | last post by:
Is it possible to find out what the tablespace definitions are of database you are about to build using a redirected restore? What I am wanting to do is build a script that can take only a backup...
7
by: CCC via DBMonster.com | last post by:
We use redirected restore to refresh test from prod on different AIX 5.2 servers. The databases have the same number, size and names of cooked containers. The only difference is the fully qualified...
11
by: Chris | last post by:
I have searched this group for answers and tried the responses. I am trying to Use an full online backup from our production server and apply it to our test server. The Tablespaces in the...
1
by: Kent.Brooke | last post by:
When a backup is taken from server a and then redirected restore is done on server b, the tables and data is fine however db2advis says "explain & advise tables not created for user x properly"....
0
by: Lew | last post by:
Hi, I have a database that I am restoring to another database in the same instance using a redirected restore. It seems to work fine but what is troubling to me is in the diag log i see that it...
1
by: okonita | last post by:
Hi all, This is a very urgent issue for my team. We are trying a Redirected restore the most current online DB2 UDBv8.2 backup copy from prod disk to disk on another/test instance. Our...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.