SQL*Loader permission issue?

I have set up a run_all script on LINUX to invoke SQL*Loader for each table to be loaded. I can run this as the Oracle owner just fine. When I try to let the developer run this on dev, they get the following:
SQL*Loader: Release 9.2.0.1.0 - Production on Tue Apr 25 08:55:18 2006
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL*Loader-128: unable to begin a session
ORA-01034: ORACLE not available
ORA-27121: unable to determine size of shared memory segment
Linux Error: 13: Permission denied
They can use SQL*Plus on the command line with the userid and password from the SQL*Loader file. I don't want to have to run these for them every time, so any help or ideas would be greatly appreciated!

Hi
Has the same ORACLE_HOME variable value of the Oracle owner and the developer?
Ott Karesz
http://www.trendo-kft.hu

Similar Messages

  • Sql loader syntax issue

    SQL*Loader: Release 11.1.0.7.0 - Production on Thu Mar 18 07:21:37 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SQL*Loader-350: Syntax error at line 1.
    Expecting keyword LOAD, found "ÐÏ".
    ÐÏࡱá
    ^
    My sqlldr file looks like this:
    sqlldr control=C:\data\ctl\ss.ctl log=C:\data\logs\ss.log userid=User/Password errors=999 discard=C:\data\discard\ss.dis
    control file looks like this:
    LOAD DATA
    INFILE 'C:\data\SS.TXT' "STR '\r\n'"
    REPLACE
    INTO TABLE SS
    FIELDS TERMINATED BY ';'
    TRAILING NULLCOLS
    ACCOUNT_NBR CHAR,
    ADDR1 CHAR,
    ADDR2 CHAR,
    ADDR3 CHAR,
    ADDR4 CHAR,
    CITY CHAR,
    STATE CHAR,
    ZIPCODE CHAR ,
    more columns all of the are the same syntax column name and char
    I can load this table using the enterprise manager but when using the sqlldr its not working.
    Anything stand out?
    Edited by: mlojan on Mar 18, 2010 5:33 AM

    Only thing I can think of is there is some character set issue between the control file and the operating syste/oracle server.
    You did you create the control file using a text based editor such as notepad or wordpad didn't you? You haven't used something like MS Word?

  • SQL*Loader Date issue

    How do i get sql loader to recognize recognize AM/PM. My control file is below. The error I get is syntax error at line 14. Expecting field-name, found ")".
    OPTIONS ( SKIP=0)
    LOAD DATA
    INFILE '/ftp_data/labor_scheduling/kronos_punch_temp/kronos_punches.csv'
    BADFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.bad'
    DISCARDFILE '/ftp_data/labor_scheduling/kronos_punches/kronos_punches.dsc'
    INTO TABLE "STAFFING"."KRONOS_TEMP_PUNCHES"
    TRUNCATE
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    (EMPLOYEE_ID,
    SCHEDULE_DATE DATE "MM/DD/YY",
    PUNCH DATE "MM/DD/YY HH:MI AM"
    )

    Hi Gary,
    Could your problem be with this?
    (EMPLOYEE_ID,You have no data type for that field.
    Regards
    Peter

  • SQL*Loader-500 Issue

    Hello
    Using Oracle 11g, I am trying to load a table from data in csv files with oracle SQL Loader,
    table : purchase
    control file : purchase.ctl
    Even if I am giving the right path for control file I still get the error :
    SQL*Loader-500: Unable to open file (purchase.dat)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specifiedSo why is SQL Loader looking for the file purchase.dat??
    Any help is appreciated

    Talend is the right solution to load data. Now about your problem, have you configured Talend in order to transfer the data? Because Talend can easily transfer the files.
    Maybe you might be able to go to the Talend website to get more information there: http://www.talend.com/

  • SQL*Loader output issue

    Hi,
    When I load a flat file with SQL*Loader (V 8.1.7 on Windows), I get output something like,
    Commit point reached - logical record count 2352
    Commit point reached - logical record count 2364
    Commit point reached - logical record count 2376
    Commit point reached - logical record count 2388
    Commit point reached - logical record count 2400
    If I want to change this, say I want this message for each 1000 records inserted, how can I do that?
    I have tried options line bindsize or rows, but looks like they are for changing internal operation, but not this screen output.
    Off course, I am talking about conventional path load.
    Any ideas?
    Thanks

    set rows=1000 and increase the bindsize drastically.
    From the docs here
    If that size fits within the bind array maximum, the load continues--SQL*Loader does not try to expand the number of rows to reach the maximum bind array size. If the number of rows and the maximum bind array size are both specified, SQL*Loader always uses the smaller value for the bind array.

  • SQL*LOADER connection issue

    I have oracle 9i installed, if i'm to connect to the database using the sys account i getv a message saying have to connect as sysdba or sysoper. Ok so i use "username/password@database as sysdba", and that works fine i'm able to connect. But this does not work at the inital login screen, i have to connect as using this other account i created then log in useing the string above. My problem is now im using SQL*LOADER to load data into a table and it won't accept the connection string. If it use that connction string listed above i get the error "ORA-12154:could not resolve service name" and if i remove "as sysdba" from the end of the string i get error "ORA-01017: invalid username/password". I use to be able to just log on with just "sys" username is there any way to change it back or any other way to log on to SQL*LOADER. Any help would be appreciated. Thanks

    When you are working with SQL*Loader, SQL*Plus and other utilities you can specify what is the database to be connected through local naming (client, server ) or seeting an enviroment variable in the session. If you are getting connection in the server and you have problems resolving local naming, I recommend you to do this:
    1.- Set the ORACLE_SID enviroment variable and do not use local naming resolving with tnsnames.ora entries
    2.- Configure very well the tnsnames.ora & sqlnet.ora files to get connection.
    If you are working directly in the server the first option is easier.
    Setting the variable in Windows:
    SET ORACLE_SID=<database_sid>
    Setting the variable in Unix/Linux:
    export ORACLE_SID=<database_sid>
    if you need more help to do this step by step I can help you.
    Joel Pérez

  • Sql loader -  to_date() issue

    How do I load the date field from the CSV *"03-Dec-09 10.06.58.00 PM"* into oracle tables using sql loader ?
    The contol file is as follows:
    LOAD DATA
    INTO TABLE
    CUSTOMER
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (CUST_ID,
    ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
    but it doesn't work, I also tried _ORDER_DATE "DD/MM/YYYY"_ with no luck, any suggestion ?
    I am kind of new in using SQL LOADER.
    thanks.

    The CSV sample you provided uses " *.* " in the time-component [ 10.06.58.00 ] while your SQL Loader Control file is expecting " *:* " [ HH:MI:SS.TT ]. These two formats are obviously not the same. Update your control file and try again.
    CUST_ID, ORDER_DATE
    1,03-Dec-10 10.06.58.00 PM
    2,03-Dec-09 10.07.18.00 PM
    3,03-Dec-11 04.07.18.00 AM
    4,01-Dec-07 10.07.18.00 PM
    5,03-Dec-10 10.07.18.00 AM
    6,12-Dec-10 10.07.18.00 PM
    CONTROL FILE Which "doesn't work "
    LOAD DATA
    INTO TABLE
    CUSTOMER
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (CUST_ID,
    ORDER_DATE "to_date(:ORDER_DATE, 'DD-MON-YY HH:MI:SS.TT AM')"
    {code}
    Edited by: user130038 on Sep 9, 2011 6:56 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • SQL loader import issue..

    Hi,
    I am working on 10g database on ibm AIX ..
    i need to use sql loader and insert some data in to table using a input file.
    The input file contains follwing format..- data.dat
    001 901 200 1611196 "dis
    ltype
    gu" Mhamicddu kuasa 12as king
    all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
    I am using following control file..
    LOAD DATA
    INFILE '/home/oracle/data.dat'
    INSERT INTO TABLE emp
    (e1,e2,e3,e4,e5,e6,e7,e8,e9)
    any idea ...wht all things i need to include in my control file to perform this insert...
    I am using below control file ..
    LOAD DATA
    INFILE '/home/oracle/data1.csv'
    APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (ename,edd,emob)
    By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
    Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
    How to insert data in to one row..
    This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
    Robin "Address"
    13
    but it is inserting emob value (13) in ename ...like next line as a new row...

    oradba11 wrote:
    Hi,
    I am working on 10g database on ibm AIX ..
    i need to use sql loader and insert some data in to table using a input file.
    The input file contains follwing format..- data.dat
    001 901 200 1611196 "dis
    ltype
    gu" Mhamicddu kuasa 12as king
    all these values are tab deliminated and one column value "disltypegu" is enclosed by " " and in next line. This "disltypegu" shuld be inserted in to one column.
    I am using following control file..
    LOAD DATA
    INFILE '/home/oracle/data.dat'
    INSERT INTO TABLE emp
    (e1,e2,e3,e4,e5,e6,e7,e8,e9)
    any idea ...wht all things i need to include in my control file to perform this insert...
    I am using below control file ..
    LOAD DATA
    INFILE '/home/oracle/data1.csv'
    APPEND
    INTO TABLE emp
    FIELDS TERMINATED BY X'09'
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    (ename,edd,emob)
    By using this control file , we can import tab delemenated and enclosed by "" column ...it is working ..
    Only thing is if some column data is in next row , it is treating it as a second row and inserting in to new row..
    How to insert data in to one row..
    This is my data file ... with 3 column values .. ( ename -Robin , edd - Address , emob - 13)
    Robin "Address"
    13
    but it is inserting emob value (13) in ename ...like next line as a new row...How is this data file created and what processes (automated AND manual) does it pass through before coming to sqlloader? It looks to me like it is getting manually copied and pasted from notepad with line wrap turned on. You really need to address why the data is being wrapped across multiple lines (records).
    Edited by: EdStevens on Mar 13, 2012 7:48 AM

  • SQL Loader format issue

    Hello,
    I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
    I get the error:
    Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
    ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
    Dates in .csv file appear as such:
    For example - 10/26/2001 0:00:00
    The question is in my ctl file, how do I format?
    I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
    to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
    Any tips would be appreciated. I get a message on the command prompt about:
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 39
    Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
    Thanks!

    user515689 wrote:
    Hello,
    I'm having an issue with the formatting of a date. My csv file, exported from another ora table, has the date in full date format ()
    I get the error:
    Record 12: Rejected - Error on table LOAN_VER_REQ_ARCH, column ORIGINATION_DATE.
    ORA-01843: not a valid monthand two other fields that are date fields get similar errors.
    Dates in .csv file appear as such:
    For example - 10/26/2001 0:00:00
    The question is in my ctl file, how do I format?
    I've tried to_char(ORIGINATION_DATE,'MM-DD-YYYY') or
    to_date(ORIGINATION_DATE,'MM-DD-YYYY') These dont' work. I don't recall doing any of this stuff in Ora 9i, but perhaps I wasn't loading date fields before in any tables I uploaded data into.
    Any tips would be appreciated. I get a message on the command prompt about:
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Commit point reached - logical record count 39
    Commit point reached - logical record count 78but that's incorrect because no records are going into the table. I'll worry about that part later though if I can get this date thing resolved.
    Thanks!Well, the sample string you've provided doesn't match the formats you've been attempting to use. Yours are separated with a hyphen whereas your sample data is separated by a slash.
    Is ALL the data in the same format?
    If so, perhaps this (based on your sample string)....
    TUBBY_TUBBZ?select to_date('10/26/2001 0:00:00', 'mm/dd/yyyy HH24:MI:SS') from dual;
    TO_DATE('10/26/20010
    26-OCT-2001 12 00:00
    1 row selected.
    Elapsed: 00:00:00.01As for specifying this in the control file
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch09.htm#1011137
    (you mentioned Oracle 9, so i'm not sure if that's the version you are still on or not).
    Edited by: Tubby on Jul 27, 2010 11:50 AM
    Added link to documentation.

  • Permission issues accross schemas to load XMLTYPE column - structured storage

    Hi,
    We have a table in BIUSER schema this table is object-realtionally stored with XMLs. When we are trying to load receords from ETLUSER schema we are getting the error as
    Record 1: Rejected - Error on table "BIUSER"."PWAYWORKFILE_TABLE".
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01031: insufficient privileges
    Heres the oracle installation details
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production"
    All the records are moving to the bad file, whereas the same load happens normally in its own schema i.e. BIUSER
    Suspecting this as permission issues we have already given the permission to the table sysnonym as given below in the registration script.
    We googled and found few things about ACLs that we are not sure of , its that is the issue please let us know if this table can be created and loaded from different schema
    Heres the table creation and registration script
    set echo on
    spool regschema.log
    set define on
    set timing on
    set long 100000 pages 0 lines 256 trimspool on timing on
    drop table PWAYWORKFILE_TABLE;
    drop sequence PWAYWORKFILE_TABLE_SEQ;
    begin
    dbms_xmlschema.deleteschema('workfile.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('TotalLoss.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('Salvage.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('rate.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('notes.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('Image.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('Event.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('estimate.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('CoTotals.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('corr.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('Admin.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('Vins.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('commonType.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'commonType.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'commonType.xsd';
    BEGIN
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'Admin.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'Admin.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'CoTotals.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'CoTotals.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'Event.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'Event.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'Image.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'Image.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'Salvage.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'Salvage.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'TotalLoss.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'TotalLoss.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME        VARCHAR2(700) := 'Vins.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'Vins.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      -- DOM Fidelity enabled due to presence of mixed text, substitution group heads, or repeating choice structures in complex type defintion :-
      DBMS_XMLSCHEMA_ANNOTATE.enableMaintainDOM(V_XML_SCHEMA,'RefurbMgr',TRUE);
      select /*+ NO_XML_QUERY_REWRITE */
             XMLQuery(
               'declare namespace xdb = "http://xmlns.oracle.com/xdb"; (:
                copy $NEWSCH := $SCHEMA modify (
                                          let $MODEL := $NEWSCH/xs:schema/xs:complexType[11]/xs:all
                                          return (
                                            replace value of node $MODEL/xs:element[2]/xs:complexType/@xdb:maintainDOM with "false",
                                            replace value of node $MODEL/xs:element[3]/xs:complexType/@xdb:maintainDOM with "false",
                                            replace value of node $MODEL/xs:element[4]/xs:complexType/@xdb:maintainDOM with "false"
                 return $NEWSCH'
               passing V_XML_SCHEMA as "SCHEMA"
               returning content
        into V_XML_SCHEMA
        from dual;
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'corr.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'corr.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'estimate.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'estimate.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'notes.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'notes.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'rate.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'rate.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'workfile.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'workfile.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
      -- Out-of-Line mappings for 1000 Column optimization :-
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'AdminComp','ADMINCOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'NotesComp','NOTESCOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'SalvageComp','SALVGCOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'CorrComp','CORRCOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'ImageComp','IMAGECOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'EventInterfaceManagerComp','EVIFCMGRCOMP_XML');
      DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'WorkfileType', 'TotalLossComp','TOTALLOSSCOMP_XML');
      DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => TRUE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    -- Table creation for namespace "http://www.cccis.com/Pathways/Workfile"
    set lines 80
    CREATE TABLE "PWAYWORKFILE_TABLE"
          SequenceID NUMBER,
          DL_CLM_FOLDER_ID   VARCHAR2(30),
          CUST_CLM_REF_ID VARCHAR(25),
          ems_file_nm               varchar2(256),
          EST_IND         VARCHAR2(3),
          rec_dt date default sysdate,
          filesent_datetime date,
          CLM_TYP_CD               VARCHAR2(2 CHAR),
          WORKFILE  XMLTYPE
    XMLTYPE COLUMN WORKFILE
    STORE AS OBJECT RELATIONAL
    XMLSCHEMA "workfile.xsd" ELEMENT "PwayWorkfile"
    create sequence PWAYWORKFILE_TABLE_SEQ
    start with 1
    increment by 1
    nomaxvalue
    create trigger PWAYWORKFILE_TABLE_TRIGGER
    before insert on PWAYWORKFILE_TABLE
    for each row
    begin
    select PWAYWORKFILE_TABLE_SEQ.nextval into :new.SequenceID from dual;
    end;
    desc PWAYWORKFILE_TABLE
    /* create synonym */
    create or replace public synonym PWAYWORKFILE_TABLE for PWAYWORKFILE_TABLE;
    grant select on PWAYWORKFILE_TABLE to BIUSER_RO;
    grant select, insert, update,delete on PWAYWORKFILE_TABLE to biuser_full;
    exit;
    Regards,
    Arghyadip

    Hi MarcoGralike,
    I have finally acquired a sample schema and xmls to reproduce the errors that i am getting even after acquiring XDBADMIN privilege and registering my schema as GLOBAL.
    Here's the problem i am facing, whenever i intend to store the PublisherList (publisher.xsd) out of line while registration i am running into insufficient privilege issues even if i have the schema registered using (LOCAL => FALSE), whereas it runs smooth in BIUSER and if i dont set it out of line it works in ETLUSER as well.
    Here are the 2 XSD files
    books.xsd   --- this is the root element
    <xs:schema  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"  version="1.0" xdb:storeVarrayAsTable="true">
      <xs:include schemaLocation="publisher.xsd"/>
      <xs:element name="books" type="bookType"/>
      <xs:complexType name="bookType" abstract="true">
        <xs:sequence>
        <xs:element name="author" type="xs:string" minOccurs="0"/>
        <xs:element name="title" type="xs:string" minOccurs="0"/>
        <xs:element name="genre" type="xs:string" minOccurs="0"/>
        <xs:element ref="PublisherList" minOccurs="0"/>
       </xs:sequence>
       </xs:complexType>
    </xs:schema>
    publisher.xsd -- this is a child elelment which in my actual scenario is so big that i must keep it out of line during registration
    <xs:schema  xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"  version="1.0" xdb:storeVarrayAsTable="true">
      <xs:element name="PublisherList" type="PublisherListType"/>
      <xs:complexType name="PublisherListType">
        <xs:sequence>
        <xs:element name="Name" type="xs:string" minOccurs="0"/>
        <xs:element name="Office" type="xs:string" minOccurs="0"/>
       </xs:sequence>
       </xs:complexType>
    </xs:schema>
    Here's the sample XML
    <?xml version="1.0"?>
    <books xmlns:xs="http://www.w3.org/2001/XMLSchema">
          <author>Writer</author>
          <title>The First Book</title>
          <genre>Fiction</genre>
          <PublisherList>
           <Name>Penguin</Name>
           <Office>London</Office>
          </PublisherList>
    </books>
    Here's how i am registering the Schemas in BIUSER which has XDBADMIN privilege
    DROP TABLE BOOKS_TABLE;
    begin
    dbms_xmlschema.deleteschema('books.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    begin
    dbms_xmlschema.deleteschema('publisher.xsd',dbms_xmlschema.DELETE_CASCADE);
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'publisher.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'publisher.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
        DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => FALSE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    declare
      V_XML_SCHEMA_NAME       VARCHAR2(700) := 'books.xsd';
      V_XML_SCHEMA             XMLType       := xmlType(BfileName('XSD_DIR',V_XML_SCHEMA_NAME),nls_charset_id('AL32UTF8'));
      V_SCHEMA_LOCATION_HINT   VARCHAR2(700) := 'books.xsd';
    begin
      DBMS_XMLSCHEMA_ANNOTATE.printWarnings(FALSE);
      DBMS_XMLSCHEMA_ANNOTATE.disableDefaultTableCreation(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.SETTIMESTAMPWITHTIMEZONE(V_XML_SCHEMA);
      DBMS_XMLSCHEMA_ANNOTATE.disableMaintainDom(V_XML_SCHEMA,FALSE);
    DBMS_XMLSCHEMA_ANNOTATE.setOutOfLine(V_XML_SCHEMA,DBMS_XDB_CONSTANTS.XSD_COMPLEX_TYPE,'bookType', 'PublisherList','PUBLISHERLIST_XML');
        DBMS_XMLSCHEMA.registerSchema(
        SCHEMAURL       => V_SCHEMA_LOCATION_HINT
       ,SCHEMADOC       => V_XML_SCHEMA
       ,LOCAL           => FALSE
       ,GENTYPES        => TRUE
       ,GENTABLES       => TRUE
       ,ENABLEHIERARCHY => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_NONE
    end;
    CREATE TABLE BOOKS_TABLE
          BOOKS  XMLTYPE
    XMLTYPE COLUMN BOOKS
    STORE AS OBJECT RELATIONAL
    XMLSCHEMA "books.xsd" ELEMENT "books"
    DROP PUBLIC SYNONYM BOOKS_TABLE;
    create or replace public synonym BOOKS_TABLE for BOOKS_TABLE;
    grant select, insert, update,delete on BOOKS_TABLE to ETLUSER;
    Heres the ctl file that i am using
    Load_Books.ctl
    OPTIONS (ERRORS=100000, SILENT=(HEADER,FEEDBACK),ROWS=500, BINDSIZE=3072000 , READSIZE=3072000)
    load data
    infile '/apps/dev/PWXML-10/ctl/load_xml.txt'
    BADFILE '/apps/dev/PWXML-10/ctl/load_xml.txt.bad'
    DISCARDFILE '/apps/dev/PWXML-10/ctl/load_xml.txt.dsc'
    append
    into table BOOKS_TABLE
    filename filler char(120),
    BOOKS lobfile(filename) terminated by eof)
    '/apps/dev/PWXML-10/ctl/load_xml.txt' would contain the XML file path that i gave
    Heres how i am loading the XML through sqlldr in ETLUSER
    sqlldr etluser/etluserpassword@MYXMLDBNAME control=Load_Books.ctl log=Load_Books.ctl.log
    Here's the error i am getting
    Record 1: Rejected - Error on table "BIUSER"."BOOKS_TABLE".
    ORA-00604: error occurred at recursive SQL level 1
    ORA-01031: insufficient privileges
    Hopefully i have given you all the set up required to pin point the evil error.
    Please let me know if i have missed something.

  • How to load XML file to table (non-XML) with SQL*Loader -- issue with nulls

    I have been attempting to use SQL*Loader to load an XML file into a "regular" Oracle table. All fields work fine, unless a null is encountered. The way that nulls are represented is shown below:
    <PAYLOAD>
    <FIELD1>ABCDEF</FIELD1>
    <FIELD2/>
    <FIELD3>123456</FIELD3>
    </PAYLOAD>
    In the above example, FIELD2 is a null field and that is the way it is presented. I have searched everywhere and have not found how I could code for this. The issue is that if FIELD2 is present, it is coded like: <FIELD2>SOMEDATA</FIELD2>, but the null is represented as <FIELD2/>. Here is a sample of the control file I am using to attempt the load -- very simplistic, but works fine when fields are present:
    load data
    infile 'testdata.xml' "str '<PAYLOAD>'"
    TRUNCATE
    into table DATA_FROM_XML
    FIELD1 ENCLOSED BY '<FIELD1>' AND '</FIELD1>',
    FIELD2 ENCLOSED BY '<FIELD2>' AND '</FIELD2>',
    FIELD3 ENCLOSED BY '<FIELD3>' AND '</FIELD3>')
    What do I need to do to account for the way that nulls are presented? I have tried everything I could glean from the web and the documentation and nothing has worked. Any help would be really appreciated.

    I hadn't even got that far. can you direct me to where the docs are to import data that is stored within xml but that you don't need any xml functionality, that just happens to be the format the data is stored in? thx

  • SQL Loader and whitespace issues

    Hello users,
    I've got an issue that I know is breaking based on a comments field, which allows nearly every type of character in it.
    Long story short, I'm trying to upload an Access table, turned to .csv file into Oracle via SQL Loader.
    I'm able to do it if I delete or set the COMMENTS column to null before doing so.
    If I try the option with the contents of this field populated, it blows up. I've got it terminated by a tilde in the control file, which the COMMENTS field does not contain at all, even with some 5.000+ records.
    However, people upon entering comments have put many carriage returns in there. I noticed once I export the data to text or csv, then open in Excel, it shows the column breaking and spilling over into fields it shouldn't, thereby causing the big problem.
    I've been searching but haven't found a way I can wrap these whitespaces or have SQL Loader ignore them.
    I can't use TERMINATED BY WHITESPACE in the SQL Loader control file because that will cause the field to break without all the comments and I can't use optionally enclosed by " because these people have also used " in the COMMENTS field.
    Do I have any option here, other than to brute force make an update query of some kind to manually populate the data? I can do that if I have to but i'd sure rather have all the data dump in via SQL Loader if I can.
    Thanks!

    Actually, it wasn't related to the size of the column. I made it like 3000, to hold 3000 characters, which was plenty.
    But I used
    PRESERVE BLANKS and then it worked fine!

  • SQL*Loader issue with WHEN command

    Environment: R12.1.2
    We have a file coming in from a bank that needs to be loaded into a custom table using SQL*Loader.
    The file has multiple record formats. Each record in the file starts with a "record type", which defines the format.
    For simplicity, let me say that there is a record type of "H" with the header format, and another record type "D" has a detail record format. An "H" record may be followed by multiple "D" records until the next "H" record is encountered. Unfortunately, there is no common key, like say "Vendor Number" in both the "H" and "D" records to establish a relationship. So the plan was to use a Oracle sequence or SQL*Loader sequence to get a sequence loaded into the table as the file is being loaded. Then if consecutive "H" records had a sequence value of 100 and 112, we would know that the "D" records for the "H" 100 record are all the records with sequence value of 101 through 111.
    The issue occurs as we have to use the WHEN command in the control file to direct a certain record type to specific columns of the table. Based on the populated sequence values, with the WHEN command, it seems that all the "H" records get loaded first followed by the "D" records. The sequence becomes of no use and we cannot establish a link between the "H" and "D" records. The alternative is to not use WHEN with the sequence, but load the file into generic column names which provides for less understanding in the application.
    Is there a way (command feature) to ensure that SQL*Loader loads the records sequentially while using WHEN?
    Thanks
    Satish

    I used RECNUM parameter instead of sequence and it worked fine

  • Urgent :SQL Loader Arabic Character Set Issue

    HI all,
    I am loading arabic characters into my database using SQL Loader using a fixed length data file. I had set my characterset and NLS_LANG set to UTF8.When I try to load the chararacter 'B' in arabic data i.e. ' &#1604;&#1575; ' , it gets loaded as junk in the table. All other characters are loaded correctly. Please help me in this issue and its very urgent.
    Thanks,
    Karthik

    Hi,
    Thanks for the responses.
    Even after setting the characterset to arabic and the problem continues to persist. This problem occurs only with the character "b".
    Please find my sample control file,input file and nls_parameters below:
    My control file
    LOAD DATA
    characterset UTF8
    LENGTH SEMANTICS CHAR
    BYTEORDER little endian
    INFILE 'C:\sample tape files\ARAB.txt'
    replace INTO TABLE user1
    TRAILING NULLCOLS
    name POSITION(1:2) CHAR(1),
    id POSITION (3:3) CHAR(1) ,
    salary POSITION (4:5) CHAR(2)
    My Input file - Fixed Format
    ?a01
    ??b02
    ?c03
    The ? indicates arabic characters.Arabic fonts must be installed to view them.
    NLS_PARAMETERS
    PARAMETER     VALUE
    NLS_LANGUAGE     ARABIC
    NLS_TERRITORY     UNITED ARAB EMIRATES
    NLS_CURRENCY     ?.?.
    NLS_ISO_CURRENCY     UNITED ARAB EMIRATES
    NLS_NUMERIC_CHARACTERS     .,
    NLS_CALENDAR     GREGORIAN
    NLS_DATE_FORMAT     DD/MM/RR
    NLS_DATE_LANGUAGE     ARABIC
    NLS_SORT     ARABIC
    NLS_TIME_FORMAT     HH12:MI:SSXFF PM
    NLS_TIMESTAMP_FORMAT     DD/MM/RR HH12:MI:SSXFF PM
    NLS_TIME_TZ_FORMAT     HH12:MI:SSXFF PM TZR
    NLS_TIMESTAMP_TZ_FORMAT     DD/MM/RR HH12:MI:SSXFF PM TZR
    NLS_DUAL_CURRENCY     ?.?.
    NLS_COMP     BINARY
    NLS_LENGTH_SEMANTICS     CHAR
    NLS_NCHAR_CONV_EXCP     FALSE

  • Unknown issue while loading .dbf file by sql loader

    Hi guys,
    I am having a unknown issue while loading .dbf file by sql loader.
    I need to load .dbf data into oracle table.for this I converted .dbf file by just changing its extension as .csv . file structure after changing .dbf to .csv --
    C_N_NUMBER,COMP_CODE,CPT_CODE,C_N_AMT,CM_NUMBER
    1810/4,LKM,30,45,683196
    1810/5,LKM,30,45,683197
    1810/6,LKM,30,45,683198
    1810/7,LKM,30,135,683200
    1810/8,LKM,30,90,683201
    1810/9,LKM,1,45,683246
    1810/9,LKM,2,90,683246
    1810/10,LKF,1,90,683286
    2810/13,LKJ,1,50.5,680313
    2810/14,LKJ,1,50,680316
    1910/1,LKQ,1,90,680344
    3910/2,LKF,1,238.12,680368
    3910/3,LKF,1,45,680382
    3910/4,LKF,1,45,680395
    7910/5,LKS,1,45,680397
    7910/6,LKS,1,90,680400
    7910/7,LKS,1,45,680401
    7910/8,LKS,1,238.12,680414
    7910/9,LKS,1,193.12,680415
    7910/10,LKS,1,45,680490
    then I am loading it by sql loader.but I am getting always error below ...
    Record 1: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
    ORA-01438: value larger than specified precision allowed for this column
    Record 2: Rejected - Error on table C_N_DETL_TAB, column CPT_CODE.
    ORA-01438: value larger than specified precision allowed for this column
    table structure-
    create table C_N_DETL_tab
    "C_N_NUMBER" VARCHAR2(13),
    "COMP_CODE" VARCHAR2(3),
    "CPT_CODE" NUMBER(4),
    "C_N_AMT" NUMBER(20,18),
    "CM_NUMBER" NUMBER(7)
    control file-
    options(skip=1)
    load data
    infile '/softdump/pc/C_N_DETL.csv'
    badfile '/softdump/pc/C_N_DETL.bad'
    discardfile '/softdump/pc/C_N_DETL.dsc'
    into table C_N_DETL_tab
    truncate
    FIELDS TERMINATED BY ","
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    C_N_NUMBER CHAR,
    COMP_CODE CHAR,
    CPT_CODE INTEGER,
    C_N_AMT INTEGER,
    CM_NUMBER INTEGER
    but guys when I am increasing size of all columns of tabel upto its max value then data is loaded but when I am checking column max length after data loaded then its very less..
    changed table structure-
    create table C_N_DETL_tab
    "C_N_NUMBER" VARCHAR2(130),
    "COMP_CODE" VARCHAR2(30),
    "CPT_CODE" NUMBER(32), ---- max value of number
    "C_N_AMT" NUMBER(32,18), ---- max value of number
    "CM_NUMBER" NUMBER(32) ---- max value of number
    now i ma running ...
    sqlldr express/express control=C_N_DETL.ctl log=C_N_DETL.log
    o/p-
    Table C_N_DETL_TAB, loaded from every logical record.
    Insert option in effect for this table: TRUNCATE
    TRAILING NULLCOLS option in effect
    Column Name Position Len Term Encl Datatype
    ---------- ---- ---- C_N_NUMBER FIRST * , O(") CHARACTER
    COMP_CODE NEXT * , O(") CHARACTER
    CPT_CODE NEXT 4 INTEGER
    C_N_AMT NEXT 4 INTEGER
    CM_NUMBER NEXT 4 INTEGER
    Table C_N_DETL_TAB:
    20 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    select max(length( CPT_CODE))from C_N_DETL_tab ---> 9
    can u tell me why I need to increase size of table columns upto max value?although length of data is soo much less.
    kindly check it..thnx in advance...
    rgds,
    pc

    No database version of course. Unimportant.
    If I recall correctly, it is 'integer external ' and you would best double quoting the alphanumerics (which you didn't ).
    Try changing integer in integer external in the ctl file.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for