Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / July 2006

Tip: Looking for answers? Try searching our database.

Backup/Restore from one tablespace ot another tablespace in the same database

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Frank Fiene - 03 Jul 2006 12:17 GMT
How does this work?

I have one database SBO_DB (SAP BusinessOne)
I want to copy tablespace TS_SEW_ACCESS_DEMO to TS_TEST2.

The directory of the database is: F:\DB2\NODE0000\SQL00002

Please help!

Frank
Gregor Kovač - 03 Jul 2006 12:36 GMT
> How does this work?
>
[quoted text clipped - 6 lines]
>
> Frank

Hi!

If you are using vesion 8 then you have to export tables from one tablespace
and import then into the other.

Signature

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-

| Gregor Kovac |    Gregor.Kovac@mikropis.si    |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  In A World Without Fences Who Needs Gates?   |
|              Experience Linux.                |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Frank Fiene - 03 Jul 2006 12:47 GMT
> If you are using vesion 8 then you have to export tables from one
> tablespace and import then into the other.

Thanks for your answer!
But: can i export/import a complete tablespace at once? There are many many
tables in this tablespace!
Gregor Kovač - 04 Jul 2006 09:44 GMT
>> If you are using vesion 8 then you have to export tables from one
>> tablespace and import then into the other.
>
> Thanks for your answer!
> But: can i export/import a complete tablespace at once? There are many
> many tables in this tablespace!

There is a command db2move
(http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.
udb.doc/core/r0002079.htm
)

Signature

-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-

| Gregor Kovac |    Gregor.Kovac@mikropis.si    |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  In A World Without Fences Who Needs Gates?   |
|              Experience Linux.                |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Frank Fiene - 04 Jul 2006 15:13 GMT
>>> If you are using vesion 8 then you have to export tables from one
>>> tablespace and import then into the other.
[quoted text clipped - 4 lines]
>
> There is a command db2move

Yes, i found this, too!

What i've tried:
1.) db2move sample export -ts USERSPACE1
2.) db2 create db temp
3.) db2move temp import
4.) db2 CONNECT TO TEMP;
5.) db2 RENAME TABLESPACE USERSPACE1 TO MYSPACE1;
6.) db2 CONNECT RESET;
7.) rm tab*
7.) db2move temp export -ts MYSPACE1
8.) db2move sample import
9.) db2 connect to sample
10.) db2 list tablespaces

No tablespace MYSPACE1 in sample, but in temp!

The output of db2move import (partially):
* IMPORT:  table "DB2INST1"."SALES"
 -Rows read:         41
 -Inserted:          41
 -Rejected:           0
 -Committed:         41

...
Hardy - 04 Jul 2006 16:50 GMT
if you just want to replace the TS_SEW_ACCESS_DEMO to TS_TEST2? if so,
try "rename tablespace TS_SEW_ACCESS_DEMO to TS_TEST2"

Frank Fiene

> How does this work?
>
[quoted text clipped - 6 lines]
>
> Frank
Hardy - 04 Jul 2006 16:55 GMT
sorry, i just didn't see your later replay and make the mistake.
Hardy

> if you just want to replace the TS_SEW_ACCESS_DEMO to TS_TEST2? if so,
> try "rename tablespace TS_SEW_ACCESS_DEMO to TS_TEST2"
[quoted text clipped - 11 lines]
> >
> > Frank
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.