MySQL Forums
Forum List  »  IBM DB2

Re: MYSQL to DB2 Migration
Posted by: hawk sury
Date: July 27, 2010 06:36AM

Kamran Saadatjoo Wrote:
-------------------------------------------------------
> Is the data you’re generating going to be loaded
> to DB2 with the IMPORT command? If so, I think
> you might want to use the SELECT … OUTFILE
> command with character fields terminating with
> double-quotes, something like below:
>
> SELECT *
> FROM tbl
> INTO OUTFILE ‘outfile.txt’
> FIELDS ESCAPED BY ‘’
> OPTIONALLY ENCLOSED BY ‘”’
> TERMINATED BY ‘,’
> LINES TERMINATED BY ‘\n’;
> ---------------
Thanks for replying Kamran

I actually want to do the migration by running the SQL scripts.
I wanted to use the delimited format though, but because i am running DB2 on a virtual machine and using Technology Explorer web interface for accessing the db2, i am facing problems with db2's Import and Load commands as i am not sure where the data should reside on a virtual machine ( i mean the path ) db2 does not seem to pick up the path where my delimited files are.

So i decided to just run the SQL script instead. But now the problem is MYSQL on windows un-necessarily prints \n when using mysqldump command.

Many Thanks,

Options: ReplyQuote


Subject
Views
Written By
Posted
7452
July 26, 2010 01:00PM
4000
July 26, 2010 05:39PM
Re: MYSQL to DB2 Migration
3593
July 27, 2010 06:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.