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.

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

  • 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

  • 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

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

  • 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

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

  • Issuing SQL command through  Forms

    Hi
    How we can issue SQL command e.g. CREATE USER, through Forms.
    Regards!

    Issues dynamic SQL statements at runtime, including server-side PL/SQL and DDL.
    Note All DDL operations issues an implicit Commit
    Syntax
    Function FORMS_DDL(statement VARCHAR2);
    If you use FORMS_DDL to executed a valid PL/SQL Block:
    If you user FORM_DDL to executed a single DML or DDL stmt :
    Omit the trailing semicolon to avoid an invalid character error
    Thanks

  • 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

  • ODBC for SQL Server through FORMS 6

    Does a way exist of through the forms6 acessando oracle 8i to record data in a bank SQL Server 7 of Microsoft... do I marry yes, as it would be the instruction?
    null

    Check your DSN, I am using Jdbc-Odbc bridge to open connection to MS-SQLServer. Using System DSN, Check usrname and password. My connection looks like this.
    public Connection getDbConnection(String dbdriver,String url,String user,String passwd){
    Connection dbconn = null;
    try {
    Class.forName(dbdriver);
    dbConn = DriverManager.getConnection(url,user,passwd);
    }catch(ClassNotFoundException e){
    System.err.println(e.getMessage());
    }catch(SQLException sqle){
    handleSQLException(sqle);
    }catch(Exception e){
    System.err.println(e.getMessage());
    return dbconn;

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

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

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

Maybe you are looking for

  • How to display my ResultSet in a JSP??

    First off, I'm new to Java programming. Here's my problem. I have a set of users in my database. I'd like to retrieve all the user ID's (these are integers) from my User-table and display them in a JSP. Now, I realize that my coding below isn't very

  • Not able to connect MySql From sunOne IDE

    I selected Runtime pane in the SunoneIDE 5.0 and need to insert data to the database which is in MySql, I created database in MySql. when i select drivers->mySql and rightclick addString -> and i i gave database URL and when i say test connection. My

  • Upgrade question from 3.1 to 3.2

    I am trying to upgrade from Application Express 3.1.1.00.09 to 3.2. It says following @apexins tablespace_apex tablespace_files tablespace_temp images tablespace_apex is the name of the tablespace for the Oracle Application Express user. tablespace_f

  • Error: target not found: package-query =1.0 although I have it

    I used to work on Arch but it was installed for me by a friend, now I decided to install it on my own and it was a success! But when I tried installing yaourt it didn't work. I know that it needs package-query so I installed it, but when I try to bui

  • "Runtime Error ITAB_DUPLICATE_KEY"

    Object Navigator->Repository Browser Package: SBOOKSHOP BSP library->BSP Applications When i try to open Bsp application called "tutorial_3", the system returns a short-dump message "Runtime Error ITAB_DUPLICATE_KEY" Message detail: "What happened?