Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: use sqlldr with perl

by CountZero (Bishop)
on Jan 28, 2015 at 07:29 UTC ( [id://1114709]=note: print w/replies, xml ) Need Help??


in reply to use sqlldr with perl

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

Replies are listed 'Best First'.
Re^2: use sqlldr with perl
by gary16 (Novice) on Jan 28, 2015 at 08:37 UTC
    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.
      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

        yes.I agree on u.So the issue is strange.Though the text is gbk or utf8,I can configure the characterset zhs16gbk or al32utf8 in control file.

        Oh,right,I have missed a important information.when I rename the title of my data text to test.txt,then no matter what the encoding of my data text,the issue will disappear!!!I can import it .So I think there is something unkonown in perl.

      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
        thank u very much.Because I have check the code and discover the fault.And indeed there is no relationship between the bug and perl or sqlldr.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1114709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-25 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found