Re: use sqlldr with perl
by CountZero (Bishop) on Jan 28, 2015 at 07:29 UTC
|
Since all the work is done by sqlldr, Perl has absolutely nothing to do with this problem.Please check your control file and see if it contains perhaps a "CHARACTERSET UTF8" line. Also, both the control file CHARACTERSET definition, the import-file data and the database itself must all have the same (or at least compatible) characterset definitions. If one of them is out-of-sync then you will indeed get strange results.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
| [reply] [d/l] [select] |
|
This times because I need to pretreatment the data text,use system() to call the sqlldr.I have imported the data with sqlldr in microsoft's cmd several times successfully.So I Dont't think the mistake are from the sqlldr.
| [reply] |
|
Unless I am really mistaken, sqlldr will import external data into an Oracle database. The Perl system command will just start sqlldr for you and then sqlldr takes over. The data doesn't pass through your perl-script at all.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
| [reply] [d/l] [select] |
|
|
What do you mean with "pre-treatment" of the data text? The perl part of your program does not do anything with the data-file.
CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James My blog: Imperial Deltronics
| [reply] |
|
Re: use sqlldr with perl
by Utilitarian (Vicar) on Jan 28, 2015 at 11:23 UTC
|
| [reply] [d/l] |
Re: use sqlldr with perl
by Anonymous Monk on Jan 28, 2015 at 07:51 UTC
|
What operating system are you using? You might need systemW from Win32::Unicode | [reply] |
|
really?? MY os is win7 and windows server 2008
| [reply] |
|
| [reply] |
|
|
Re: use sqlldr with perl
by soonix (Canon) on Jan 28, 2015 at 10:22 UTC
|
possibly has nothing to do with your problem, but this
if($filename){
only checks for "not-emptyness" of the filename. You probably intended one of the -X functions (probably one or more of -e -r -f -s -T).
From the rest of the discussion, my guess is that the problem is in fact the encoding of the filename, as our Anonymous brother seems to hint … | [reply] [d/l] [select] |
|
| [reply] |