0

I am importing an oracle database dump file into windows that was exported from linux. Some of the tables have text fields and text data with embedded line feed (using linux format) and those records are not imported into my windows tables.

Can anyone say if there is a solution to this issue.

I can create a csv of individual tables, replace the linux linefeed (\n) with windows linefeed (\r\n) in the text fields that contain linefeed characters and use sqlldr to import into windows which will be fine.

Question is how do I do this when I create a single dump of the entire database and use imp to import.?

Regards

Aftab

2 Answers2

0

I'm not sure I fully understand the question, but for converting between UNIX and DOS linefeeds, you can use the unix2dos and dos2unix command-line utilities. See my answer to Error importing MySQL data across platforms (MAMP to WIMP).

Community
  • 1
  • 1
Zhehao Mao
  • 1,789
  • 13
  • 13
  • Hello Zhehao - let me put this a little clearer. I created a export dump using 'exp' on oracle for linux. I imported the dump using 'imp' using oracle for windows. in my tables, there are some text fields with linefeeds (created in oracle for linux) but when I imp into oracle for windows those records are dropped. What I can do on the other hand is create a .csv file of a table and replace all \n with \r\n for the fields that contain line feeds, then I can do a sqlldr in windows and the data are all in. Question is how do I do this with a dump file. – Fazal Bacchus Jun 17 '11 at 15:11
  • Oh, sorry, I can't help you there then. I don't know anything about Oracle database. – Zhehao Mao Jun 17 '11 at 16:07
  • @TheBaku: When you say "those records are dropped", what do you mean? Do you have some rejection file generated by the imp utility? – Olaf Jun 17 '11 at 17:18
  • Records are dropped most likely beccause of windows interpretation of the \n character. When I create a csv file and replace all \n with \r\n, it then works. Perhaps I may have to look at Zhehao's theory of running a unix2dos utility on the dump file and see if that helps. – Fazal Bacchus Jun 24 '11 at 12:45
0

As far as I know, if you are using impdp/expdp utilities, you are all set. I'm not sure about the legacy imp/exp utilities though.

Olaf
  • 6,249
  • 1
  • 19
  • 37