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.

Similar Messages

  • Calling SQL Loader through Forms using webutils

    hi all,
    Can anyone tell me how can i call a sqlldr through forms 9i using webutils?Let me know if anyone have a sample script.
    Thanks
    Best Regards,
    Abrar
    [email protected]

    If your middle tier and database server are both unix boxes you could use host(rsh...)
    Are you suggesting webutil because your data to be loaded is on the PC ? If so you probably want to move it then load it as two seperate operations.
    If there isn't too much data you also have the option of using text_io to load it into a forms database block, which has the advantage that the user can see what is happening, and validation rules could be added if required.

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

  • SQL Loader through Forms 6i

    Hi,
    I need to know the steps to run sql loader through forms6i in windows environment.
    Please help me in this regard.

    1. Create a control file for Sql*Loader with all parameters you need
    2. Create a .bat file to run Sql*Loader, e.g. "sqlldr username/password@db control=<file above>"
    3. Use HOST command within Forms 6i to run the .bat file.

  • 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 using HOST command from Developer Forms 4.5

    I want to execute a set of code from D2K Forms 4.5 which has interfface with Client - OS ( In my case Windows NT/XP). I want to execute SQL Loader from Forms using Host Command and then after completion of that process, I want to do next transcations ( depending upond success of HOST/SQL Loader).
    How to achive this?
    I tried writing code like this ...
    l_vc_command := 'sqlldr73'
                        ||' USERID='||l_vc_username||'/'||l_vc_password||'@'||l_vc_connect_string
                        ||' CONTROL='||l_vc_filepath||'Upload.ctl'
                        ||' DATA='||LTRIM(RTRIM(l_vc_fileloc))
                        ||' LOG='||l_vc_filepath|| l_vc_log_file || '_' || l_dt_sysdate_str ||'.log'                    
                        ||' BAD='||l_vc_filepath|| l_vc_bad_file || '_' || l_dt_sysdate_str ||'.bad'
                        ||' DISCARD='||l_vc_filepath|| l_vc_discard_file || '_' || l_dt_sysdate_str ||'.dsc';
    HOST(l_vc_command,NO_PROMPT);
    After this command i want to do some other code execution. so even if it fails or success, next code is executed. How to control this?
    Please help..
    Regards,
    Milind

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

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

  • Running SQL Loader through PL/SQL

    Hi All,
    Is there a utility package that can be used to run SQL LOADER through PL/SQL?
    Regards

    External tables are new in 9i.
    If you need to call SQL*Loader in 8i, you'd be stuck with the Java stored procedure/ external procedure approach. Of course, this might also be an impetus to upgrade, since 8.1.7 leaves error correction support at the end of the year.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Calling SQL * LOADER  in stored procedure

    Hi Experts,
    Can we call sql*loader in stored procedures? . If yes , please let me know the syntax.
    Any help will be highly appreciated.
    Thanks.

    You can also use dbms_schedular to execute any shell or batch file - i guess ->
    BEGIN
      -- UNIX
      DBMS_SCHEDULER.create_job(
        job_name             => 'unix_command_job',
        job_type             => 'EXECUTABLE',
        number_of_arguments  => 1,
        job_action           => '/bin/ls',
        auto_drop            => FALSE,
        enabled              => FALSE);
      DBMS_SCHEDULER.set_job_argument_value('unix_command_job',1,'/tmp');
      DBMS_SCHEDULER.set_attribute('unix_command_job', 'credential_name', 'TIM_HALL_CREDENTIAL');
      DBMS_SCHEDULER.set_attribute('unix_command_job', 'destination', 'marge.localdomain:65001');
      DBMS_SCHEDULER.enable('unix_command_job');
    END;For details ->
    http://www.oracle-base.com/articles/11g/SchedulerEnhancements_11gR1.php
    http://www.oradev.com/dbms_scheduler.jsp
    http://www.psoug.org/reference/dbms_scheduler.html
    Regards.
    Satyaki De.

  • Calling sql loader in sqlplus

    Hi all, i am trying to load a file called text1.txt using sql loader. I am using sqlplus but i dont know how to call sql loader in sql plus.
    can someone provide syntax assumming data file is text1.txt and control file is txt.clt
    thanks

    Why on earth? Though you forgot to include version info, assuming you are not using 9i or older, you can and should use the external table facility and you don't need this unstable and resource consuming procedure.
    If you would have thought even one second about solving your own problem, you would have realized sqlloader is a separate O/S utility, which requires the host command, and username/password on the commandline.
    That alone is a reason not to do it.
    Sybrand Bakker
    Senior Oracle DBA

  • Calling SQL Loader with Dynamic file names

    HI all
    I woul like to know if I can call sql loader as below
    $ sqlldr userid=uname/pwd control=new.ctl, data=$1
    I have to schedule my loader 3 times a day and each time my file names are different(AAA_BBB_timestamp)
    Thanks

    I have found a solution myself and if any one is interested its like this
    for file in `ls -1 /opt/user/from/`
    do
    sqlldr userid=user/pwd@connect_string control=control_file.ctl data="/opt/user/from//$file"
    done
    Ramu

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

  • Execute SQL Loader through PL/SQL Block

    I want to run Sql Loader through PL/SQL Block. So Pls. give me solutions.

    It's the same as running any other OS command from PL/SQL - you can only do it by using Java. Check out the AskTom site for a good tutorial.
    rgds, APC

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

Maybe you are looking for

  • Error in Call Adapter

    Hello, We have RFC --> HTTPS scenario. The RFC Destination of type G is created in XI and the connection test is working fine. When I run this scenario, sometimes I get following error: com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapter:ATTRIBUTE_

  • How to get the font name used in document?

    Hi some one help me to get the font name which should check each text in the Illustrator CS3. Please someone guide me.. sAIFont->FontKeyFromFont(AIFontRef FntRef,&fontKey); Here what to set for fontref..

  • Unable to open Integration Directory or Repository for XI 3.0

    Hi Experts, We have done the installation and post installation of XI 3.0 and i have installed Java Web Start (JRE 1.4.2) but still unable to open the IR or ID from Browser. It is giving error "Unable to launch the application" and in detail it shows

  • Can I get a Trial Version of  "Perpetual License" CS6?

    Youbetcha! "Adobe will continue to make Creative Suite 6 available as a perpetual software license, and will provide bug fixes and security updates as necessary. All of the CS6 suite editions and individual products continue to be available for purch

  • Securables - Deny Access to Specific Tables

    Hello, I have a group contained in the Logins folder which I want to deny specific access to. These tables contain information that I do not want anyone in the group to access at any level. Under the Login Properties for this user, the "Search..." I'