469,641 Members | 1,225 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

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 2946
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Hakim | last post: by
4 posts views Thread by Hardy | last post: by
9 posts views Thread by GL | last post: by
2 posts views Thread by vj_dba | last post: by
4 posts views Thread by africantract | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.