473,385 Members | 2,015 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,385 software developers and data experts.

Help with db2move

Hi, i am not really a db2 specialist, so i think i have a basic problem.

I have two tablespaces in one database which are a generated by SAP Business
One. The tablespaces are representing different companies. Here, on is for
testing the other for productive use.

Now i want to copy the test tablespace onto the productive one.

I tried the following without success:

I've done a "db2move sbo_db export -ts ts_test",
imported this in another database with
"db2move temp import".

After renaming ts_test to ts_prod in temp database, i've tried the way back
but it seems that the data is not imported into the original database!

Is this the correct way to do this?
Please help!

Frank
Jul 5 '06 #1
6 1975
Frank Fiene wrote:
Hi, i am not really a db2 specialist, so i think i have a basic problem.

I have two tablespaces in one database which are a generated by SAP Business
One. The tablespaces are representing different companies. Here, on is for
testing the other for productive use.

Now i want to copy the test tablespace onto the productive one.

I tried the following without success:

I've done a "db2move sbo_db export -ts ts_test",
imported this in another database with
"db2move temp import".

After renaming ts_test to ts_prod in temp database, i've tried the way back
but it seems that the data is not imported into the original database!
In DB2 9 (you didn't state the release) you can use teh COPY_SCHEMA()
procedure to copy a schema within a database.
In DB2 V8.2 you can take a look at this article:
http://www.ibm.com/developerworks/db...dm-0602rielau/

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab

IOD Conference
http://www.ibm.com/software/data/ond...ness/conf2006/
Jul 5 '06 #2
Serge Rielau wrote:
In DB2 9 (you didn't state the release) you can use teh COPY_SCHEMA()
procedure to copy a schema within a database.
In DB2 V8.2 you can take a look at this article:
http://www.ibm.com/developerworks/db...dm-0602rielau/
Sorry, 8.2! ;-)

But this is for Schema copy, not for tablespace copy! Right?
Jul 5 '06 #3
Frank Fiene wrote:
http://www.ibm.com/developerworks/db...dm-0602rielau/
What I can see from the article you could use:
COPYSCHEMA(<TARGETSCHEMA>,<TARGETTABLESPACEINFO>,< SOURCESCHEMA>)
So. first you create a new tablespace (TARGETTABLESPACEINFO) and then run
this.
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| Gregor Kovac | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 5 '06 #4
Serge Rielau wrote:
In DB2 9 (you didn't state the release) you can use teh COPY_SCHEMA()
procedure to copy a schema within a database.
In DB2 V8.2 you can take a look at this article:
http://www.ibm.com/developerworks/db...dm-0602rielau/

Cheers
Serge
Wow! Pitty I didn't have this/know about this couple of month ago :(

Best regards,
Kovi

--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| Gregor Kovac | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 5 '06 #5
Gregor Kovač wrote:
Frank Fiene wrote:
>http://www.ibm.com/developerworks/db...dm-0602rielau/

What I can see from the article you could use:
COPYSCHEMA(<TARGETSCHEMA>,<TARGETTABLESPACEINFO>,< SOURCESCHEMA>)
So. first you create a new tablespace (TARGETTABLESPACEINFO) and then run
this.
As i know, all Business One tables are in one schema, but different
tablespaces for the companies.

So if i do this, i will copy all tablespaces in one schema and rename it
with one tablespace name! Right. This is bad.

Jul 5 '06 #6
Frank Fiene wrote:
Gregor Kovač wrote:
>Frank Fiene wrote:
>>http://www.ibm.com/developerworks/db...dm-0602rielau/

What I can see from the article you could use:
COPYSCHEMA(<TARGETSCHEMA>,<TARGETTABLESPACEINFO>, <SOURCESCHEMA>)
So. first you create a new tablespace (TARGETTABLESPACEINFO) and then run
this.

As i know, all Business One tables are in one schema, but different
tablespaces for the companies.

So if i do this, i will copy all tablespaces in one schema and rename it
with one tablespace name! Right. This is bad.
Oh... Now I see :)
So, this is what you can do:
SELECT TABNAME FROM SYSCAT.TABLES WHERE TBSPACEID = (SELECT TBSPACEID FROM
SYSCAT.TABLESPACES WHERE TBSPACE = 'ts_test')
Now you have tables that are in tablespace ts_test and you can export them
and import then into new tables.

--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| Gregor Kovac | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 5 '06 #7

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

Similar topics

1
by: TD Matthews | last post by:
I'm hoping someone has seen this. I'm moving our dev db (8.1 FP5 for both) to a windows machine from AIX using db2move, and all goes well except with a few tables like PAYPERIOD IMPORT: -Rows...
2
by: erkki | last post by:
Hi, I am trying to move DB2 8.1 database from AIX to Windows. Following errors appears when I try to run db2move db import. <IMPORT.out> ***** DB2MOVE ***** Action: IMPORT
1
by: Terry | last post by:
Hi All, Im attempting to use db2move from 7.1.0 to 8.1.4. It fails to import tables defined using the columns with GENERATED ALWAYS. The error message generated follows: "SQL3550W The field...
4
by: Christos Kalantzis | last post by:
Hello I am migrating a DB from AIX DB2 7.2 to Linux DB2 8.2.2 amd_64bit Linux 2.6. I have often migrated databases from one platform to another without any issues using db2move db2move dbname...
2
by: ibm_97 | last post by:
Hi, I'd like to move 2 tables' data from schema1 in db1 to schema2 in db2. There's no schema1 in db2. I use something like the following, but I end up getting tables under schema2 in db2. Any...
2
by: Alan | last post by:
Guys, Got a DB2 ver. 8.2 on Windows 2003 with four tablespaces (some field size around varchar(2000 on it) define on it. Try to create another database on another Windows 2003 server using db2move...
2
by: Mani | last post by:
Hi Everyone, i have a doubt regarding db2move utility. I have created a database with circular logging (primary logs - 2, secondary logs - 1). I imported tables into this new db using db2move....
0
by: mikeodba | last post by:
Summary: SQL3255 Reason code 2 from db2move with DB2 v9.1 fixpack 5. on Win32. Win32 DB2 version 9.1 fixpack5 , performing DB2MOVE COPY with SCHEMAMAP between two local databases in the same...
1
by: Richard2000 | last post by:
Hi team, Has anyboby faced this issue? I'm trying to use db2move to export as400 schema content to my local windows file system. The aim is to be able to re-import it into a DB2 UDB v9 Windows...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.