473,395 Members | 2,079 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,395 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 3170
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.