Help: INFILE Syntax for Sql loader in Linux

Hi
I am using sqlload in Linux. How do I specify the INFILE when abc.dat is in say a logical drive ORACLE_INFILE?
I also know the exact file location like /u01/file_folder.
In Windows, we have for examle
INFILE 'c: file_folder\abc.dat'
In Linux, what we do when file, abc.dat is in /u01/file_folder or logical drive ORACLE_INFILE?
Any suggestions are greatly appreciated.
Thanks.

Hi
Just finished a test and it worked. It is apparently a simple thing just about path/file name in Linux. So in Linux we do:
INFILE '/path/abc.dat'

Similar Messages

  • Invoking SQL Loader from linux - Help Needed

    Hi All,
    When i tried to invoke the sql loader from linux by using following command
    sqlldr username@server/password control=loader.ctl
    But its always throws this message
    Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL
    Can somebody help me to fix this issue?

    You may need to set your Oracle environment, try this ($ is the command prompt):
    $ export ORACLE_SID=orcl
    $ . /usr/local/bin/oraenv
    $ sqlldr username@server/password control=loader.ctl:p

  • SQL*Loader on Linux AS4

    I am trying to execute SQL*Loader from Linux prompt (OS is RHEL AS4) and system is not able to recognize sqlload.
    I am able to log on to sqlplus but not sure why or what needs to done to be able to invoke sqlload from linux command prompt.
    Thx for any help.

    You will have to install the full client software. Pl be aware that Ubuntu is not a certified OS to install Oracle software
    HTH
    Srini

  • 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

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

  • Creating ODBC DSN for SQL Server in LINUX

    Hi All,
    I am getting probelms in creating DSN for SQL server. I have created an entry in odbc.ini file under ODBC sources and provided the SQL server detiails as follows
    [ODBC Data Sources]
    AnalyticsWeb=Oracle BI Server
    Cluster=Oracle BI Server
    SSL_Sample=Oracle BI Server
    SQL_DB=DataDirect 5.1 SQL Server Wire Protocol
    [SQL_DB]
    Driver=/u01/OracleBI/odbc/lib/SEmsss23.so
    Description=DataDirect 5.1 SQL Server Wire Protocol
    Address=172:16:1:169, 1433;
    AlternateServers=
    AnsiNPW=Yes
    ConnectionRetryCount=0
    ConnectionRetryDelay=3
    Database=actdb/act7
    LoadBalancing=0
    LogonID=oracle
    Password=tiger
    QuoteID=No
    ReportCodePageConversionErrors=0
    When I test the connection ,i am getting the following error
    +[nQSError: 16023] The ODBC function has returned an error. The database may not be available, or the network may be down.+
    Can you please help in fixing this issue.I am not sure of the Drivers and the descrition that I am using are correct or not.
    Please let me know the process of creating the DSN for SQL server in LINUX and also how can we check the available drivers in LINUX?
    Thank You in advance,
    S1r1

    OBIEE does all of its data retrieval from the server. Your server needs to be able to query all of the data sources that you define.
    The client is irrelevant here, it's just a web browser consuming data that the BI Server returns to it.
    So yes you need to define connectivity from your Linux server to your SQL Server box.
    The Systems Requirements doc (http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10417.pdf) details DataDirect ODBC drivers that are provided for non-Widows connectivity to SQL Server

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

  • 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

  • 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

  • Controller file for SQL Loader

    Guys,
    My data is coming in flat from some third party in the below format
    1,Stewart,"Current Address: Street-A, Flat-507,  London, UK
    Permanent Address: Street-B, Flat-201, London, UK"
    2,Patrick,"Current Address: Street-A, Flat-507,  Bangalore, India
    Permanent Address: Street-B, Flat-201, Delhi, India"
    I want to load the data in a custom table by using a SQL loader program which will use a controller program. This program needs to populate the table in below manner
    SEQ                                EMPLOYEE                                           ADDRESS INFORMATION
    1                                     Stewart                                                  Current Address: Street-A, Flat-507,  London, UK
                                                                                                        Permanent Address: Street-B, Flat-201, London, UK
    2                                     Patrick                                                  Current Address: Street-A, Flat-507,  Bangalore, India
                                                                                                        Permanent Address: Street-B, Flat-201, Delhi, India
    Could you guys please help me in writing the controller file to read the data from file and populate the table as described above. Thanks.
    -Sunil

    It is a little hard to tell exactly what your data file looks like and what you want your results to be, due to this forum mangling things a bit and adding extra lines and such.  In general you can either use CONTINUEIF or CONCATENATE.  I have demonstrated both below.  When using CONTINUEIF, it assumes each additional line begins with the word "Permanent".  When using CONCATENATE, it assumes each two lines constitutes one record.  I have also used REPLACE to add a line feed in front of "Permanent", after it is removed during continuation or concatenation.
    SCOTT@orcl12c> host type test.dat
    1,Stewart,"Current Address: Street-A, Flat-507,  London, UK
    Permanent Address: Street-B, Flat-201, London, UK"
    2,Patrick,"Current Address: Street-A, Flat-507,  Bangalore, India
    Permanent Address: Street-B, Flat-201, Delhi, India"
    SCOTT@orcl12c> host type test.ctl
    load data
    infile test.dat
    continueif next preserve (1:9) = 'Permanent'
    into table test_tab
    fields terminated by ','
    optionally enclosed by '"'
    trailing nullcols
    (seq, employee,
    address_information "replace (:address_information, 'Permanent', CHR(10) || 'Permanent')")
    SCOTT@orcl12c> host type test2.ctl
    load data
    infile test.dat
    concatenate 2
    into table test_tab
    fields terminated by ','
    optionally enclosed by '"'
    trailing nullcols
    (seq, employee,
    address_information "replace (:address_information, 'Permanent', CHR(10) || 'Permanent')")
    SCOTT@orcl12c> create table test_tab
      2    (seq                    number,
      3     employee               varchar2(8),
      4     address_information    varchar2(200))
      5  /
    Table created.
    SCOTT@orcl12c> host sqlldr scott/tiger control=test.ctl log=test.log
    SQL*Loader: Release 12.1.0.1.0 - Production on Mon Dec 16 13:11:40 2013
    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
    Path used:      Conventional
    Commit point reached - logical record count 1
    Commit point reached - logical record count 2
    Table TEST_TAB:
      2 Rows successfully loaded.
    Check the log file:
      test.log
    for more information about the load.
    SCOTT@orcl12c> column address_information format a60
    SCOTT@orcl12c> select * from test_tab
      2  /
           SEQ EMPLOYEE ADDRESS_INFORMATION
             1 Stewart  Current Address: Street-A, Flat-507,  London, UK
                        Permanent Address: Street-B, Flat-201, London, UK
             2 Patrick  Current Address: Street-A, Flat-507,  Bangalore, India
                        Permanent Address: Street-B, Flat-201, Delhi, India
    2 rows selected.
    SCOTT@orcl12c> truncate table test_tab
      2  /
    Table truncated.
    SCOTT@orcl12c> host sqlldr scott/tiger control=test2.ctl log=test2.log
    SQL*Loader: Release 12.1.0.1.0 - Production on Mon Dec 16 13:11:40 2013
    Copyright (c) 1982, 2013, Oracle and/or its affiliates.  All rights reserved.
    Path used:      Conventional
    Commit point reached - logical record count 2
    Table TEST_TAB:
      2 Rows successfully loaded.
    Check the log file:
      test2.log
    for more information about the load.
    SCOTT@orcl12c> select * from test_tab
      2  /
           SEQ EMPLOYEE ADDRESS_INFORMATION
             1 Stewart  Current Address: Street-A, Flat-507,  London, UK
                        Permanent Address: Street-B, Flat-201, London, UK
             2 Patrick  Current Address: Street-A, Flat-507,  Bangalore, India
                        Permanent Address: Street-B, Flat-201, Delhi, India
    2 rows selected.

  • Control file for SQL*Loader

    Hello,
    I have the following file (2 line) which I want to intend in an oracle database with the SQL*Loader.
    tommy050+3423
    tom 070-0006
    The file consists of two lines and three columns.
    Column1 has always 5 digits and is a String. Additional empty digits will be filled with blanks. Here: “tommy” and “tom “
    Column2 has three digits and is a number. Here: “050” and “070”.
    Column 3 is also a number and consists of four digits. Additionally there is a fifth digit for the leading sign ("+" or "-"). Here: “+3423” and “-0006”.
    This file I want to import in my table “MyTab”.
    MyTab(
         thing          VARCHAR2(5)
         number     NUMBER(3)
         amount     NUMBER
    How would the control file for the SQL*Loader look like for this example?
    Regards
    Homer

    This is a start (untested)
        LOAD DATA
        INFILE 'sample.dat'
        BADFILE 'sample.bad'
        DISCARDFILE 'sample.dsc'
        APPEND
        INTO TABLE MyTab
          ( thing POSITION(1:5)  CHAR ,
           NUMBER    POSITION(6:8)  INTEGER,
           amount POSITION(9:12) INTEGER  )Can you have a column named number?

  • 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

  • Help required to build SQL loader control file

    I have a table, That we need to load using SQL loader.
    table structure is --
    <emp_id>,<first_name>,<middle_name>,<last_name>,<sal>
    The structure of flat file is like below,
    <emp_id>|<emp_name>|<sal>
    <emp_name> field can contain space to define first name, middle name and last name,
    if no space is there means we only need to load first name. and one space means First and last name should load.
    Sample flat file--
    1001|Ram|10000
    1002|Syam Kumar Sharma|20000
    1003|Jadu Prashad|15000
    Please help me out to build the control file.
    Thanks in Advance

    Means, can use DBMS_SCHEDULER for loading data ?Yes, you can create procedures for that and let the scheduler execute them on the desired interval
    (you can even execute OS commands through DBMS_SCHEDULER).
    Read about it here:
    http://www.oracle.com/pls/db102/search?word=DBMS_SCHEDULER&partno=
    http://www.oracle-base.com/articles/10g/Scheduler10g.php
    By the way, instead of using sqlloader why not switch to using external tables?
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6611962171229
    http://www.oracle-base.com/articles/9i/SQLNewFeatures9i.php#ExternalTables
    A few other approaches (pre 10g)
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2048340300346698595
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3084681089099

  • Script for sql*loader

    Hi All,
    I am loading the data from .csv format to table by using sql*loader.
    This sql*loader command was existed in one of the pl/sql Procedure. this procedure will first create a table and then it will get the data by using sql*loader command,then one procedure will run.
    to run this script we are manually loading the data from excel by using sql*laoder by running the .ctl command from Command prompt.. instead of doing manually this process is there any other way to do it automatically.
    if it is possible please let me know.
    here i am giving the script
    drop table emp;
    create table emp
    (eno number,
    ename  varchar2(20),
    job varchar2(20),
    sal number(4),
    doj date
    - here table created.then here by using below sql*loader command loading the data info emp table
    load data
    infile <file path>
    fields terminated by ','
    intto table emp
    (eno,
    ename,
    job,
    sal)by running this control file manually from command prompt loading the data.
    then there is a procedure which we need to to update the EMP table.
    for this whole thing we are just running the script except loading the data part.
    for this please let me know the automation part.
    Thanks.

    Hi,
    Create a shell Script(Unix) or Windows batch Job to automate the entire process. The script will like below
    1.Connect SQLPLUS with the Createtable.SQL file (The Createtable.sql will have the create table script)
    2.invoke sql loader with the control file
    3.then again connect SQLPLUS with the executeproc.sql file (the executeproc.sql will have the execute command to execute the stored procedure)
    by this way your entire process can be in one script and automate by scheduling it in unix or windows.
    Thanks,
    Vijay
    Edited by: Vijayaraghavan Krishnan on Nov 27, 2012 4:48 PM

  • Changing the File path for SQL Loader Recognition

    I am learning how to create a control file. The names.ctl file was placed in "Names" folder in my "C:\Windows" file.
    I get the following error when trying to run the script for sqlldr:
    Sql*Loader-500 Unable to open file.
    Sql*Loader-553 file not found
    Sql*Loader-System error: the system cannot find the specified file.
    The path on the folder in c:\Windows\names\names.ctl
    How do I make SQL Loader recognize it?

    Pl post details of OS and database versions. Have you tried this ?
    sqlldr CONTROL=c:\Windows\names\names.ctl ...HTH
    Srini

Maybe you are looking for