By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,665 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,665 IT Pros & Developers. It's quick & easy.

restore tablespace backup onto another system

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.