Using clob in sql loader utility in oracle 9i

Hi,
I want to load data into a table with 2 clob columns using a sql loader utility dat file and control file created programatically.
The size of clob in dat file can change and the clob columns are inline in data file.
As per 9i doc the size of clob is 4GB .
How can I change the control file so that it can load max 4 GB data in clob columns .
I am getting error while calling sqlldr using below control file :
SQL*Loader-350: Syntax error at line 13.
Expecting non-negative integer, found "-294967296".
,"NARRATIVE" char(4000000000)
^
control file :
LOAD DATA
INFILE '' "str X'3C213E0A'"
APPEND INTO TABLE PSD_TERM
FIELDS TERMINATED BY '~^'
TRAILING NULLCOLS
"PSD_ID" CHAR(16) NULLIF ("PSD_ID"=BLANKS)
,"PSD_SERIAL_NUM" CHAR(4) NULLIF ("PSD_SERIAL_NUM"=BLANKS)
,"PSD_TERM_COD" CHAR(4) NULLIF ("PSD_TERM_COD"=BLANKS)
,"PSD_TERM_SER_NO" CHAR(4) NULLIF ("PSD_TERM_SER_NO"=BLANKS)
,"VERSION_DT" DATE "DD-MON-YYYY HH:MI:SS AM" NULLIF ("VERSION_DT"=BLANKS)
,"LATEST_VERSION" CHAR(1) NULLIF ("LATEST_VERSION"=BLANKS)
,"NARRATIVE" char(4000000000)
,"PARTITION_DT" DATE "DD-MON-YYYY HH:MI:SS AM" NULLIF ("PARTITION_DT"=BLANKS)
,"NARRATIVE_UNEXPANDED" char(4000000000)
)

Yes, you can do it. Create the sequence (suppose you call it "PK_SEQ_X") and then in your control file reference it as "PK_SEQ_X.NEXTVAL". For example suppose you wanted to put it into a column named 'Y' the entry in your control file will look like 'load data insert into table Z (Y "PK_SEQ_X.NEXTVAL", ....)'
Note that the double quotes around the sequence name are required.

