Calling SQL Loader from ColdFusion Web Server

We are trying to Load Data files into Oracle through a Cold Fusion Web Application. Users will browse to a local file on their computers, click a button, and our application will use SQL Loader to load the data into oracle. The ColdFusion web server is Unix and the 11g database server is Linux. When we run the ColdFusion code below we get a file not found error, the sqlldr executable cannot be found. Do we need to install an Oracle client or something on the ColdFusion Web server to get this to work?
<cfexecute name="sqlldr" arguments="ADVDEMO@ADVDEMO/Transact2011 control=/space/users/www/advfiles/ControlFiles/BS/Bio_ControlFile.ctl" timeout="500"></cfexecute>

'sqlldr' is part of Oracle server or (full) Oracle client software - NOT the OS - so indeed you need to install at least the client. Unfortunately 'sqlldr' is not part of the Instant Client, which is much smaller than the full client.
Some guys tried to add 'sqlldr' manually:
http://my.opera.com/onyxluo/blog/2007/12/28/add-sql-loader-into-oracle-10-instant-client
Werner

Similar Messages

  • Calling SQL*Loader from Forms

    Hi,
    I was wondering if anyone has called SQL*Loader from Forms?
    What I am wanting to do is use Oracle Forms as the interface where you can specify a file that you can import into the database and it will use a set control file. Push the import button and SQL*Loader does the rest.
    Is using Java code to call SQL*Loader from Forms a viable option, or is there an easier way to achieve the desired outcome.
    Any ideas or guidance will be much appreciated.
    Thanks,
    Scott.

    Scott,
    In forms, there's a HOST built-in command which is supposed to execute any o/s commands.
    What you have to do is :
    1. Bult up the string exacltly in the fashion which you will run in o/s
    2. Call the HOST Built-in and pass in the string
    Here's a example :
    Declare
    lOsCmd Varchar2(1000) := Null;
    Begin
    lOsCmd := 'sqlldr user-id=userid/passwd@connectStr '
    || ' control=c:\temp\abc.ctl log=c:\temp\abc.log '
    || ' bad = c:\temp\abc.log';
    Host (lOsCmd, No_Screen);
    End;
    -- Shailender Mehta --

  • Calling Sql-loader from PL/SQL

    What is the command(s) to call Sql-Loader from inside a PL/SQL procedure?
    Regards,
    Ahmad.

    I don't think it is possible ...

  • Calling Sql*Loader from oracle Form builder

    How do i call sql* loader from my forms to import the external data in different formats into my existing database?
    Specify the flexibility of sql* loader to import external data from .txt files or .xls files.
    Would be thankful if certain examples are given along with the answer.

    Hi,
    1. First you have to create seperate ctl (Control files) which maps to different file formats
    2. Using Oracle Forms,
    2a) You can use the 'HOST' command to execute the command line ie. In this case executing
    SQL*Loader script
    2b) You also have the feature in ORACLE forms to read text files and load the data into
    ORACLE db.
    This can be achieved by using TEXT_IO package which comes with ORACLE Forms.
    Hope this helps
    Ta
    Shailender

  • Calling SQL*Loader from OCCI

    Hi All,
    I need to access SQL*Loader from C++.
    I know there is an interface for OCI to access SQL*Loader.
    I also know there is a gnu project of a c++ wrapper to the OCI-SQL*Loader interface (odpd).
    According to the OCCI documentation it is just a C++ facade of OCI (with some goodies like thread managing , etc.).
    I want to know the following:
    1. How can I operate OCI from OCCI?
    2. Are there are source samples of operating OCI from OCCI or even better operating OCI SQL*Loader interface from OCCI?
    3. Are there are any known (/unknown :-) ) problems with either OCCI access to OCI or OCI interface itself to the SQL*Loader?
    Thanks,
    Arik

    Hi,
    If you have a OCCI application and you want to interoperate with OCI, you can retrieve the underlying OCI handles from OCCI objects and write OCI code.
    e.g :-
    //with Environment env, Connection conn OCCI objects
    OCIEnv *ocienv = env->getOCIEnv();
    OCISvcCtx *ocisvc = conn->getOCISvcCtx();
    //use OCI calls
    OCIError *errhp;
    OCIHandleAlloc (ocienv, &errhp, OCI_HTYPE_ERROR,...);
    OCIHandleAlloc (ocienv, &dpctx, OCI_HTYPE_DIRPATH_CTX,..);
    err = OCIDirPathLoadStream(...);
    OCCI does not have a direct path API at present.
    Thanks.

  • How to Call SQL Loader from Java ( servlet )?

    We need to call SQL Loader command from Java Servlets? Any suggestions how this can be done?
    Thanks
    Rahul

    Probably not the best way, but you could try using JNI to call a C function which then invokes SQL Loader via system() or exec(). I haven't done this myself though...

  • Calling SQL LOADER From Java Program

    Hi
    I need to invoke sql loader from inside a Java Class.
    Any Pointers in this regards will be really appreciated.
    Thanks
    Vishal

    You can create two different files which has sqlldr command defined....
    1. loader.sh
    2. loader.bat
    and in the depending on the OS execute one...
             String command = "";
             if(System.getProperty("os.name").equals("Windows 2000")){
                    //if os is windows 2000  then execute bat file
                     command =  <<bat file path>>
              }else{
                      command = <<shell path>>
              Runtime rt = Runtime.getRuntime();
              Process p = rt.exec(command);
              int i = p.exitValue();
             

  • Calling SQL Loader from Forms 4.5 using HOST command in Win2000

    One of my forms calls SQL Loader 7.3 using HOST command to load a csv file onto the database(Oracle 7.3) under Windows 2000 platform.
    Only after sql loader finishes its operation the control should come to my form i.e. synchronous execution.
    As of now its running asynchronously.
    Is there any way to make it synchronous. If Not any other work arounds?
    Environment Details
    Forms [32 Bit] Version 4.5.10.6.0 (Production)
    Windows 2000 Operating System
    Oracle7 Release 7.3.2.3.2

    Forms6i running on W2000, Rdbms 8.1.7
    in Forms I added a button TEST,
    Trigger when-button-pressed : host('test.bat') ;
    in directory .......\frm I added file test.bat :
    REM ===============
    cd /d C:\........\ldr
    pause
    sqlldr parfile=test.par
    pause
    type test.log
    pause
    exit
    REM ================
    now, pressing TEST button opens DOS window, telling me what's going on, running sqlldr, finally going back to forms
    Are you using NO_PROMPT or NO_SCREEN option of HOST command ?
    Had a look at Forms 4.5 manuals, there is no mentioning of (a)synchronously operation in connection with HOST command.

  • Calling SQL Loader from SQL Plus

    Hi everyone,
    I currently use both SQL Loader and SQL Plus to load data and to then carry out certain DML tasks and to reinstate indexes. That all works fine but of course I need to be present to start and to monitor the various scripts.
    What I would really like to do is to be able to incorporate the calls to SQL-Loader into my SQL-Plus scripts and am wondering if this is possible.
    At the moment I run some parts of the load in 'batch' (i.e. command line calls to SQL-Loader and to SQL-Plus) but this won't work for the whole load because the batch calls (from Windows) are not able to wait for particular processes to finish before they start the next. This works OK for the SQL-Loader scripts (because they can run in parallel) but will not work for the whole load because the load needs to be finished before the further processing starts.
    Or maybe there is a way (Windows .BAT files?) to set up batch processes which are intelligent enough to wait for one action to finish before starting the next action.
    Any thoughts or any links to HOWTOs on this would be a great help.
    Regards and thanks,
    Alan Searle

    Hi Alan,
    In SQL*Plus you have the HOST command.
    I would go for the .bat solution using [START /WAIT|http://www.computerhope.com/starthlp.htm]
    Regards
    Peter

  • Dynamic charting in J2ME using SVG - based on SQL query from a web server

    Hi
    I am creating a J2ME application which needs to generate dynamic charts for the user.
    The data for generating the charts is stored on a web server. In order to have minimal computations on the mobile device, I want to generate the charts on the web server itself.
    I have written a code which generates svg (svg tiny) charts dynamically on a web server based on sql queries on a database . Now I want a J2ME client app to be able to retrieve this data through a web service.
    Can someone guide me as to how to return svg files from a java web service.
    Any help would be greatly appreciated.
    Regards
    Sparsh

    Hi
    Actually, I am developing my application using Netbeans 6. In order to connect to my web service , I am using the J2ME client to web service as the type of my project and that uses the above mentioned API's.
    My question is how do I enable my web service to return a SVG file , and then how do I retrieve it in the J2ME client. Any example application that anyone knows online would be really helpful

  • Error while calling sql loader from shell script.

    In the table DBMS_SCHEDULER_JOB_RUN_DETAILS im getting the error as ""SQL*Loader-128: unable to begin a session ORA-01017: invalid username/password; logon denied""....do we need previliges for creating session of the db user????.....or wht other settings we require to do.....if the username and password used is right.

    user1122577 wrote:
    SQL*Loader-128: unable to begin a session ORA-01017: invalid username/password; logon deniedI don't know, but somehow the error you recived looks like ORA-01017 : )
    [oracle@dell ~]$ sqlplus ring/ring
    SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 22 11:50:58 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, Data Mining and Real Application Testing options
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, Data Mining and Real Application Testing options
    [oracle@dell ~]$
    [oracle@dell ~]$
    [oracle@dell ~]$ sqlldr ring/ring
    control = i don't have it
    SQL*Loader: Release 10.2.0.4.0 - Production on Thu Jul 22 11:51:08 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    SQL*Loader-500: Unable to open file (i don't have it.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: No such file or directory
    [oracle@dell ~]$
    [oracle@dell ~]$
    [oracle@dell ~]$ sqlldr ring/wrongpassword
    control = i don't have it again
    SQL*Loader: Release 10.2.0.4.0 - Production on Thu Jul 22 11:51:38 2010
    Copyright (c) 1982, 2007, Oracle.  All rights reserved.
    SQL*Loader-128: unable to begin a session
    ORA-01017: invalid username/password; logon denied
    [oracle@dell ~]$

  • Calling SQL*Loader from PERL; Message 2100 not found

    I am trying a simple PERL script to call sqlldr and load data into an Oracle 10G database. I get the error message:
    Message 2100 not found; No message file for product=RDBMS, facility=UL
    Many forums have said the answer to this is to set environment variables like ORACLE_HOME and PATH. Even having done that I get this error. My script looks like:
    #!E:\CommonApps\Perl\Perl\bin -w
    $ENV{ORACLE_HOME}='E:\CommonApps\oracle';
    print "Oracle HOME is: ";
    print $ENV{ORACLE_HOME};
    print "\n";
    $ENV{PATH} = 'E:\CommonApps\oracle;E:\CommonApps\oracle\bin';
    print "Path is ";
    print $ENV{PATH};
    print "\n";
    if ($#ARGV != 7) { print "Incorrect Usage of runsqlldr\n";print "Usage: perl runsqlldr.pl dbuser dbpass dbname datafile discard ctlfile logfile badfile \n"; exit; }
    $dbuser=$ARGV[0];
    $dbpass=$ARGV[1];
    $dbname=$ARGV[2];
    $datafile=$ARGV[3];
    $discard=$ARGV[4];
    $ctlfile=$ARGV[5];
    $logfile=$ARGV[6];
    $badfile=$ARGV[7];
    if (system("sqlldr userid=$dbuser/$dbpass\@$dbname control=$ctlfile data=$datafile=log=$logfile bad=$badfile discard=$discard SKIP=1 ERRORS=10000 ROWS=10000 BINDSIZE=512000 PARALLEL=TRUE") != 0) {
    die "\n Running sqlldr failed!\n";
    exit 0;
    Is there anything else I need to do to make this work? The E:\CommonApps\oracle\rdbms\mesg directory has 3 files: kgpus.msb, ocius.msb, oraus.msb.
    Thanks
    Arvind

    *** Duplicate Post *** {code}                                                                                                                                                                                                                           

  • Calling SQL*Loader from Windows

    Hi I have created the following Control file and stored it on my PC at Z:\D DRIVE\LG\Kenya\RAW DATA FILES
    OPTIONS (ERRORS=999999999, DIRECT=TRUE, ROWS=100000)
    LOAD DATA
    INFILE 'Z:\D DRIVE\LG\Kenya\RAW DATA FILES\Personal_Loans_Raw_Data.csv'
    APPEND
    PRESERVE BLANKS
    INTO TABLE TB_KEN_LOANS_RAW_DATA
    FIELDS TERMINATED BY ','
    OPTIONALLY ENCLOSED BY '"'
    TRAILING NULLCOLS
    CUSTOMER_NUMBER
    , AUTHORISER_DECISION
    , SALES_CODE
    , OPEN_DATE
    , PRODUCT
    , TOP_UP_LOAN
    , LOAN_AMOUNT
    , TOP_UP_AMOUNT
    , TOP_UP_ACCT_NO
    , SYSTEM_DATE CONSTANT '30-APR-2009'
    , LOAD_DATE "SYSDATE"
    How should i load it in Windows?

    user637544 wrote:
    i executed the following statement at the Windows - > Run
    sqlldr userid=schema/password@sid control=Z:\D DRIVE\LG\Kenya\RAW DATA FILES\loans.ctl
    but nothing happened. just a black box opened and closed immediately. no log files, bad files or records were inserted.The problem with windows -> run is that it opens a command window and then automatically closes it when the command is finished, so if there were any errors you won't get a chance to see them.
    Use:
    Windows -> Run -> cmd <enter>
    which will open up a command window.
    In that command window, issue your sqlldr command as you did previously.
    Then see what output/errors you get.

  • Calling oracle SQL Loader from java program

    Hi,
    I want to insert data into oracle tables from a text files containing fixed length fields. I am using SQLLoader to achieve this. The requirement is to call the SQLLoader within the java program.
    Does anyone know how to call SQL Loader from java program?
    Thanks,
    Varsha

    Simply "exec" the sqlldr program with the parameters you need to pass to it.
    Runtime.exec (........)
    Try to pass all parameters needed including the username and password, and use the option "silent" to avoid output, and the option "log" to have a log file of the modifications that sqlldr has done to the database.

  • SQL loader from froms 9i

    hi,
    can any one tell me how to call sql loader from forms 9i
    thanks
    vikram.

    Hi,
    How to execute SQLLDR from web forms in IAS.
    You need to set the ORACLE_HOME to the one which has sqlldr.
    You can create a DOS BAT file like this for Windows and call this
    using the HOST built-in.
    If you are using this on web then the HOST will execute in the
    Application Server machine. So, files should be in that machine.
    REM=======For Windows===============
    REM filename Mysqlldr.BAT
    REM my file to execute sqlldr
    set ORACLE_HOME=D:\oracle\iSuites
    set PATH=D:\oracle\iSuites\bin;%PATH%
    sqlldr scott/tiger@l817 D:\Mycontrol.ctl DATA=mydata.dat LOG=mylog.log BAD=mybad.log
    REM======================
    Similarily, you can create a Shell script for UNIX system.
    Source: Metalink
    ~KBK

Maybe you are looking for

  • Failed to open the connection. [Database Vendor Code:12154]

    I am brand new to Crystal Reports Server.  I am using Oracle as a database and 10g client on my XP workstations.  I keep getting this message.  I have my ODBC drivers loaded and tested for connection.  I have my Business View set up with the appropri

  • GT70 0ND Windows 8 Downgrade

    Hello, I'm looking at how to downgrade my OS from windows 8 (pre-packaged from PCCASEGEAR) to windows 7, I have re-initialized my 2x 64gb SSD's RAID 0 setup when I go to install windows it complains that the BIOS doesn't allow booting from the drive.

  • Help with using external hard drive to boot windows on PC

    Hi, I'm not sure if this is in the right place, so apologies in advance if not. I've looked around the internet for a good while now, and I haven't found anyone in my exact position. My PC's hard drive (running Windows 7) recently died; long story sh

  • IPhone Stolen , can apple block the phone's serial from itunes?

    hi there , i've just lost my phone about like an hour ago while i was in the gym, i have the warranty card and the phone can be traced as registered under my name ( will be providing to any apple staff my identification card along with the report of

  • I cannot read your e-mail to me as the e-mail is too small

    ''duplicate - https://support.mozilla.com/en-US/questions/902425'' You sent me an e-mail and I cannot read it because it is too small, I need to know how to fix it so it is the normal size. I cannot read anything on the e-mail at all.