Re: getting data from MySQL to IBM DB2
| From: | Andreas Korthaus | Date: | Thu, 21 Aug 2003 07:49:59 +0000 |
| Subject: | Re: getting data from MySQL to IBM DB2 | ||
| References: | 1 2 3 4 5 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-7323@lists.php.net to get a copy of this message | ||
Hi Thierry!
Thierry B. wrote:
> I recently did the same thing (not for php use), but this was from
> AS400/db2 to Mysql. I made a SQL dump (structure an data) from DB2
> using SQL/99 mode, and I found only some slight differences easily
> corrected. So the reverse should not be very difficult.
On DB2 I did not found a tool as mysql commandline client, where I can read
sql-dump data from a file into the Database, with Create-Statments...
I found the db2 client, but here I only can read 64 KB data from a file,
other way was using LOAD-Command, but here I only can read data from one
table, I have 100 tables!
A problem is the usage of # for comments in mysqldumps, which is not sql
compliant (right word? don't know). Could you please tell me which tool you
used for exporting a sql-dump from DB2 and do you know a special tool for
importing a dump for a whole database with 200 MB Data and 100 tables?
> Why can't you create nextID tables on DB2?
Because mysql uses auto-increment here, I don't know if DB2 undestands this
in create-statements, and I don't know how PEAR_DB implements nextID() if I
use DB2/ODBC, if it is not the same way as in mysql it will not work.
Amdreas
> ----- Original Message -----
> From: "Andreas Korthaus" <akorthaus@web.de>
> Newsgroups: php.pear.general
> To: <pear-general@lists.php.net>
> Sent: Wednesday, August 20, 2003 10:44 AM
> Subject: getting data from MySQL to IBM DB2
>
>
>> Hi!
>>
>> I'm using MySQL with PEAR::DB. Now I want to migrate to DB2, how
>> should I do this? The first problem is that the SQL-Commands are not
>> 100% comatible, so I cannot use a dump, right? So I have to export
>> the data in CVS format and create the tables in DB2 myself. But what
>> about "nextID()" tables? I cannot copy theses tables to DB2, but if
>> PEAR generates new tables, it will start counting with ID=1.., but I
>> have a lot of data and therefore higher IDs. How could I handle this?
>>
>> Thank You!
>>
>> Kind regards,
>> Andreas Korthaus