How to call sqlldr utility in stored procedure

Hi,
i want to call sqlldr exe from stored procedure.
Regards,
Tushar Josih

user12044491 wrote:
currently i am working on oracle release 10g R2.
i am not very much sure whether all CTL option are available in the external table.Before you decide on the method you should clearly understand the following. SQL*Loader is client side tool while job and external table are server side tools. Therefore, unless you are connecting to oracle from database server or file you are loading is accessible from database server, neither job nor external table will help you. And now back to your question - yes, not all SQL*Loader features are available for external tables but most of the time there is a way around it.
SY.

Similar Messages

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

  • How to call PL-SQL script/stored procedure from Java?

    Assume I want to call a PL-SQL stored procedure from external Java program.
    How can I do this?
    Is there a simple "Hello world" example for this?
    Peter

    This forum is for Oracle only not for java
    Ug

  • How to call PL-SQL script/stored procedure from BPEL?

    Assume I want to call a PL-SQL stored procedure from BPEL.
    How can I do this?
    Is there a simple "Hello world" example for this?
    Peter

    The database adapter supports calling stored procedures. There is an example called "File2StoredProcedure" that you can use as a reference to get started.

  • How to call a AS/400 Stored Procedure with a BigDecimal Value?

    Hi,
    Could you pls tell me how to call a stored procedure on the AS/400 which request an input value of packed decimal(10P 4) value.
    I have tried to convert it to a BigDecimal in Java and call the stored procedure as follows but it gave me a decimal point error on the AS/400.
    Could you pls show me where I'm wrong in the following code.
    Thanks
    Jan
    ========Java program to call AS/400 Stored procedure with setBigDecimal()===========
    //Assign the value to String
    string sBDVal = "30"
    //Convert the String value to BigDecimal
    BigDecimal bdAmt = new BigDecimal(sBDVal);
    //Call Stored Procedure with parameters,
    CallableStatement callSP = conn.prepareCall("{call OSCUPDLENS(?,?,?)}");
    // Set in parm values
    callSP.setString(1,"Value 1");
    callSP.setBigDecimal(2,bdAmt);
    callSP.setString(3,"");
    // Register out parameter
    callSP.registerOutParameter(3, Types.CHAR);
    // Execute call to stored procedure
    callSP.execute();
    // Retrieve out parameters
    sErrFlag = callSP.getString(3).trim();
    ========================Create Stored Procedure on AS/400===========================
    c/EXEC SQL
    c+ CREATE PROCEDURE TESTSPROC
    c+ (IN VAL1 CHAR ( 8),
    c+ IN BDAMT DEC (10, 4),
    C+ INOUT ERR CHAR ( 1))
    C+ LANGUAGE RPGLE NOT
    C+ DETERMINISTIC NO SQL EXTERNAL NAME TESTSPROC PARAMETER STYLE
    C+ GENERAL
    c/END-EXEC
    ======RPG program on AS/400 to accept the BigDecimal value to a Packed decimal======
    * Initialize the i/p parameter
    DP#VAL1 S 8A
    DP#AMT S 10P 4
    DP#ERR S 1A
    C*Input parameters
    C *ENTRY        PLIST                          
    C PARM P#VAL1
    C PARM P#AMT
    C PARM P#ERR

    Could you pls show me where I'm wrong in the following codeI don't know, you're doing a lot of things I have never tried. But "decimal data error" most likely means that the stored procedure is expecting packed data and the driver is giving it zoned data, or vice versa. You could confirm that by dumping your variables inside your RPG. If that is your problem, you could work around it by redefining your BDAMT parameter as integer or string and reformatting it in the RPG.

  • How to call 'C' programs from stored procedures?

    Hi
    Did anybody tried to call 'C' programs
    from oracle stored procedures?
    If anybody knows, can you please send
    how to configure the listener.ora and
    tnsnames.ora. If its possible post all the
    information from the begining with examples.
    thanks....

    Oracle JDBC did not support return a result set, if you are using Oracle 9i, you can use pipeline function, then using the TABLE() function the get the row.
    Good Luck.
    Welcome to http://www.anysql.net/en/

  • How to write a PL/SQL stored procedure in Oracle to call Webservice

    Can any one pelase send me a code on how to write a PL/SQL stored procedure in Oracle database to call the Webservice ?
    Thanks,
    Rajesh

    Were you able to solve this problem

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

  • How to use order by in stored procedure base block?

    How to use order by in stored procedure base block? I need to change order by dynamically

    Use SET_BLOCK_PROPERTY('BLOCK_NAME',ORDER_BY,'COLUMN_NAME1, COLUMN_NAME2');

  • Urgent : while calling a pl/sql stored procedure I am getting this error.

    Error iam getting like this:
    IDALException: ORA-06550: line 1, column 7: PLS-00201: identifier 'BORGPURCHASEDELEGATION_SEL' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored [ com.commerceone.ebs.infra.dal.idal.BasicSQL.oracleExceptionHandler(BasicSQL.java:863)]
    ADALException: Default Message[ com.commerceone.ebs.infra.dal.adal.Adal.execute(Adal.java:765)]
    ADALException: Default Message[ com.commerceone.ebs.infra.dal.adal.Adal.executeEbo(Adal.java:605)]
    BusinessFatalException: Default Message[ com.commerceone.ebs.wf.business.PurchaseBorgDelegation.getData(PurchaseBorgDelegation.java:483)]
    CommandException: Default Message[ com.commerceone.ebs.apps.profile.command.UserProfilePurchaseDelegationSaveCmd.execute(UserProfilePurchaseDelegationSaveCmd.java:124)]
    ActionException: Default Message[ com.commerceone.ebs.apps.base.action.ActionImpl.executeCommand(ActionImpl.java:107)]
    JobException: Default Message[ com.commerceone.ebs.apps.ui.WebJobImpl.executeAction(WebJobImpl.java:115)]
    JobException: Default Message[ com.commerceone.ebs.apps.ui.BuyerJob.executeAction(BuyerJob.java:750)]
    JobException: Default Message[ com.commerceone.ebs.apps.ui.BuyerJobWrapper.run(BuyerJobWrapper.java:64)]
    Thanks
    raji

    This has happened to me when I do not have the proper grants and/or synonyms set up. My JDev/J2EE connection user does not own the database objects so I need to grant access to the database object owner's database account and create synonyms available to the connection user's database account. If you are using the same database account in your JDev/J2EE connection object as you are using to run the stored proc in SQL*Plus, this is not your problem.
    I would test each part of the database involvement. For example, if you create a database view (with no additional grants or synonyms) in the user account that owns that stored procedure, can you create an ADF BC view object from that view in JDev and can you run the BC tester in JDev on it? If so, the connection user and object owner user accounts are probably the same.
    Another thing to try is, instead of executing the stored procedure, do something like this:
    stmt = "DECLARE v_dummy; BEGIN SELECT 1 INTO v_dummy FROM dual; END;";If that works, your calling mechanism for the stored procedure works.

  • XML/SQL Utility and stored procedure

    Hi there,
    Is it possible to use the XML/SQL Utility passing a stored
    procedure call, which returns a result set (ref cursor), instead
    of a SELECT statement? If yes, how should I call the
    OracleXMLQuery constructor?
    Thanks,
    Flavio.
    null

    Here's a sample. The next code drop of the XSQL Servlet will make the easy-to-do from within XSQL Pages:
    package package1;
    import org.w3c.dom.*;
    import java.sql.*;
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    public class Class1 extends Object {
    public static void main( String[] arg ) throws Exception {
    Connection conn = getConnection();
    CallableStatement ocs = conn.prepareCall("begin ? := App.HotItems('PAUL'); end;");
    ocs.registerOutParameter(1,OracleTypes.CURSOR);
    ocs.execute();
    ResultSet rs = ((OracleCallableStatement)ocs).getCursor(1);
    OracleXMLQuery oxq = new OracleXMLQuery(conn,rs);
    System.out.println(oxq.getXMLString());
    oxq.close();
    rs.close();
    ocs.close();
    conn.close();
    public static Connection getConnection() throws Exception {
    String username = "scott";
    String password = "tiger";
    String dburl = "jdbc:oracle:thin:@localhost:1521:xml";
    String driverClass = "oracle.jdbc.driver.OracleDriver";
    Driver d = (Driver)Class.forName(driverClass).newInstance();
    return DriverManager.getConnection(dburl,username,password);
    null

  • Call a pl/sql stored procedure from a report link

    Hello everyone:
    I have a report with a link in a column, which takes you to another page and passes values to that page, but also need the link, run a stored procedure before going to the other page.
    In the Forum I found cases similar to this, but none of the examples is clear to me how I do this. It seems that the target of the link should be URL, and also I have to call the stored procedure with a javascript function.
    My questions are:
    - Is this the best method to make what I need?
    - How should be the syntax of the link that takes me to another page and run the "stored procedure"
    - How and where I put the function "javascript" to run the "stored procedure"
    BDD: Oracle 11 g
    Apex version 4.1
    Best regards
    Gerard

    Hi,
    Change the link to call an apex.submit process. (javascript).
    Edit:
    I've set up a basic example.
    Region 1 (just so you can see the value getting set):
    select :P27_HIDDEN item_Value
    from dual
    Region 2:
    select rownum id, dbms_random.string('U', 12) sss
    from dual
    connect by level <= 20
    item attributes for ID:
    Target: URL
    URL: javascript:apex.submit({request:'NAVIGATE', set:{'P27_HIDDEN':#ID#}});
    (P27_HIDDEN is just a hidden item i created)
    http://apex.oracle.com/pls/apex/f?p=54920:27
    Edit2:
    In your case, then you can just have a page process based on conditions request = expression1, expression1: NAVIGATE..... then a page branch to go to the desired page, also with the same conditions
    Edit3:
    Im not sure what examples you are referring to , as you didn't supply any links; but you mention calling the stored procedure from javascript, so would likely involve some AJAX, but imo not necessary.

  • How to get sequence nextvalue in stored procedure?

    Hi, guys,
    I am trying to obtain the nextvalue of a sequence in a stored procedure, ultimately this value shall be returned to caller, but how do I assign or get the sequence value inside a stored procedure?
    Thanks
    jim

    foo NUMBER;
    SELECT mysequence.nextval INTO foo FROM DUAL;

  • Calling SSIS package in Stored Procedure...

    I have a SSIS package, and i want to call this (run this SSIS package) from Stored Procedure in Sql Server 2008.
    Can anyone  please explain to me as to how can i call SSIS package from SP?
    Thanks!
    Rahman

    Ted Kruger explains how this can be done in his blog post
    Run SSIS Package from Stored Procedure
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog

  • Calling EJB from Java Stored Procedures

    Hi,
    I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
    It is not working when I am trying to call EJB from it. It is giving compile-time error.
    If anybody has implemented the same please suggest how to go forward.
    thanks in advance,
    Shashank Agarwal

    I tried the same thing without any luck. I assume you are using OC4J for your EJB ...
    The compiling issue may be because you don't have the classes in your EJB client jar loaded into the database. Once those classes are loaded, you should loadjava without any problem.
    However, you won't be able to call the EJB server because the EJB client (your Java code in the DB) will need the OC4J environment (oc4j.jar). I have tried to load oc4j.jar into the DB as well, and that was a big mess and nothing worked. My DB is 8.1.7, maybe the new 9i have OC4J libs bundled?!?
    I looked around and only found 2 alternatives:
    1. Write a JSP page that acts like an EJB client, then use URLConnection in your DB java code to send params to the JSP for it to invlode the EJB
    2. Replace the JSP with RMI code, and use RMI instead of URLConnection in your DB code to invloke the EJB client.
    If you find any other solution, please share it here.
    Good luck!
    Hi,
    I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
    It is not working when I am trying to call EJB from it. It is giving compile-time error.
    If anybody has implemented the same please suggest how to go forward.
    thanks in advance,
    Shashank Agarwal

Maybe you are looking for

  • HT3131 Operating MBP in closed clamshell mode with external display

    I have a new MBP retina display.  Trying to operate in a closed clamshell mode.  I connect a USB keyboard and a wireless mouse.  My external display is a Dell 2007FP display screen connected via a VGA adapter.  Whenever I close the computer lid to op

  • Stationery

    Hi, I'd like to use stationery in my Mail, but I have problem to send mail with attachment (pdf, doc, etc.) using stationery. Does anyone knows how to fix it ?

  • 200" viewing limitation in Acrobat/Reader?

    Hi all, I have a diagram which is 220" inches wide. When I open this document in Acrobat/Reader 9.0, it appears blank on the screen. However, when I go to the "View -> Grid" menu option, I am able to see the drawing (even after I turn the "Grid" opti

  • Videos not showing in iphoto

    I was always able to watch videos in iphoto.  My iphone would also auto put the videos into iphoto monthly photo streme.  However now the past videos are missing in iphoto and the new ones are not being auto synced.  The photos are still auto syncing

  • How capture output of DBCC command in new table?

    The dbcc sqlperf(logspace) statement returns the "Log Size (MB)" column indicating the physical size on disk of the transaction log for a given database.   How can I capture that Log Size field into in my own table where I can manipulate it? TIA, edm