473,392 Members | 1,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,392 software developers and data experts.

restore tablespace backup onto another system

Source/Production system: AIX 5.2, DB2 8.2

I have a full backup of sample db taken on 05/01/2006(logs included in
backups)
I have a tablespace backup of userspace1 taken on 05/03/2006(logs
included in backups)
There are other tablespaces in this db as well
There is retention logging

I want to restore the userspace1 tablespace of sampledb into newdb on
development( AIX 5.2, DB2 8.2).

How can I accomplish this.

My ideas:
create newdb with circular logging
restore from full backup into newdb
RESTORE DATABASE SAMPLE into newdb TABLESPACE (USERSPACE1) FROM
"C:\TEMP\bkp" TAKEN AT 20060303162052 WITH 2 BUFFERS BUFFER 1024
PARALLELISM 1 WITHOUT PROMPTING;

I want to have the data in userspace1 of newdb to be the data as of
05/03 and the rest of the db as of 05/01, is this possible?

Thanks
KS

Will this work?

May 10 '06 #1
3 3169
No this will not work.

In any backup image, there is a list of the tablespace in the image as well
as a lait of the tablespaces in the db.

Your newdb database will never have heard of the userspace1 and moreover,
the list of tablespace existing in the image will not match the one in the
db.

DB2 uses, as well as the entries in the catalog tables, a file known as the
table space descriptors to track who and what belongs to whom and where for
its tablespaces.

What you need to do is:
1) restore the userspce1 tablespace of 05/03 in to either the sample db or a
restored test copy of it.
2) rollforward the userspace1 tblspc as far as the time you require or end
of logs, whichever comes first.
3) Use db2look to extract the ddl for each of the tables in the tablespace.
4) Use db2move to extract the actual data for each of the tables.
5) Run the output of db2look in step 3 against the the newdb. You'll have
to edit that output file so that db name and containers of tablespace are
acceptable.
6) Run db2move in load mode to load the data that you extracted in step 4.

Once finished you should be all right.
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<hi****@gmail.com> a écrit dans le message de news:
11**********************@g10g2000cwb.googlegroups. com...
Source/Production system: AIX 5.2, DB2 8.2

I have a full backup of sample db taken on 05/01/2006(logs included in
backups)
I have a tablespace backup of userspace1 taken on 05/03/2006(logs
included in backups)
There are other tablespaces in this db as well
There is retention logging

I want to restore the userspace1 tablespace of sampledb into newdb on
development( AIX 5.2, DB2 8.2).

How can I accomplish this.

My ideas:
create newdb with circular logging
restore from full backup into newdb
RESTORE DATABASE SAMPLE into newdb TABLESPACE (USERSPACE1) FROM
"C:\TEMP\bkp" TAKEN AT 20060303162052 WITH 2 BUFFERS BUFFER 1024
PARALLELISM 1 WITHOUT PROMPTING;

I want to have the data in userspace1 of newdb to be the data as of
05/03 and the rest of the db as of 05/01, is this possible?

Thanks
KS

Will this work?


May 15 '06 #2
Thanks Pierre!!
Pierre Saint-Jacques wrote:
No this will not work.

In any backup image, there is a list of the tablespace in the image as well
as a lait of the tablespaces in the db.

Your newdb database will never have heard of the userspace1 and moreover,
the list of tablespace existing in the image will not match the one in the
db.

DB2 uses, as well as the entries in the catalog tables, a file known as the
table space descriptors to track who and what belongs to whom and where for
its tablespaces.

What you need to do is:
1) restore the userspce1 tablespace of 05/03 in to either the sample db or a
restored test copy of it.
2) rollforward the userspace1 tblspc as far as the time you require or end
of logs, whichever comes first.
3) Use db2look to extract the ddl for each of the tables in the tablespace.
4) Use db2move to extract the actual data for each of the tables.
5) Run the output of db2look in step 3 against the the newdb. You'll have
to edit that output file so that db name and containers of tablespace are
acceptable.
6) Run db2move in load mode to load the data that you extracted in step 4.

Once finished you should be all right.
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<hi****@gmail.com> a écrit dans le message de news:
11**********************@g10g2000cwb.googlegroups. com...
Source/Production system: AIX 5.2, DB2 8.2

I have a full backup of sample db taken on 05/01/2006(logs included in
backups)
I have a tablespace backup of userspace1 taken on 05/03/2006(logs
included in backups)
There are other tablespaces in this db as well
There is retention logging

I want to restore the userspace1 tablespace of sampledb into newdb on
development( AIX 5.2, DB2 8.2).

How can I accomplish this.