Similar Messages

  • Load Data from SQL Server to Oracle 10g using Sql*loader utility

    I am trying to lod data from sql server 2005 to oracle 10g.
    What is the best way to do it?
    Can sql*loader utility do it?
    what is the difference of using sql*loader utility and migration tool fom sql developer ?
    Thanks
    Edited by: user11313758 on Sep 30, 2009 4:30 PM

    Hello:
    You could consider using Oracle Heterogeneous Services to do this. If your Oracle database is on a Windows platform the link below shows you how to make a connection to SqlServer from an Oracle database.
    http://www.databasejournal.com/features/oracle/article.php/3442661/Making-a-Connection-from-Oracle-to-SQL-Server.htm
    Varad

  • Pls Help for Sql Loader utility

    Dear friends,
    I want to execute Sql Loader utility by procedure.
    Can anyone give me any idea about it.
    Thanks in adavance.

    Why?
    Why build a kludgy and unscalable application?
    Sybrand Bakker
    Senior Oracle DBA

  • Can Oracle Migration Workbench 2.0.2.0.0 be used to migrate SQL 7.0 to Oracle 8i?

    Hi,
    Does anyone know that can Oracle Migration Workbench 2.0.2.0.0
    be used to migrate SQL 7.0 to Oracle 8i? or the version
    2.0.2.0.0 can be only used for Oracle 9i?
    I failed to install Oracle Migration Workbench 2.0.2.0.0 onto my
    workstation(running Oracle 8.1.7), because it need Oracle 9i.
    Thanks
    Leo Siu

    One more question: where can I download the Oracle Migration
    Workbench 1.4.1.0.0 in order to migrate non-oracle database to
    Oracle 8i?
    Thanks

  • Problems with loading source model using omw from sql server 7 into oracle 9i

    I am migrating data from sql servr 7 into oracle 9i. when doing capture phase i get the following error.
    ==>failed to load source model.[microsoft][odbc sql server][sql server]select permission
    denied on column 'password' of object 'syslogins', database master, owner dbo.
    Why is this so...is it bcz of something with my odbc link...
    also is there any way to load only tables and not system tables when doing capture phase.
    any help asap will be much appreciated.
    thanks

    Hi,
    You must ensure that you have the correct password to login to SQL Server.
    The Workbench requires some of the tables in the Master database.
    Regards
    John

  • Using Sequence in SQL Loader

    Hi,
    Does anybody know if I can generate the unique primary key using an Oracle Sequence for a Database table to which I am inserting records in SQL Loader?
    I checked the SQL Loader manual and there is no information as to how to make use of a Oracle sequence.. in the control file?
    Thanks
    Surajit

    Yes, you can do it. Create the sequence (suppose you call it "PK_SEQ_X") and then in your control file reference it as "PK_SEQ_X.NEXTVAL". For example suppose you wanted to put it into a column named 'Y' the entry in your control file will look like 'load data insert into table Z (Y "PK_SEQ_X.NEXTVAL", ....)'
    Note that the double quotes around the sequence name are required.

  • Using nullif in sql loader

    I am using sql loader to load a table
    This is the syntax i am using
    LOAD DATA
    TRUNCATE
    INTO TABLE selva_tst
    WHEN(01:04) = 'D328' AND (06:06)='$'
    FIELDS TERMINATED BY "|"
         A_ID,
         NULLIF(CO,$),
         ANB,
         STS_DT          Date 'YYYYMMDD',
         DMP_ID
    It is giving error at line NULLIF(CO,$),
    stating that syntax error in this line
    can anyone help me in this regard
    thanks in advance

    You may be interested to look up documentation about using sql expressions to load data.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#sthref1238
    Best regards
    Maxim

  • Question about 'direct' parameter in sql loader utility

    Hi eveyone,
    Today I was asked what the advantages and disadvantages of 'direct' parameter of sql loader.
    In my opinion, if swithing direct on, oracle use direct path load.
    And it has no difference from the append hind in insert statement.
    The core merits are less redo hence faster.
    The main shortcoming is since little redo generated, we have to ask DBA to back up the data according to the rules immediately after the loading.
    Does my answer make sense or not? Plesae help to point out the important things I missed.
    best regards,
    Leon

    Hi,
    Direct path Export is much faster than conventional path Export because the data is read from disk into the buffer cache and rows are transferred directly to the Export client.
    Some conditions to use DIRECT parameter are,
    1. The Export parameter BUFFER applies only to conventional path Exports. For direct path Export, use the RECORDLENGTH parameter to specify the size of the buffer that Export uses for writing to the export file.
    2. You cannot use direct path when exporting in tablespace mode (TRANSPORT_TABLESPACES=Y).
    3. The QUERY parameter cannot be specified in a direct path Export.
    Thanks

  • SQL Loader part of Oracle Client? Seperate install,licensing

    I use Oracle SQL Loader on one of my network machines.
    The second does not have the SQLLDR.exe in the /bin directory.
    First, can I install this component seperately and secondly
    what are the licensing implications ?
    Thanks

    Assuming you are referring to client installation, the other machine where the SQLLDR.EXE is missing seems to be a "runtime" client installation. Oracle client is a free download so there should be no implications for installing an administrator type install on this machine.
    If this is not the case, then you should be talking to the sales person about knowing the implications.

  • Sql Loader Utility

    Hi,
    My existing table let say "employee" table already contains 200 records, today I need to use sql loader to import some records from csv file to database. After I finished, I only find 50 records in my table and all records are from .csv file.
    How can I add records without delete the existing records
    when using sql loader? What command I need to use?
    Thanks

    Thats a keyword you specify in your control file like below ...
    LOAD DATA
    INFILE *
    APPEND
    INTO TABLE EMPLOYEE
    Check for more options using the following link ...
    http://download-west.oracle.com/docs/cd/A87860_01/doc/server.817/a76955/ch05.htm#1892

  • Best practice guide for Batch Load utility in Oracle UCM.

    Hi,
    Is there any best practice guide for Oracle UCM Batch Loader utility.
    We are looking for information regarding batch size in terms of number and size of contents. Also is there any loading time standards considering the contents are uploaded in filesystem where filestore provider is configured?
    Thanks,
    Krishnendu

    Hi ,
    There are no specific set of steps / practices for batch loading contents to ucm . It would be very much dependent on how many contents does the user have to load to UCM and how well the server is configured in terms of performance .
    You can get more details from the following documentation link : http://docs.oracle.com/cd/E21043_01/doc.1111/e10792/c02_settings009.htm
    Thanks,
    Srinath

  • SQL*LOADER filter in Oracle 10g

    Hi,
    I need to load data from file into TABLE T1 using sql*loader but I must apply a filter in this way
    data file : 2 fields A and B
    Filter :
    A must verify: when exists (select 1 from T2 where T2.f1 = A)
    B must verify: when exists (select 1 from T2 where T2.f2 = B)
    A record must be rejected if one of these two roles doesn't OK.
    Do you have an idea please?
    Thx

    External table gives you the ability to query your files as you query your table.
    They are a much far better and flexible than SQL Loader.
    Read this
    http://www.orafaq.com/node/848
    Edited by: Karthick_Arp on Apr 6, 2009 5:57 AM

  • Help in calling sql loader and an oracle procedure in a script

    Hi Guru's
    please help me in writing an unix script which will call sql loader and also an oracle procedure..
    i wrote an script which is as follows.
    !/bin/sh
    clear
    #export ORACLE_SID='HOBS2'
    sqlldr USERID=load/ps94mfo16 CONTROL=test_nica.ctl LOG=test_nica.log
    retcode=`echo $?`
    case "$retcode" in
    0) echo "SQL*Loader execution successful" ;;
    1) echo "SQL*Loader execution exited with EX_FAIL, see logfile" ;;
    2) echo "SQL*Loader execution exited with EX_WARN, see logfile" ;;
    3) echo "SQL*Loader execution encountered a fatal error" ;;
    *) echo "unknown return code";;
    esac
    sqlplus USERID=load/ps94mfo16 << EOF
    EXEC DO_TEST_SHELL_SCRIPT
    it is loading the data in to an oracle table
    but the procedure is not executed..
    any valuable suggestion is highly appriciated..
    Cheers

    multiple duplicate threads:
    to call an oracle procedure and sql loader in an unix script
    Re: Can some one help he sql loader issue.

  • Using variables in SQL Loader

    Is it possible to pass or set a variable in SQL LOADER? In this case I want the file name (eg $data) that is getting passed from the command line to load into my table into the extract_date field.
    For example. The command line:
    sqlldr user/password control=deposit.ctl data=080322.txt
    Control file:
    Load data
    infile '$data'
    Append into table deposit
    , id position (1-10)
    , extract_date date "YYMMDD" $data
    Any thoughts?

    user567866 wrote:
    Is it possible to pass or set a variable in SQL LOADER? In this case I want the file name (eg $data) that is getting passed from the command line to load into my table into the extract_date field.
    For example. The command line:
    sqlldr user/password control=deposit.ctl data=080322.txt
    Control file:
    Load data
    infile '$data'
    Append into table deposit
    , id position (1-10)
    , extract_date date "YYMMDD" $data
    Any thoughts?Just wonder, why do you need a variable, if you are passing the filename on the command line? The sqlldr is perfectly capable to read the data from the file given as argument with parameter data. Just remove the line with infile from your controlfile and leave your commandline as is.
    Best regards
    Maxim

  • Concatenate positions in control file for sql*loader utility.

    Is there a way to concatenate several character positions in a control file for sql*loader???
    example... field1 position(1:3) || position(5:7) ????
    I would rather not create any unnecessary temp tables for a straight load...

    How about...
    /code
    field1 position(1:7) char "substr(:field1, 1, 3) || substr(:field1, 5)"

