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

Similar Messages

  • 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)"

  • How to set default directory for SQL LOADER

    hi all,
    i wanted to know how can we setup a default directory for SQL LOADER if at all we can. i connot place my control and data files in local system and use them at command prompt. rather i wanted to know if we can set default directory that the loader can use. this requirement is basically to enable all the clients to upload the data placed on the server and use the loader utility.
    thanks in advance,
    Basavraj

    Ella,
    You don't say which version of SQL Developer you are using via Citrix, but just setting the SQLDEVELOPER_USER_DIR hasn't worked for a long time (see Re: SQLDEVELOPER_USER_DIR does not function anymore). Also, since version 1.5, the default for the user directory (now set via ide.user.dir as shown below) is under the user profile area (relative to %APPDATA%), which you should be able to write to, even on Citrix.
    Assuming that neither of those help, you will need to get whoever installed SQL Developer on the Citrix C: drive to modify the sqldeveloper.conf to have a line like, where the path exists for everyone who will be using the shared SQL Developer (assumes everyone has a H: drive):
    AddVMOption -Dide.user.dir=H:\sqldeveloperAn alternative (depending on how you start SQL Developer via Citrix), is to create your own shortcut to start SQL Developer with something like:
    sqldeveloper -J-Dide.user.dir="%SQLDEVELOPER_USER_DIR%"theFurryOne

  • Seeking help on SQL loader

    I am trying to load the flat-file to the oracle database by using SQL LOADER utility but i am getting the error.
    i am putting the .ctl file and the error message along with.
    kindly help me at earliest as I am stuck with that.
    Thank you.
    ------------ctl file----------------------
    LOAD DATA
    INFILE *
    INTO TABLE dept
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (deptno, dname, loc)
    BEGINDATA
    12,RESEARCH,"SARATOGA"
    10,"ACCOUNTING",CLEVELAND
    11,"ART",SALEM
    13,FINANCE,"BOSTON"
    21,"SALES",PHILA.
    22,"SALES",ROCHESTER
    42,"INT'L","SAN FRAN"
    ----------------error message--------------
    SQL*Loader: Release 8.1.6.0.0 - Production on Thu Feb 8 15:40:48 2001
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Control File: dept.ctl
    Data File: dept.ctl
    Bad File: dept.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array: 64 rows, maximum of 65536 bytes
    Continuation: none specified
    Path used: Conventional
    Table DEPT, loaded from every logical record.
    Insert option in effect for this table: INSERT
    Column Name Position Len Term Encl Datatype
    DEPTNO FIRST * , O(") CHARACTER
    DNAME NEXT * , O(") CHARACTER
    LOC NEXT * , O(") CHARACTER
    SQL*Loader-601: For INSERT option, table must be empty. Error on table DEPT
    null

    Try using following script : -
    LOAD DATA
    INFILE *
    APPEND
    INTO TABLE dept
    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
    (deptno, dname, loc)
    BEGINDATA
    12,RESEARCH,"SARATOGA"
    10,"ACCOUNTING",CLEVELAND
    11,"ART",SALEM
    13,FINANCE,"BOSTON"
    21,"SALES",PHILA.
    22,"SALES",ROCHESTER
    42,"INT'L","SAN FRAN"
    null

  • 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.

  • Can u give an detail examples or help on SQL- loader

    Can u give an detail examples or help on SQL- loader
    I need full details on this how to run and what are the pre requirements for this and what
    Can u give an example with unix+sql loader

    The Oracle Utilities manual has a chapter on SQL*Loader Case Studies
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch10.htm#1656
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Format input for Sql*Loader

    I have a problem in formating an input file for Sql*Loader
    The file has the following format:
    1 Jeff
    2 Kyle
    3 Tom
    1 Lisa
    2 Bryan
    3 Max
    4 Rob
    5 Steve
    1 Richard
    2 Mary
    and so on
    the file should look as follows to process with Sql*Loader:
    1 Jeff 2 Kyle 3 Tom
    1 Lisa 2 Bryan 3 Max 4 Rob 5 Steve
    1 Richard 2 Mary
    any suggestions?
    Edited by: royce on Sep 18, 2008 2:08 AM

    royce wrote:
    I have a problem in formating an input file for Sql*Loader
    The file has the following format:
    1 Jeff
    2 Kyle
    3 Tom
    1 Lisa
    2 Bryan
    3 Max
    4 Rob
    5 Steve
    1 Richard
    2 Mary
    and so on
    the file should look as follows to process with Sql*Loader:
    1 Jeff 2 Kyle 3 Tom
    1 Lisa 2 Bryan 3 Max 4 Rob 5 Steve
    1 Richard 2 Mary
    any suggestions?
    Edited by: royce on Sep 18, 2008 2:08 AMActually, looking at your data again, you don't have a consistent format, so this makes it really difficult for something like SQL*Loader to process. If there were just e.g. 3 rows per record then that would be simple, but you are expecting SQL*Loader to look ahead to determine if there is more data or if it's reached the end of the record.
    You would be better to load the data (external tables would probably make it quicker and easier as the data will come in the order as it is specified in the file, which would help as you have no group identifier against the sets of records) as it is and then use SQL to process them.
    You haven't specified the resulting table that the data is loaded into. Is that just one single VARCHAR column with all the data concatenated or is it several columns (one for each name)?

  • 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

  • Why no exclusive lock for conventional path loading for SQL*Loader?

    why no exclusive lock for conventional path loading for SQL*Loader?
    it use insert statement so it should use exclusive lock right?
    thanks

    ok, so only update statement would put a lock but not for insert statement?
    because I have seen a situation where a user update rows in a sesssion (without commit) prevent another user update the rows.
    thanks

  • Utility to convert ASE  fmt files to ctl files for sql*loader

    Does anyone have a utility to convert bcp format files to oracle ctl files for use with sql*loader?

    Hi,
    The Oracle Migration Workbench will produce both BCP and the equivalent Oracle .ctl files for all tables in a database.
    Regards
    John

  • Help with sql loader charsets

    I was wondering if anyone could assist me with a sql loader question. I am trying to use it to load some hungarian data. It always turns the Ő character into an upside down question mark. I understand that it is because the database doesn't understand what that character is. Can someone help me find out how to resolve that? The database is UTF-8. If I paste the character in to the application, it takes it. I have tried all kinds of values for the CHARSET parameter in the .ctl file, but nothing seems to work....

    I believe we are using iso 8859-1.
    I am having a difficult time thinking that it could be we don't have the appropriate installations - because if we paste it in via the oracle application we can see it in a form. If we sql load that same character and look at it in an oracle form, we see the question marks.
    i've looked at many of the documents on tahiti already, and found some helpful stuff, but no explanation for the problem i am having so far :)

  • 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

  • Help on SQL  Loader

    What is sql loader ?
    please explain through example or post the link.
    Thanks in advance
    Pankaj

    HI,
    SQL*Loader is a bulk loader utility used for moving data from external files into the Oracle database.
    This link
    http://www.oracle.com/technology/products/database/utilities/htdocs/sql_loader_overview.html
    thanks

  • OWB 10gR2 : How to configure ctl and log locations for Sql*Loader mappings?

    Hi all,
    I'm using OWB 10gR2 to load data in tables with Sql*Loader mappings.
    In my project I have a datafile module and an Oracle module.
    When creating an sql*loader mapping in the oracle module, there is two properties for this mappings that I want to modify. The first is Control File Location and the second is Log File Location. Values for those properties are equal to the data file module location. When trying to change those values I can only chose "Use module configuration location".
    Somebody knows how to configure those properties with different locations as the one of the flat file module?
    What I want to do is to store the data file in one directory, and control file and log file in other directories.
    Thank you for your help.
    Bernard

    Hi,
    You're right, my problem is that the dropdown only show the location associated with the flat file location even if I have other file locations created in the design repository.
    The good news is that I have found the solution to solve the problem :
    1) Edit the file module and in tab "Data locations", add the locations you want to use for control file and log file.
    2) Open configuration window of the mapping and then the dropdown for properties Control File Location and Log File Location show new locations
    I have tested my mapping after changing those properties and it's working.
    Bernard

  • 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
    )

Maybe you are looking for