SQL Loader Help in 10g

Hello,
Is it possible to forcefully abort the sql loader when a value is not present? I've the data file like this
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||
Template:
record type|batch number|batch desc|date|detail line num|others
1,4,5,9 are the record types, if you see this line 5|XXX123|XXX||1| .. 1 represents a detail line number, My requirement is if the detail line number is null for record type 5 then I want to abort the sqlloader.
Is it possible?
Edited by: 940838 on Nov 21, 2012 11:54 PM

940838 wrote:
I think i am not clear in my requirement...
The question was how to abort the loader if the detail line number is not present in record type 5. It is however normal that detail line num is not mandatory for other record types. any insights.Hi,
you have been clear and I have made a quick test. Unfortunately you cannot do such check in SQL*Loader as the WHEN clause in control file does not allow any OR.
Even if you add this check using a constraint in your table and specify the maximum number of errors to be 0, SQL*Loader will load the records up to that error.
Let me show you an example:
1) create the table with a constraint that for record_type 5 detail_line_number cannot be null.
CREATE TABLE test
   record_type    INTEGER
, batch_number   VARCHAR2 (10)
, batch_desc     VARCHAR2 (10)
, batch_date     DATE
, detail_line_num INTEGER
, other          VARCHAR2 (10)
ALTER TABLE test
  ADD CONSTRAINT check_rec_5
     CHECK (   record_type = 5 AND detail_line_num IS NOT NULL
            OR record_type != 5) ENABLE;
            In this table you will not be able to load rows having record_type=5 and detail_line_num NULL as this will be considered as an error.
Let's prepare your input file:
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX|||
5|XXX123|XXX|||
9|XXX123|XXX|||
1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|
5|XXX123|XXX|||
9|XXX123|XXX|||1|XXX123|XXX|20121121||
4|XXX123|XXX|||
5|XXX123|XXX||1|
5|XXX123|XXX||2|As you can see the input file has the fourth line with record_type = 5 and detail_line_num NULL. This will be an error for the constraint.
Here the control file I have used:
--test.ctl
load data
INFILE 'test.dat'
APPEND
INTO TABLE test
FIELDS TERMINATED BY '|'
TRAILING NULLCOLS
record_type     ,
batch_number    ,
batch_desc      ,
batch_date      Date 'YYYYMMDD',
detail_line_num ,
other
)If I try to execute the SQL*Loader and ask to stop at first error in this way:
sqlldr userid=yourname/yourpass@yourdb control=test.ctl errors=0 rows=100SQL*Loader will load only 3 records because it encounters an error at line 4 and having specified errors=0 will not continue to load. Actually the process will continue until it reach the commit point (100 rows in this case) but it will not load any record after the error nor continue to read the file.
So if I check the table
SELECT * FROM test;
RECORD_TYPE BATCH_NUMBER BATCH_DESC BATCH_DATE            DETAIL_LINE_NUM OTHER    
          1 XXX123       XXX        21-11-2012 00:00:00                            
          4 XXX123       XXX                                                       
          5 XXX123       XXX                                            1           You will see only records until you have reached the error.
This cannot be avoided as documented in SQL*Loader reference manual:
<h3>Load Discontinued Because Maximum Number of Errors Exceeded</h3>
If the maximum number of errors is exceeded, SQL*Loader stops loading records into any table and the work done to that point is committed. As you can see SQL*Loader abort the processing but it will anyway commit the records until that error.
One alternative solution is to create an external table in Oracle and do all the checks you want before copying your external table into a database table, as BluShadow suggested.
Regards.
Al

