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.

Similar Messages

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

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

  • Problem in downloading a file from AS to client through form using webutil

    I am running oracle 10g sever & devloper 10g in the same machine. Almost every thing is working properly from a client PC in the network except the following aspect :-
    From client pc, through form, I have created one export(dmp file) which is being saved in the AS. Now I want this file to be downloaded from AS to this client PC.
    I have tried webutil_file.copy_file(server_filename,client_copy_name) which is not working. the error trace file says "Unable to open source file in server" & "Unable to read WebUtil configuration file".
    I have also tried webutil_file_transfer.AS_to_Client_with_progress
    which results in unsuccessful from server to client.
    I modified the webutil.cfg file as :=
    transfer.database.enabled=TRUE
    transfer.appsrv.enabled=TRUE
    transfer.appsrv.accessControl=FALSE
    transfer.appsrv.workAreaRoot=D:\temp
    transfer.appsrv.read.1=D:\temp
    transfer.appsrv.write.1=D:\temp
    Please help me out from this situation

    hi
    Welcome to OTN.
    try to use.
    Client_host()sarah

  • 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

  • Call a Form using Webutil from the Menu loose focus on the applet

    Hello,
    I have the following problem:
    When calling a form using webutil from the menu the focus on the applet (I mean the Forms Application window) is lost and I have to click on the window to get back the focus on the application.
    Any advice ?
    Env: Forms 9i / Webutil 1.06
    Rgds,
    Philippe

    Try to use the NO_HIDE parameter in the CALL_FORM() built-in.
    Call_Form( 'the_form', NO_HIDE ) ;Or maybe, in the[b] When-New-Form-Instance trigger of the called form, return the focus to the calling form
    Go_Form( Get_Application_Property( CALLING_FORM ) ) ;Francois

  • 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

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

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

Maybe you are looking for

  • PO Response mail not triggering in SRM SUS

    Hi, We are on SRM7 wtih ECC 6, When user click on Process, Confirm all and Send for a PO from SUS corresponding XML "PurchaseOrderConfirmation_Out" not triggered in SRM. with the same settings in Dev and Quality xml triggered successfully but not in

  • Read does not see last update

    I've got multiple thread reading and modifying the same objects. Sometimes a read by one thread does not see a change made and committed by another thread. Looking at the log shows the update was done and it set the field properly. But the next read

  • IPAD NOT RECOGNIZED BY ITUNES, AND NOT ALWAYS CHARGING

    HELLO, MY IPAD 1 32 GB WIFI/3G IOS 5.0.1 IS NO MORE RECOGNIZED BY ITUNES ON MACOS X 10.6 or PC, WITH ITUNES 10.5.3,  AND IS NOT CHARGING ALL THE TIME. IT DIDN'T SEEM TO BE AN ISSUE OF THE IPAD USB CONNECTOR, SINCE IT DIDN'T GET ANY SHOCK, AND IT ACCE

  • TS1436 I have an HP Pavilion dv5000, and there is no tab for "burning" under my preferences.

    Do I just need to use another compouter?

  • Invoice Number Generation

    Hi all, In APEX with Oracle 10g Express how can be generated the some invoice number more than one record, example: Order table we would like to load three or four transactions at one time with one invoice number. I would appreciate for helping this