SQL*LOADER on forms in IAS 10g environment

I want to execute a sqlloader command within a Oracle Form in a Oracle IAS 10g environment. Is there any knowledge out there how to solve that?
thanks,
Ame
Message was edited by:
joinnv

Well... you could try to call some unix script from your forms and have this script handle the sqlldr stuff (which is the solution you already found ;) ). You could also try to build some java bean to upload files and load it directly into your database (not using sqlldr anymore).

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

  • Run SQL*Loader from forms

    How can we run SQL*Loader from forms. I guess HOST command will run the OS comman on the clinet. How do I invoke the Loader script on the server from the forms clinet?
    -Ravi.

    Look..the oracle server is in UnixWare 7 and the client PC
    is on Windows XP Pro, but before install the Oracle Client Software into the client pc the builtin HOST doesn't work
    then I install the Software in Windows XP pc and now I'm
    working loading the txt file into the server on Unix,
    Try to install the Oracle Client Software into the Citrix
    client, I think it work.

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

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

  • SQL Loader from Forms 10

    Hello!
    How can i call to SQL Loader from my application developed by Forms 10?

    My application is doing something similar.
    Given that the iAS server can read from the data source (where the flat file for the sqlldr to load), all you need is to write a shell script that is invoked from within the forms application (using the host command). The shell script (I use Perl) will do invoking the sqlldr and also other checks, etc
    hope this helps

  • SQl loader is not working in 10g but working in 9i

    In My PC i have installed both 9i and 10g. could you please tell me why it is not working

    "SQL loader is not working" is rather like "my car won't start" http://tkyte.blogspot.com/2005/06/how-to-ask-questions.html
    The 9i Oracle Client install includes sqlldr. The 10g Oracle Client install does NOT include sqlldr. You'd have to do a "Custom" Install and specifically select "Oracle Database Utilities" to install.
    See MetaLink Note#437377.1
    Edited by: Hemant K Chitale on Dec 31, 2008 3:58 PM
    Edited by: Hemant K Chitale on Dec 31, 2008 4:00 PM

  • Need help, Trouble in uploading records using sql loader in Forms 6i

    Hi,
    I am trying to develop a screen for uploading records to a table by using a ctl file, batch file and sql loader.
    Env: Forms 6i, Oracle 8
    Table to be updated is: shy_upload_table
    My TSN entry looks similar to this,
    TEST_AXA.CNB.COM =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 11.23.11.123)(PORT = 1234))
    (CONNECT_DATA =
    (SID = axdabc)
    My intention is whenever i press the upload_button, I should truncate the table and upload it with the contents of the file.
    In the when-button-pressed event of the upload_button I have the following code. always I am able to truncate the table but am not able to upload it with the contents of the file. Can any of you help me fix this problem ?
    declare
         var_control varchar2(256);
         VAR_DATA VARCHAR2(256);
         VAR_OUTPUT VARCHAR2(500);
         var_filename varchar2(256);
         str varchar2(50);
         cnt number;
    begin
         FORMS_DDL('TRUNCATE TABLE shy_upload_table ');
         select count(*) into cnt from shy_upload_table;
         message('count '||cnt);
         MESSAGE('');
    If NOT form_success Then
         MESSAGE('Upload Failed');
         MESSAGE('Upload Failed');           
    else
         set_item_property('DISPLAY_PB',enabled,property_true);
    --when ever i run, i am able to see the display_pb enabled. it means form_success is true.
    end if;
         var_filename := :txt_filename;
    --I have tried with each of the below option,
    --sqlldr userid/[email protected] control=F:\ERP\file_upload.ctl
    --sqlldr userid/password@axdabc control=F:\ERP\file_upload.ctl
    --sqlldr userid/password@TEST_AXA.CNB.COM control=F:\ERP\file_upload.ctl
         VAR_DATA :='data=' || var_filename ;
         VAR_OUTPUT := var_control|| ' ' ||VAR_DATA;
         host('F:\a.bat');
    end;
    batch file contents...
    # I have tried with each of the below options
    sqlldr userid/[email protected] control=F:\ERP\file_upload.ctl data=F:\ERP\sample.txt log=F:\ERP\x.log bad=F:\ERP\x.bad
    #sqlldr userid/password@axdabc control=F:\ERP\file_upload.ctl data=F:\ERP\sample.txt log=F:\ERP\x.log bad=F:\ERP\x.bad
    #sqlldr userid/password@TEST_AXA.CNB.COM control=F:\ERP\file_upload.ctl data=F:\ERP\sample.txt log=F:\ERP\x.log bad=F:\ERP\x.bad
    pause
    Thanks
    vish

    Hi Francois,
    Thanks for responding, I am not very sure of what you want me to try out.
    When I double click the batch file containing the below, the record gets inserted in the table. Only when using my form and trying to upload, it fails to insert the record.
    batch file contents...
    #sqlldr userid/password@TEST_AXA.CNB.COM control=F:\ERP\file_upload.ctl data=F:\ERP\sample.txt log=F:\ERP\x.log bad=F:\ERP\x.bad
    pause
    Thanks
    Vish

  • Importing already-made SQL*Loader control files in OWB 10g

    Hi all,
    Suppose that I have a certain amount of already hand-made SQL*Loader control files, say 50 or so.
    Each of these control files have a variable quantity of fields.
    I feel really lazy, so I would like to know if it is possible to import directly these control files instead of re-typing them in the design center. That would save me a lot of time.
    Thanks !
    Burgy

    Hi Burgy
    One option is to use the sqlloader option to generate an external table from the SQLLoader control file (search for generate_only in the sqlloader documentation). If you define the external table in the database you can reverse engineer this into OWB.
    Cheers
    David

  • Reg:sql loader in Forms 10g

    Hai,
    we used sqlldr in forms 6i using host command. Later we upgraded to forms 10g but now the host command is not working. we are able to create directory with the host command, but not able to invoke sqlldr, also forms 10g is not giving any error also, (forms status is success). Did anybody faced similar problem? Can anyone please help me regarding this..

    I think, I did not make it clear, Sorry for that.
    Actually, sqlldr is on the application server and running fine with the 6i, as the respective control, data and log files were on the same machine. Now, we upgraded to forms 10g and trying to use the same sqlldr, but found that it is not being invoked at all.
    We first suspected the host command, but we are able to create a directory as follows,
    host('mkdir c:\test_host');
    This is working fine. But not sqlldr... I searched on metalink if there are any links on the issue but able to find the same problem unanswered.
    I will try for xhost facility...

  • Sharing Package level variables in PL/SQL Libraries in Forms 6i and 10g

    We have a Forms 6i Application, where we share variables between Forms in the following way:
    In scheme A_PROMATA is a table called T_GLOBAL_VAR, where we define our variables as Columns of the table. That means there is no record in the table, just columns, that represent our “global” variables, we want to share between Forms.
    Then we have a PL/SQL Library called NAV, where we have only the Package Specifiation:
    PACKAGE NAV
    IS
    VAR A_PROMATA.T_GLOBAL_VAR%ROWTYPE;
    END;
    This works fine for years, but when we try to migrate to Forms 10g, this does not work anymore, because we always get the following error message:
    ORA-06508 PL/SQL: could not find program unit being called
    But when we create a Dummy-Package Body with a Dummy Procedure in the Package NAV in the library, it works again...
    Does anybody know the reason for this???
    Regards and Thanks.
    Udo
    p.s.:
    Database is 10g (10.1.0.4.0)
    Application Server is 10g (10.1.2.0.0) on Red Hat

    Have you generated (compiled) the runtime .plx from your PLL library using the 10g compiler? I use the command:
    f90genm LIBNAME un/pw@xyz Module_Type=LIBRARY Output_File=LIBNAME Strip_Source=YESI tried out your situation, creating a PLL library with ONLY a package spec, and only a table%Rowtype record within the spec. While I had problems getting the Forms 10 Builder to generate the PLL Library, I was able to create a test form that sets, and then displays the columns within the record within the package spec.
    I had problems generating the .plx from the .pll within the Forms Builder. It kept giving me errors:    FRM-91507: Internal Error: Unable to generate library.
    and
        PDE-CCR003 Library TMP3 is currently in use.The only way I could create the .plx was from a cmd.exe window, with the batch compiler command above.

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

  • Use sql loader in forms

    when i put the following statements into oracle forms 9i using a mouse trigger procedure, it compiled successfully but the data was not upload
    BEGIN
    HOST('C:\orahome1\bin\sqlldr userid=hr/hr@orcl control=e:\table1.ctl data=e:\file.csv log=e:\abc.log');
    commit_form;
    END;
    however
    i use the same statement in sqlplus without the quotes '', it works and the data are uploaded successfully.
    HOST(C:\orahome1\bin\sqlldr userid=hr/hr@orcl control=e:\table1.ctl data=e:\file.csv log=e:\abc.log)
    so what was wrong with my mouse trigger procedure ?
    any idea, thanks.

    i tried to use the following and works fine
    begin
    host('del c:\temp.txt')
    end
    but it's just not working with the host command
    if i change it to client_host, i can't even compile the form successfully.
    btw, if the host command doesn't work in forms9i, how can it be compiled successfully.
    thanks for any comments.

  • Is there any difference in Oracle 9i SQL Loader and Oracle 10g SQL Loader

    Hi
    Can anyone tell me whether is there any difference in Oracle 9i SQL Loader and Oracle 10g SQL Loader?
    I am upgrading the 9i db to 10g and wanted to run the 9i SQL Loader control files on upgraded 10g db. So please let me know is there any difference which I need to consider any modifications in the control files..
    Thank you in advance
    Adi

    answered

Maybe you are looking for

  • How to get the last day of the current open fiscal period?

    hi folks,      I  have to display the last date of the current open fiscal period in the selection screen. Its just a display only.       if there is any function module vailable for getting that period, kindly suggest me? thanks in advance, cheers,

  • Repair permissions in Disk Utility won't stop

    OK, I've never done permissions repair on our MacBook Pro 15" (2 GB 1067 MHz DDR3, 2.4 GHz Intel Core 2 Duo).  (My apologies to the fastidious cleaners among this group.)  I've done multiple upgrades over the past 4 or so years that we've owned it, i

  • Itune 64-bit touble

    Hey so I tried to get music from my Itunes (on my computer) to my music on my Ipod touch. When I plug in my Ipod to sync it says "This Ipod cannot be used because the required software is not installed. Run the Itunes installer to remove Itunes, then

  • Unable to connect to oracle 11g db using ODBC/OCI in OBIEE rep

    Hi, i have windows 7 , 64 bit, oracle 11g R1, obiee 11g. Trying to connect to oracle 11g db when working on OBIEE rep, but the connection fails when connecting through odbc/oci. Any imput is appreciated. Thanks,

  • How to change Vista German to English?

    Hi, During a recent visit, I bought a laptop in Germany with Vista Home Premium. The display language is German. I do not understand German and I live in East Africa. How can I change the language without having to buy another copy of Windows? Please