Maybe you are looking for

  • CRM 2007 : Unable to access the BP_HEAD component

    Hello, I'm a basis guy, very new to SAP CRM. We have been asked to install CRM 2007. We are able to ping the crm server from transaction sicf. The users are able to access the webclient, they're able to acess the component "CRM_UI_FRAME" Therefore, i

  • Output condition delete history in a Purchase order

    Hi, I would like to know how best we can find the history or change record of output delted in Purchase order. Here is the detailed scenario. I have created a PO and it populated he message conditon in the PO. I went into the PO using ME22n and delet

  • Exit to populate a custom field on additional tab b in order - inbound proc

    Hi experts , I Need to populate a custom field  on the additional tab b of an sales order during inbound processing. I am using the function module idoc_input_orders. Regards

  • Sharing Photostreams in iPhoto 9.4 not working

    iPhoto used to be so simple. Now, with Albums, Events, Photos, Journals, Photostreams etc it's all becoming a bit of a dog's breakfast. All I want to do is to share some photos with my family. So I use the new Photostream sharing facility in iPhoto 9

  • In iOS 7, apps refresh themselves when switching back to them

    I often work with one app and switch to another app, then return to the original.  After upgrading to iOS 7, it seems that apps (or web pages in Safari) now sometimes refresh or reload themselves when I switch back to them rather than simply presenti