Similar Messages

  • Is there any difference in Oracle 9i SQL Loader and Oracle 10g SQL Loader

    Hi
    Can anyone tell me whether is there any difference in Oracle 9i SQL Loader and Oracle 10g SQL Loader?
    I am upgrading the 9i db to 10g and wanted to run the 9i SQL Loader control files on upgraded 10g db. So please let me know is there any difference which I need to consider any modifications in the control files..
    Thank you in advance
    Adi

    answered

  • SQL*LOADER IN Oracle 10g Release 2

    Hi,
    Recently i installed oracle 10g release 2 on windows vista.I want to use sqlloader utility.Where can i found it.I checked for sqlldr.exe in oracle home folder,but i didn't find it.Any one plz help me regarding this..

    You would better to look here
    Using:
    http://download.oracle.com/docs/cd/B19306_01/win.102/b14304/tools.htm#i1006973
    It will be also good to look at:
    Concepts
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_concepts.htm#SUTIL003
    SQL*Loader Control File Reference
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_control_file.htm#SUTIL005

  • Loading data by sql loader in oracle 10g on linux

    I am trying to load data in Oracle 10g on linux by using sql loader, but getting error
    Problem in log showing that field length of SURNAME field is more than table field size.
    Following is the error in log file of sql loader
    Record 21: Rejected - Error on table TABLE1, column
    SURNAME.
    ORA-12899: value too large for column SURNAME (actual: 65, maximum: 64)
    and it is evident from following controlfile that i am using trim to discard any space then why it is giving an error.
    LOAD DATA
    TRUNCATE
    INTO TABLE TABLE1
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    ID INTEGER EXTERNAL,
    OPTION1 CHAR,
    REF1 CHAR,
    OTHER_REF CHAR,
    TITLE "TRIM(:TITLE)",
    FORENAME "TRIM(:FORENAME)",
    SURNAME "TRIM(:SURNAME)",
    JOINT_TITLE "TRIM(:JOINT_TITLE)",
    JOINT_FORENAME "TRIM(:JOINT_FORENAME)",
    JOINT_SURNAME "TRIM(:JOINT_SURNAME)",
    I checked the bad file and count number of characters, they are 64 characters.
    When i am inserting individual record from bad file by sql loader, it is loading

    Probably your database character set is multi-byte. That is %UTF8 or AL16UTF16%
    Post your NLS Database Parameters value
    select * from nls_database_parameters;
    In General varchar2(65) by default means 65 BYTES unless
    you have changed your Defalut NLS_LENGTH_SEMANTICS parameter from BYTE to CHAR.
    With best regards
    Shan

  • SQL * Loader help

    Dear All,
    I have installed a oracle database 9.2.at my home. And I want to use a sql loader.
    How should i invoke and use the sql loader.
    Please help in this regards.
    Thanks,
    Sid.

    This doc contains usefull info and examples:
    http://www.orafaq.com/wiki/SQL*Loader_FAQ

  • Sql loader help needed  urgent

    Hi,
    I normally get a csv having data as
    column1 ;columnb;columnc;
    13 ; 12 ; 13 ;
    11 ;13 ;33;
    as the table where it needs to go is say table
    xys( a number, b number , c number).
    so the control file is fairly simple ...
    But from now I need to restrict data entry if the change in format happens in the csv
    say if it is like
    column2;column1;column3,
    12,13;12;
    11;13;14;
    or say the csv like
    column1;column2;column3;column4;
    11;13;14;15;
    111;134;14;12;
    in both cases sql loader should not run and throw the error saying the reason in the log.
    how do i manage it in the control file `???
    any ideas???
    regards
    Message was edited by:
    SHUBH

    Hello,
    do you only need to check the first line of the file if it contains a line like
    column1;column2;column3 ?
    If yes, maybe a small script like this could be a starting point:
    You have to replace "column1;column2;column3" with the header information that's valid and instead of file1 in the CURRENTSTRING=... Line write the name of your input file.
    I hope this helps. (But maybe some of the experts here knows a way to do the verification checks with SQLLDR, so maybe its worth to wait a little bit :)
    #!/bin/ksh
    VALIDSTRING="column1;column2;column3"
    CURRENTSTRING=`head -n 1 file1`
    if [[ $VALIDSTRING == $CURRENTSTRING ]]
    then
    echo "They match."
    else
    echo "They dont match."
    fi
    --

  • SQL Loader help requested

    Have a sqlloader job that is loading date columns into a table. Then the source of the data sends the wrong data '11000000' in the YYYYMMDD format and the load fails. Does anyone know how to make Oracle assume the null value in all cases when there is an invalid date (like 20060230, 20061131 in YYYYMMDD format)?
    We have used the nullif statement but it only works for known issues that are specified and we want it to work for all dates that are invalid.
    Thanks in advance.

    How about creating your own function and using that instead?
    http://groups.google.co.uk/group/comp.databases.oracle.misc/browse_thread/thread/a72362f8c32bdf21/ff350590a1fa7948?lnk=st&q=function+SQL*Loader&rnum=2&hl=en#ff350590a1fa7948

  • Sql*loader help needed!!

    I am loading data using the SQLLDR utility of Oracle. I defined one column as seq. I am loading the data, it is working properly but next column is not loaded correctly.
    Problem :
    First Character in the second column was missing. Please help me how to correct the ctl file.
    Table:
    CREATE TABLE SEQ_TAB1 (
    A_ID NUMBER (10) NOT NULL,
    A_NAME VARCHAR2 (25) NOT NULL,
    A_TYPE VARCHAR2(25)
    Seqence : t_seq1 (a_id)
    Data file:
    Alabama,first
    Alaska,ice
    California,hot
    Texas,time
    CTL file :
    LOAD DATA
    APPEND INTO TABLE seq_tab1
    a_id "t_seq1.nextval" ,
    a_name char terminated by "," ,
    a_type char terminated by ","
    Command :
    sqlldr username/password@service_name control=ctl_file log=log_file data=data_file
    The following way data has been loaded into the table.
    1,labama,first
    2,laska,ice
    3,alifornia,hot
    4,exas,time

    Try with position specified for the a_name column....
    CTL file :
    LOAD DATA
    APPEND INTO TABLE seq_tab1
    a_id "t_seq1.nextval" ,
    a_name position(1) char terminated by "," ,
    a_type position(*) char terminated by ","
    I am loading data using the SQLLDR utility of Oracle. I defined one column as seq. I am loading the data, it is working properly but next column is not loaded correctly.
    Problem :
    First Character in the second column was missing. Please help me how to correct the ctl file.
    Table:
    CREATE TABLE SEQ_TAB1 (
    A_ID NUMBER (10) NOT NULL,
    A_NAME VARCHAR2 (25) NOT NULL,
    A_TYPE VARCHAR2(25)
    Seqence : t_seq1 (a_id)
    Data file:
    Alabama,first
    Alaska,ice
    California,hot
    Texas,time
    CTL file :
    LOAD DATA
    APPEND INTO TABLE seq_tab1
    a_id "t_seq1.nextval" ,
    a_name char terminated by "," ,
    a_type char terminated by ","
    Command :
    sqlldr username/password@service_name control=ctl_file log=log_file data=data_file
    The following way data has been loaded into the table.
    1,labama,first
    2,laska,ice
    3,alifornia,hot
    4,exas,time

  • Reg:sql loader in Forms 10g

    Hai,
    we used sqlldr in forms 6i using host command. Later we upgraded to forms 10g but now the host command is not working. we are able to create directory with the host command, but not able to invoke sqlldr, also forms 10g is not giving any error also, (forms status is success). Did anybody faced similar problem? Can anyone please help me regarding this..

    I think, I did not make it clear, Sorry for that.
    Actually, sqlldr is on the application server and running fine with the 6i, as the respective control, data and log files were on the same machine. Now, we upgraded to forms 10g and trying to use the same sqlldr, but found that it is not being invoked at all.
    We first suspected the host command, but we are able to create a directory as follows,
    host('mkdir c:\test_host');
    This is working fine. But not sqlldr... I searched on metalink if there are any links on the issue but able to find the same problem unanswered.
    I will try for xhost facility...

  • SQL Loader Help required

    HI Team,
    I have requirement to load data in to table using sqlloader, as i am having three level's(Header, Detail, Trailer')
    first two position of data file represents the level like
    00-Header
    01 to 98 -Detail
    99 -Trailer
    each level will have different data structure and we should insert in to the same table
    i Have created table like
    CREATE TABLE APPS.XXD_TEST1
    AA NUMBER,
    TEST12 VARCHAR2(10 BYTE),
    testdt VARCHAR2(10 BYTE),
    testtr VARCHAR2(10 BYTE),
    RECORD_ID NUMBER
    and created sequence for record_id column
    --CREATE SEQUENCE APPS.XXD_TEST1_S
    i have data in the data file like below, i want to load the data in the same order
    000012
    010012
    010012
    020012
    030012
    990012
    000013
    010013
    020013
    030013
    990013
    i was using the folowwing control file
    LOAD DATA
    INFILE Test
    APPEND
    INTO TABLE xxd_test1
    WHEN (1:2) = '00'
    TRAILING NULLCOLS
    test12 POSITION(3:6) CHAR,
    aa POSITION(1:2) INTEGER EXTERNAL "lpad(:aa,2,'0')",
    record_id "xxd_test1_s.nextval"
    INTO TABLE xxd_test1
    WHEN (1:2) != '99' and (1:2) !='00'
    TRAILING NULLCOLS
    testdt POSITION(3:6) CHAR,
    aa POSITION(1:2) INTEGER EXTERNAL "lpad(:aa,2,'0')",
    record_id "xxd_test1_s.nextval"
    INTO TABLE xxd_test1
    WHEN (1:2) ='99'
    TRAILING NULLCOLS
    testtr POSITION(3:6) CHAR,
    aa POSITION(1:2) INTEGER EXTERNAL ,
    record_id "xxd_test1_s.nextval"
    But it was inserted in the following order
    000012
    000013
    010012
    010012
    020012
    020013
    030012
    030013
    990012
    990013
    Please help me with the solution.
    Thanks
    Sriram.

    Hi Karthick,
    we can do the order by caluse if we are having any column common to all the three levels
    here, for me record_type(first two positions) is the only common. but they may be duplicated in the file.
    Sample Data file
    000012
    01
    01
    02
    03
    99
    000013
    01
    02
    03
    99
    (first two positions represent the heirarchy like 00-header,(01-10)-Detail, 99-Trailer)
    this is sample file,it(detail,trailer) contains some extra fields also...but nothing is common to the header, detail and trailer.Can we generate any value which is common to the three levels? with respective to the header value!
    Looking for you solution..
    Regards,
    Sriram.

  • Need help with SQL*Loader not working

    Hi all,
    I am trying to run SQL*Loader on Oracle 10g UNIX platform (Red Hat Linux) with below command:
    sqlldr userid='ldm/password' control=issue.ctl bad=issue.bad discard=issue.txt direct=true log=issue.log
    And get below errors:
    SQL*Loader-128: unable to begin a session
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux-x86_64 Error: 2: No such file or directory
    Can anyone help me out with this problem that I am having with SQL*Loader? Thanks!
    Ben Prusinski

    Hi Frank,
    More progress, I exported the ORACLE_SID and tried again but now have new errors! We are trying to load an Excel CSV file into a new table on our Oracle 10g database. I created the new table in Oracle and loaded with SQL*Loader with below problems.
    $ export ORACLE_SID=PROD
    $ sqlldr 'ldm/password@PROD' control=prod.ctl log=issue.log bad=bad.log discard=discard.log
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue May 23 11:04:28 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader: Release 10.2.0.1.0 - Production on Tue May 23 11:04:28 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Control File: prod.ctl
    Data File: prod.csv
    Bad File: bad.log
    Discard File: discard.log
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table TESTLD, loaded from every logical record.
    Insert option in effect for this table: REPLACE
    Column Name Position Len Term Encl Datatype
    ISSUE_KEY FIRST * , CHARACTER
    TIME_DIM_KEY NEXT * , CHARACTER
    PRODUCT_CATEGORY_KEY NEXT * , CHARACTER
    PRODUCT_KEY NEXT * , CHARACTER
    SALES_CHANNEL_DIM_KEY NEXT * , CHARACTER
    TIME_OF_DAY_DIM_KEY NEXT * , CHARACTER
    ACCOUNT_DIM_KEY NEXT * , CHARACTER
    ESN_KEY NEXT * , CHARACTER
    DISCOUNT_DIM_KEY NEXT * , CHARACTER
    INVOICE_NUMBER NEXT * , CHARACTER
    ISSUE_QTY NEXT * , CHARACTER
    GROSS_PRICE NEXT * , CHARACTER
    DISCOUNT_AMT NEXT * , CHARACTER
    NET_PRICE NEXT * , CHARACTER
    COST NEXT * , CHARACTER
    SALES_GEOGRAPHY_DIM_KEY NEXT * , CHARACTER
    value used for ROWS parameter changed from 64 to 62
    Record 1: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 2: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 3: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 4: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 5: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 6: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 7: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 8: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 9: Rejected - Error on table ISSUE_FACT_TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 10: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 11: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 12: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 13: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 14: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 15: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 16: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 17: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 18: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 19: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 20: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 21: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 22: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 23: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 24: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    Record 39: Rejected - Error on table TESTLD, column DISCOUNT_AMT.
    Column not found before end of logical record (use TRAILING NULLCOLS)
    MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
    Table TESTLD:
    0 Rows successfully loaded.
    51 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.
    Space allocated for bind array: 255936 bytes(62 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 51
    Total logical records rejected: 51
    Total logical records discarded: 0
    Run began on Tue May 23 11:04:28 2006
    Run ended on Tue May 23 11:04:28 2006
    Elapsed time was: 00:00:00.14
    CPU time was: 00:00:00.01
    [oracle@casanbdb11 sql_loader]$
    Here is the control file:
    LOAD DATA
    INFILE issue_fact.csv
    REPLACE
    INTO TABLE TESTLD
    FIELDS TERMINATED BY ','
    ISSUE_KEY,
    TIME_DIM_KEY,
    PRODUCT_CATEGORY_KEY,
    PRODUCT_KEY,
    SALES_CHANNEL_DIM_KEY,
    TIME_OF_DAY_DIM_KEY,
    ACCOUNT_DIM_KEY,
    ESN_KEY,
    DISCOUNT_DIM_KEY,
    INVOICE_NUMBER,
    ISSUE_QTY,
    GROSS_PRICE,
    DISCOUNT_AMT,
    NET_PRICE,
    COST,
    SALES_GEOGRAPHY_DIM_KEY
    )

  • Loading XML file using sql*loader (10g)

    Hi Everyone....
    I have a major problem. I have a 10g database and I need to use sql loader to load a large XML file into the database. This file contains records for many, many customers. This will be done several times and the number of records will vary. I want to use sql loader and load to a staging table, BUT SPLIT THE RECORDS OUT and add a sequence. I am having 2 problems.
    In the 10g documentation, when you want to split the records you use the BEGINDATA clause and indicate something (like a 0) for each instance of a record. Well my first file has 3,722 records in it. How do I know the number of records in each XML file?
    The second problem is that because this is XML, I thought that I could use ENCLOSED BY. But the start tag has an attribute /counter in it, sql*loader doesnt recognize the starting tag. (i.e.: start tag is: </CustomerRec number=1>
    end tag is: </CustomerRec> )
    So, I used TERMINATED BY '</CustomerRec>'. This will split out the records, but it will NOT include the ending tag of </CustomerRec> and when I use extract, I receive an XML parsing error.
    I have tried to get the ending tag using CONTINUEIF and SKIP. But those options are for "records" and not lines.
    Does anyone have any ideas for the 2 problems above. I am at my wits end and I need to finish this ASAP. Any help would be appreciated.
    Thank you!

    Sorry.... here is an example of what my control file looks like. At the end, I have 92 "0", but remember, I have 3722 records in this first file.
    LOAD DATA (SKIP 1)
    INFILE *
    INTO TABLE RETURN_DATA_STG
    TRUNCATE
    XMLType(xmldata)
    FIELDS
    (fill FILLER CHAR(1),
    loadseq SEQUENCE(MAX,1),
    xmldata LOBFILE (CONSTANT F001AB.XML)
    TERMINATED BY '</ExtractObject>'
    ------ ":xmldata||'</ExtractObject>'"
    BEGINDATA
    0
    0
    0
    0
    0
    0

  • Issues in calling Sql Loader through forms developer (10g)

    Hi,
    I am developing a form(in 10g) ,in which I am calling sql loader for loading data onto a oracle database table from external source (e.g. data file is a .CSV file).
    But , somehow the sql loader is not getting executed.
    Here , I am giving the environment settings , approach i am taking;
    This is a distributed system , both the application server,and database server are mounted on two different servers.
    The form is delpoyed on the application server.
    The database table , and the sql loader are configured on the databse side.
    I am using host(<sql loader command>) command to invoke the Operating System command through forms.
    The sql loader is working ok , and the data is getting loaded successfully onto the required database table when I am executing the sql loader command on Unix prompt , but through the forms , it's not working.
    Do I need to change some environmental setting to make this work...
    Any quick help in this regard is highly appreciated.
    Thanks.

    Hi Craig,
    I have already tried out the option of calling sql loader through stored procedure,but this is not working ...
    could you please share any examples to do so ...
    code snippet i am using in forms:
    declare
    usid get_application_property(userid);
    pwd get_application_property(password);
    db get_application_property(host);
    msqlldr varchar2(250);
    begin
    msqlldr:='/u01/oracle/formss/bin/sqlldr' username=<uid/pwd@db> control=<control file name> data=<data file name> log=<log file name>
    hosts(msqlldr);
    end;
    Note that sqlldr command ,for that matter any unix shell command is not working through the hosts() command ...
    could you please suggest any way out ...
    Thanks.

  • Error with SQL Loader 10g

    Hi,
    I use SQL Loader to load files into my database running on Suse Linux. The loader is invoked by a Java application.
    In Oracle 9i my string would be something like
    sqlldr DATA='opt/test information/sample.dat' PARFILE=/opt/test.par
    It worked.
    When I ran the same string in 10g I got an error like
    " multiple values not allowed for parameter 'data' "
    I tried escaping the ' with a \ , like
    sqlldr DATA=\'opt/test information/sample.dat\' PARFILE=/opt/test.par
    Now it gives me a different error
    SQL*Loader-500: Unable to open file (opt/test information/302.DAT)
    SQL*Loader-553: file not found
    I cannot remove the space from the directory. It has to be "test information".
    Can anybody help me out?
    Thanks,
    Karthik

    or better yet, you are on Linux so you have the luxury of creating a symbolic link to that directory and make the sym link without spaces and then use that in your sqlldr command line.
    you can keep the directory with spaces and have sqlldr run from the sym link.

  • Looking for a 10G Sql loader

    What do I need to download to be able to install sql loader for 10G database? 10.2.0.4 to be exact. needed for Window server 2003

    user597971 wrote:
    What do I need to download to be able to install sql loader for 10G database? 10.2.0.4 to be exact. needed for Window server 2003Hi,
    SQLLDR is already part of the Oracle Database 10g Release 2 Utilities
    all you have to do is
    run -----> cmd
    cd ORACLE_HOME\bin\sqlldr help=y
    see this link
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_control_file.htm#sthref815

Maybe you are looking for

  • Issues with MS-7211 (PM8M3-V) and the JPW1 connector

    Hi all, I have been recently getting problems with booting up my computer.  The Windows flash logo will stall and boot will not continue.  Also, at times the boot-up gets stuck in a "loop" where the system will just cycle through boot-up over and ove

  • JDev 11g - PAPI WS access

    Hello, Using the documentation and some very helpful posts from this forum we successfully started using PAPI WS interface to BPM in our JDev 10.1.3 JEE application. After the upgrade to 11g, however, the code stopped working. Here's the error that w

  • Firefox connects, Netscape connects, Safari doesn't!

    Hi. So, this morning I surfed using Safari (which is my main browser). Everything was fine. I shut down and went to work. This evening i came home, booted up, launched Safari, and it didn't connect. My homepage is google.co.uk. Here's the error messa

  • Find DBID when DB is not open

    Greetings friends Is it possible to find DBID of database when DB is not open given - DB is in non-archive mode - No backup is available - No RMAN catalog repository

  • Adapter ringed pin connector

    I'm clumsy. I regualrly trip over my power cord, bending the little circular pin connector. I ended of ripping the little plastic connector so badly that I could only get it to charge if I held the cord in a certain position. I've actually gone throu