My ideas:
create newdb with circular logging
restore from full backup into newdb
RESTORE DATABASE SAMPLE into newdb TABLESPACE (USERSPACE1) FROM
"C:\TEMP\bkp" TAKEN AT 20060303162052 WITH 2 BUFFERS BUFFER 1024
PARALLELISM 1 WITHOUT PROMPTING;

I want to have the data in userspace1 of newdb to be the data as of
05/03 and the rest of the db as of 05/01, is this possible?

Thanks
KS

Will this work?


May 15 '06 #3
Just a bit more on this.
If you Google for DB2 Viper (a.k.a. V9) you might be agreably surprised
!!!!!!
HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<hi****@gmail.com> a écrit dans le message de news:
11**********************@j73g2000cwa.googlegroups. com...
Thanks Pierre!!
Pierre Saint-Jacques wrote:
No this will not work.

In any backup image, there is a list of the tablespace in the image as
well
as a lait of the tablespaces in the db.

Your newdb database will never have heard of the userspace1 and moreover,
the list of tablespace existing in the image will not match the one in the
db.

DB2 uses, as well as the entries in the catalog tables, a file known as
the
table space descriptors to track who and what belongs to whom and where
for
its tablespaces.

What you need to do is:
1) restore the userspce1 tablespace of 05/03 in to either the sample db or
a
restored test copy of it.
2) rollforward the userspace1 tblspc as far as the time you require or end
of logs, whichever comes first.
3) Use db2look to extract the ddl for each of the tables in the
tablespace.
4) Use db2move to extract the actual data for each of the tables.
5) Run the output of db2look in step 3 against the the newdb. You'll have
to edit that output file so that db name and containers of tablespace are
acceptable.
6) Run db2move in load mode to load the data that you extracted in step 4.

Once finished you should be all right.
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
<hi****@gmail.com> a écrit dans le message de news:
11**********************@g10g2000cwb.googlegroups. com...
Source/Production system: AIX 5.2, DB2 8.2

I have a full backup of sample db taken on 05/01/2006(logs included in
backups)
I have a tablespace backup of userspace1 taken on 05/03/2006(logs
included in backups)
There are other tablespaces in this db as well
There is retention logging

I want to restore the userspace1 tablespace of sampledb into newdb on
development( AIX 5.2, DB2 8.2).

How can I accomplish this.

My ideas:
create newdb with circular logging
restore from full backup into newdb
RESTORE DATABASE SAMPLE into newdb TABLESPACE (USERSPACE1) FROM
"C:\TEMP\bkp" TAKEN AT 20060303162052 WITH 2 BUFFERS BUFFER 1024
PARALLELISM 1 WITHOUT PROMPTING;

I want to have the data in userspace1 of newdb to be the data as of
05/03 and the rest of the db as of 05/01, is this possible?

Thanks
KS

Will this work?


May 18 '06 #4

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

Similar topics

1
by: Hakim | last post by:
Hi there, I am a rookie in DB2. I have tried to do a database restoration on my system. Since it should not go directly to our REAL database, I tried to restore to a dummy database. Below...
4
by: Raquel | last post by:
How are the following two commands different as far as the 'end result' of the restores is concerned: 1. db2 RESTORE DB mydb 2. db2 RESTORE DB mydb TABLESPACE In other words, in the above...
4
by: Hardy | last post by:
hi gurus, now I have to backup and restore a 8 T size db2 database. from two s85 to two 670. the partitions,tablespaces of the db should be redesigned then I plan to use redirected restore. but...
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...
6
by: Raj | last post by:
How can we do an online restore of a tablespace using the incremental backup's? we are on a partitioned database... Also, how could we use backup copy made by the load (using the copy to option...
2
by: vj_dba | last post by:
Hi Group, I have a problem in restoring my tablespace, my database is running in ARCHIVAL logging, I created a tablespace, did some transaction, then took the ONLINE BACKUP of the tablespace....
4
by: africantract | last post by:
Hi There, We have an issue on our db2 restores. We do database dumps every night, and restore them to development servers every morning. This works fine with no errors. However if we backup those...
0
by: zhif | last post by:
I tried to test this process on my personal laptop. Could you help me to take a look where is the problem as below? 1. I created a source database, name: db100 <-- db2 create db db100...
2
by: modeler | last post by:
Hello, I am trying to restore a DB2 9.1 fp2 backup to another DB2 9.1 fp2 machine, both are on Windows. C:\Program Files\IBM\SQLLIB\BIN>db2 -tvf C:\db2_data\test.db2 UPDATE COMMAND OPTIONS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.