473,396 Members | 1,760 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,396 software developers and data experts.

db2 table space restore

hello All,

im not a db2 person, please forgive me for asking a simple
question..
i would like to restore a tablespace from a current database to a new
database in the same server how do i accomplish this task. I use tsm
to backup my db...

i was looking around web and found instruction to the restore command
in db2...
this is what i came up with..

i need to first create the target (empty) database correct? then
execute the command below?

RESTORE DBPRODA emidinst1 password1 TABLESPACE PROD02 USE TSM TAKEN AT
091808 INTO DBTESTB

thank you in advance..

pinoy
Sep 24 '08 #1
4 6433
Hi pinoy,

first of all: what you want to do works with version 9 (and above). If
you have a lower version, a simple tablespace restore into a(nother)
DB than the original one will fail.

You'll have to restore the tablespace you want together with the
catalog tablespace.
Please consider a redirected restore (container to another location)
when restoring on the same system.

If it is an offline backup no further logfiles are needed, if online
you'll need a rollforward and some (?) logfiles for this.

Please see also: http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
"restore db"
Sep 25 '08 #2
On Sep 25, 4:36*am, "stefan.albert" <stefan.alb...@spb.dewrote:
Hi pinoy,

first of all: what you want to do works with version 9 (and above). If
you have a lower version, a simple tablespace restore into a(nother)
DB than the original one will fail.

You'll have to restore the tablespace you want together with the
catalog tablespace.
Please consider a redirected restore (container to another location)
when restoring on the same system.

If it is an offline backup no further logfiles are needed, if online
you'll need a rollforward and some (?) logfiles for this.

Please see also:http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
"restore db"
Thank you for you feedback..
i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
ill search on that thanks..
Sep 25 '08 #3
Thank you for you feedback..
*i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
ill search on that thanks..
In that case you may have to use db2move (resp. export/load) to move
your data. Did you consider that?

Sep 27 '08 #4
This is an example

db2 -td;

RESTORE DATABASE SAMPLE FROM "C:\Program Files\IBM\SQLLIB\BIN" TAKEN AT
20070622115322 TO "C:" INTO newdatabasename
NEWLOGPAH "c:\dirlog" WITH 2 BUFFERS BUFFER 1024 REDIRECT PARALLELISM 1
WITHOUT PROMPTING;

after that command you should enter the locations of each tablespace.
One set for each tablespace:

SET TABLESPACE CONTAINERS FOR 0 IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (PATH "C:\dir1");
SET TABLESPACE CONTAINERS FOR 1 IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (PATH "c:\dir2");
SET TABLESPACE CONTAINERS FOR 2 IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (PATH "c:\dir3");
SET TABLESPACE CONTAINERS FOR 3 IGNORE ROLLFORWARD CONTAINER OPERATIONS
USING (PATH "C:\dir4");

when you finish with above commands

RESTORE DATABASE SAMPLE CONTINUE;

here starts the restore

or restore database sample abort;
to stop and start over

pinoy2ser wrote:
On Sep 25, 4:36 am, "stefan.albert" <stefan.alb...@spb.dewrote:
>Hi pinoy,

first of all: what you want to do works with version 9 (and above). If
you have a lower version, a simple tablespace restore into a(nother)
DB than the original one will fail.

You'll have to restore the tablespace you want together with the
catalog tablespace.
Please consider a redirected restore (container to another location)
when restoring on the same system.

If it is an offline backup no further logfiles are needed, if online
you'll need a rollforward and some (?) logfiles for this.

Please see also:http://publib.boulder.ibm.com/infoce...w/v9/index.jsp
"restore db"

Thank you for you feedback..
i have db2 ver 8.2 fix11.. not too familiar with redirected restore..
ill search on that thanks..
Oct 3 '08 #5

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

Similar topics

2
by: Darshak Shah | last post by:
Hi, * Question background : My DB is in ArchiveLog mode. I have TS in ReadOnly mode. As i know, - Oracle allows to DROP table resides in ReadOnly TS (& other objects also) even though that...
0
by: Erik Hendrix | last post by:
All, I have a interresting problem here. Doing a redirect restore (copying database from 1 system to another). This other system has less available diskspace to it for the log files. This thus...
2
by: Damir Wilder | last post by:
Hello! Is it at all possible (on DB2 V7.2, AIX) to restore a single table from a full table backup? The RESTORE DB command doesn't have this functionality - at least not according to the DB2...
6
by: Lewis Veale | last post by:
I have an Access 2000 front-end pointing at a SQL Server backend, with around 80 linked tables and views. I frequently need to point the front-end at different versions of the back-end, and achieve...
5
by: Mike Nolan | last post by:
I have a 600K row table on my production system (running 7.3.3) that I dump and load on my development system (7.4.1) every night using cron jobs. I would like to be able to restore the table...
1
by: Damon Hart | last post by:
Hi all - I am experiencing continually degrading performance on queries run against the special system tables. I notice the slowdown when these meta-data queries are run implicitly "behind the...
5
by: ronin 47th | last post by:
Hi group, In one of the books 'Gurus Guide to Transact SQL' i found this info: ------------------------------------------------------------ TRUNCATE TABLE empties a table without logging row...
5
by: Troels Arvin | last post by:
Hello, Every so often, I'm asked to help people recover data from tables that were either dropped or where to much data was DELETEed. The complications related to restoring data are a problem....
2
by: mvsmsh | last post by:
Hi , all We have hundreds of tables in on tablespace , but I'm planning to change as one table per one tablespace. . I wonder how other shops does ? Are there any special reasons in UDB...
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
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
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
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.