We help IT Professionals succeed at work.

Migrate database v6.1

Groupe Promutuel
on
Hello, Right now my database production are at v.9.7 and i want to migrate my 3 old database v6.1

I would like to khow what is the best solution to migrate database v.6.1 to 9.7?

1- Is that possible to migrate database directly from 6.1 to 9.7 (probably by using db2look or something)

2- Do i need to migrate it from 6.1 to 7, 7 to 8 and 8 to 9.7 ?

Mike
Comment
Watch Question

Kent OlsenData Warehouse / Database Architect

Commented:
Hi pro,

According to IBM, the only guaranteed migration is a single major release level.  That is, you can upgrade from 6 directly to 7, but not to 8 or 9.  You'll have to upgrade incrementally (once to 7, again to 8, and again to 9) or convert the database from 6 to 9.

How much data do you have?  How complex is the database?  If your database is small, it may be easier to dump/export it and recreate it anew in a Version 9 database.


Kent

Author

Commented:
Hello Kent,

Présently i have 3 database with 2 of them have 80 table and other one with 38 tables.

Oh i forget to tell about my 3 databases i want to migrate are Windows one, andi  want to migrate them to Linus.

Mike
Kent OlsenData Warehouse / Database Architect

Commented:
Hi Mike,

Are you using DB2 Express, or a licensed version of DB2 Enterprise?

80 tables may be manageable.  About how much data is this?


Kent

Author

Commented:

Hi, yes we are using a licensed version of DB2 Enterprise and about  10,7 millions rows.

Mike
Data Warehouse / Database Architect
Commented:
10 million rows should move pretty easily.

Federate your DB2 systems.  (Logically connect them so that the objects in the version 6 system are visible to the version 9 system.)  Then you move all of the data directly into the version 9 system with SQL.  

10 million rows should move rather quickly this way.  Even with the "programming" of writing the SQL I would think that you could build the entire move process in a couple of days, and actually execute the move in about an hour.


Kent
Hello Kent,

Thanks for your fast response, i will try that, like you said should be fast and easy.

Mike

Author

Commented:
Because it making sence

Author

Commented:
thanks
Kdo's solution works, but there is an easier option.
Pl note: This is not  an objection, but a comment to help promutel

“Remote load from cursor” or “Load from cursor using remote fetch” is a new feature introduced with DB2 V9.1 and above, but the source database can be a lower version.

Here is how remote cursor can be used:

Remote catalog the source db on the target instance.

Define a cursor based on the remote connection like this:  db2 ” DECLARE C1 CURSOR DATABASE <sourcedbname>  USER <userid> USING <passwd> FOR <SELECT * FROM <source tablename>>”
Last step is to use “load from cursor C1…..” like you would for any load from cursor.

eg
db2 catalog tcpip node db261n remote <host> server <port>
db2 catalog db mydb as db261 on node db261n
db2 declare c1 cursor database db261 user myuser using mypwd for select * from schema1.table1
db2 load from c1 of cursor insert into schema1.table1

HTH

 
Kent OlsenData Warehouse / Database Architect

Commented:
Hi HTH,

Good thought.  I've not had occasion to use the DECLARE CURSOR ... DATABASE ... syntax and in fact, hadn't even read much about it.  I like it.  :)

Thanks for making me a bit smarter today....


Kent