Calling a package from HTMLDB

Can someone help me? I'm very new to HTMLDB and basically to Oracle. I need to create a simple package (which I know how to do) and call it from HTMLDB (which I DON'T know how to do). Essentially, I'd like to have a user select an item from a drop-down, and pass the value of what's been selected to a function in a package. The function would hopefully be able to return some values to create a tree, then.
I'd really REALLY appreciate any help and especially simple examples...
Thanks!
Steve

Steve,
See: Calling a stored plsql procedure
or: execute stored procedure in html_db
Sergio

Similar Messages

  • How to call a package from the Report in Oracle Application Express

    How to call a package from the Report in Oracle Application Express

    Hello,
    What do you mean? Something like SELECT mypackage.function( par1, par2) from dual?
    Or do you want to execute a procedure when something happens on the page, like clicking a button?
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Calling DTS package from Stored Procedure

    I am getting error calling DTS package from CF.
    So i want to call DTS package from SQL Server Stored
    Procedure.
    DTS package create text file. So no need of input or output
    parameter.
    What is the syntax?.
    thanks for ur help.

    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 SSIS package from DTEXEC in SQL Server 2012

    Hello,
    I have a package called test.dtsx developed in SSIS vs 2010 (project deployment model). It has two project parameters one is  db connection (string) and one is classnumber(string). This package has been deployed as file system and in SSISDB. I want to
    assign the following values to the project parameters
    $Project::DBConnection - Data Source=localhost;User ID=User;Password=password;Initial Catalog=testdb;Provider=SQLNCLI11.1;Persist Security Info=True;Auto Translate=False;
    $Project::Classnumber - 10
    What is the syntax to call this package from dtexec passing values for parameters
    1. as a file system deployment
    2. as a package in SSIS db(catalog)
    thanks

    http://msdn.microsoft.com/en-ca/library/hh231187.aspx has an example
    Dtexec /isserver “SSISDB\MyFolder\MyProject\test.dtsx” /server “.” /parameter $Project::DBConnection;thevalue /parameter anotherparam(int32);12
    Arthur My Blog

  • Is it possible to call a package from DB in ADF?

    Hi,
    I am using Jdev 10.1.3.3 with ADF. I want to call a package from
    my DB from jdev. Is it possible with ADF? Please let me know.
    Thanks,
    Venki

    Hi,
    This is my code to call the package.
    String amDef = "model.service.DAFService";
    String config = "DAFServiceLocal";
    ApplicationModule am =
    Configuration.createRootApplicationModule(amDef, config);
         CallableStatement cstmt = null;
         String stmt = "begin call CP_DAF_PKG.DAF_PROCESS(?,?,?,?,?,?,?,?,?); end; ";
         cstmt = getDBTransaction().createCallableStatement(stmt,0);
    But in this case, I am getting
    oracle.jbo.InvalidOwnerException: JBO-25301: Application module is not a root app module but has no parent
    I understand the reason for this error. I need to call the
    createcallableStatement from the application module that I have above.
    Something like am. (call the package)
    But not sure about any method which does that..
    Please let me know if you know the way to solve it.
    Thanks,
    Venki

  • How to call a package from within a package

    How would I call a package from within a package and pass variables to it. For instance I am trying to pass variables to a log package from another package when a user inserts or updates a table

    First, technical questions need to be addressed to one of the technical forums. Products | Database | SQL & PL/SQL would be appropriate for this question. Please direct any followup to that forum.
    Second, you cannot call a package; a package is a collection of stored procedures and functions. You can call a packaged function or procedure from another package simply by specifying the package name and the procedure
    CREATE OR REPLACE PACKAGE pkgA
    AS
      PROCEDURE callPkgB;
    END;
    CREATE OR REPLACE PACKAGE BODY pkgA
    AS
      CREATE PROCEDURE callPkgB
      AS
      BEGIN
        pkgB.someProcedure( 'Some argument' );
      END callPkgB;
    END pkgA;In general, any packaged procedure can be called by specifying the schema, package, and procedure name, i.e.
    EXEC mySchema.myPackage.myProcedurethough the schema and package can be omitted if the calling procedure is in the same schema or package.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to call a package from a different instance?

    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    Regards
    Terry

    Terry Chen wrote:
    Dear all:
    how to call a package from a different instance?
    for example:
    package A belongs to instance A1
    package B belongs to instance B1
    Now I want to call the package B in instance A1, how can I do ? my environment is oracle 10g
    First you have to create create dblink in A1 database as below
    CREATE DATABASE LINK INSA1
       CONNECT TO USER_NAME IDENTIFIED BY <pass>
       USING 'B!' Then you can execute exec pack_b@INSA1;

  • While calling plsql  package from Pro*c getting  ORA-1426 error

    Hi Friends
    I am calling a package from Pro*c and getting numberic overflow error ORA-1426 but when i introduce a debug message such as printf or calling standard oracle utility to write in a log file no error comes. So how just introduction of debug messages is resolving the error.Can any one throw some light on it, whether it is some kind of synchronization issue or something else
    Regards
    Abhijeet

    Pretty hard to guess here since you're not providing any sample code.
    However:
    "Internally, PL/SQL assigns the values of the bounds to temporary PLS_INTEGER variables, and, if necessary, rounds the values to the nearest integer. The magnitude range of a PLS_INTEGER is -2147483648 to 2147483647, represented in 32 bits. If a bound evaluates to a number outside that range, you get a numeric overflow error when PL/SQL attempts the assignment. "
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/loop_statement.htm#sthref2852

  • Getting error code 1 when calling SSIS package from a stored procedure (SQL Server 2008 R2)

    Hello,
    I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
    0 The package executed successfully.
    1 The package failed.
    3 The package was canceled by the user.
    4 The utility was unable to locate the requested package. The package could not be found.
    5 The utility was unable to load the requested package. The package could not be loaded.
    6 The utility encountered an internal error of syntactic or semantic errors in the command line.
    Details:
    I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
    it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
    Here I receives error code 1.
    Can anyone help me to resolve this issue please?
    Thanks in advance!
    CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
     @strPackage nvarchar(100)
    AS
    BEGIN
     -- SET NOCOUNT ON added to prevent extra result sets from
     -- interfering with SELECT statements.
     SET NOCOUNT ON;
     DECLARE @cmd VARCHAR(8000)
     DECLARE @Result int
     DECLARE @Environment VARCHAR(100)
        SELECT @Environment = Waarde
     FROM  Sys_Settings
     WHERE Optie = 'Omgeving'
     --print @Environment
     SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
     SET @cmd = 'dtexec /SQL ' + @strPackage +  ' /SERVER "w2250\NGSQLSERVER"  /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
     --print @cmd
     EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
     --print @Result
    END

    It has something to do with the security.
    E.g. cmdshell is not enabled or the caller has not rights over the package.
    There could be a syntax error, too.
    I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
    sp_start_job <job name>
    Arthur
    MyBlog
    Twitter

  • Calling SSIS package from C# Windows Service Fails

    Hi All.
    I've got an SSIS package that reads from an Excel file and populates a database. The Excel file location gets passed in to the package as a variable. Also the Protection Level of the package is set to EncryptSensitiveWithPassword.
    This all works fine when I run the package from Visual Studio or using DTEXEC. When I try to run it from a C# Windows Service though I get the following exception:
    SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80004005.
    An OLE DB record is available.  Source: "Microsoft Office Access Database Engine"  Hresult: 0x80004005  Description: "The Microsoft Office Access database engine cannot open or write to the file ''. It is already opened exclusively
    by another user, or you need permission to view and write its data.".
    SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.  The AcquireConnection method call to the connection manager "Input Excel Connection" failed with error code 0xC0202009.  There may be error messages posted before this
    with more information on why the AcquireConnection method call failed.
    Dedupe Worksheet failed validation and returned error code 0xC020801C.
    One or more component failed validation.
    There were errors during task validation.
    The windows service runs with LocalSystem account and the following code is used to call the SSIS Package:
                    Application app = new Application();
                    Package package = null;
                    app.PackagePassword = "*******";
                    //Load the SSIS Package which will be executed
                    package = app.LoadPackage(@"C:\Projects\DataDedupeMatch\DataDedupeMatch\DataDedupe.dtsx", null);
                    //Pass the varibles into SSIS Package
                    package.Variables["User::FilePath"].Value = e.FullPath.Replace(@"\\", @"\");
                    Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();
    I would really appreciate if someone could help me out with this.
    Thanks in advance,
    Deon

    Instead of hosting the SSIS runtime in your service, you should use a separate host process for your SSIS package.  You're using the Office drivers, which aren't designed or supported for running in long-lived unattended processes like a Windows Service. 
    You can use your own SSIS hosting code, or just use dtexec.exe to host your package.  In either case you would start the child process with
    Process.Start. 
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Calling SQL packages from java

    How do I call ORACLE sql packages from java?
    We are still using Oracle 7.3. Any sample code
    would be appreciated.

    utility.processPLSQL( connRisk,
    " Begin "
    + " hvar_sum.p_load_var_summary_data("
    + " '" + dfCall.format( priceDate ) + "', "
    + " '" + promptMonth + "',"
    + daysBack + ","
    + aliasType + ","
    + "'" + connRisk.owner + "'"
    + "); "
    + " end ; ",
    "Load VaR Summary Data",
    utility.noLogMsg ) ;
    public boolean processPLSQL(
    MyConnection conn,
    String sql,
    String dataType,
    boolean createLogMessage ) {
    double startTime = conn.log.getStartTime() ;
    try {
    CallableStatement cs = conn.theConnection.prepareCall(sql);
    cs.execute() ;
    cs.close() ;
    conn.theConnection.commit();
    if ( createLogMessage ) conn.log.logTiming( dataType, startTime ) ;
    } catch ( SQLException e ) {
    conn.log.logError( "Utility.processPLSQL; SQLException Error: " + e ) ;
    System.out.println(new java.util.Date().toString() + "; User: " + conn.user
    + "; SQL: " + sql );
    return false ;
    return true ;
    }

  • Calling a package from shellscript

    Hello,
    I am trying to run open interface for GL. I am a newbie to oracle apps.
    The flow and steps i am following are
    1. Load some sample data into staging table using sqlldr.
    2.Validate and insert the data into gl_interface using pl/sql package.
    3. Write a shell script to call the sqlldr and pl/sql package.
    4.Register the script as concurrent program in apps.
    When i run this request ,the log file shows no errors. But the data is not loaded in gl_interface table.
    I tried with a simple pl/sql procedure (not a package) it ran fine. The data was loaded.
    ex:
    sqlplus user/pwd<<EOF
    exec sql_proc();
    EOF
    But now i have two different procedures, so created
    a package. How do i call that package in the shell script. I also have IN parameters for the second procedure.
    Should i mention them here (in the shell script).
    i tried
    sqlplus user/pwd<<EOF
    exec package.sql_proc();
    exec package.sql_proc2();
    EOF
    Any help would be really appreciated.
    Thank you,
    Srikanth

    You can define the variables in your shell script to pass to the package/procedure for e.g. if you wanted to execute fnd_client_info.setup_client_info, your shell script would look something like this
    p_usr_id=$1
    p_app_id=$2
    p_resp_id=$3
    ( sqlplus -s /nolog << end_of_sql
    connect $p_sqlpwd
    set head off
    set feed off
    set verify off
    exec fnd_client_info.setup_client_info($p_app_id, $p_resp_id, $p_usr_id, 0);
    exit
    end_of_sql
    )

  • Call shell scripts from htmldb

    Hi,
    I've a requirement to check for the existance of a file in Linux server using htmldb. The problem is html db is installed on a different machine. Is there any way I could execute shell scripts in html db that connects to the linux server and checks for the file existance?

    Andy,
    The general answer is: whatever you can do from SQL or PL/SQL can be run from an HTML DB process. So to output to the server you might use utl_file. There are several ways to run external commands, you might start by searching for 'shell' on askTom.
    Scott

  • SpRunDTS for calling DTS package from sp

    CREATE PROCEDURE spRunDTS
    @PKGName varchar(500),
    @PckPwd varchar(100),
    @OMessage varchar(2000) OUTPUT
    As
    --Declaring the variables for the DTS Package 
    Declare @hr int,
    @oPKG int ,
    @Server_Name varchar(200),
    @Cmd varchar(1000),
    @Server_Uname varchar(100),
    @Server_Pwd varchar(100),
    @PackagePwd varchar(100),
    @PackageName varchar(500)
    --- Setting the credentials
    set @Server_Uname ='cpvar_dev'
    set @Server_Pwd ='Stamford18'
    set @PackagePwd = ltrim(rtrim(@PckPwd))
    set @OMessage='Success'
    --- Creating the DTS Package object
    EXEC @hr = sp_OACreate 'DTS.Package', @oPKG OUT
    IF @hr <> 0
    BEGIN
    set @OMessage = '*** Create Package object failed'
    EXEC @hr = sp_OADestroy @oPKG
    RETURN
    END
    select @Server_Name = ltrim(rtrim(@@servername))
    set @PackageName=ltrim(rtrim(@PKGName))
    SET @Cmd = 'LoadFromSQLServer("'+@Server_Name +'", "'+@Server_Uname+'", "'+@Server_Pwd+'", 256, "' + @PackagePwd +'", , , "'+@PackageName+'")'
    print @Cmd
    EXEC @hr = sp_OAMethod @oPKG, @Cmd, NULL
    IF @hr <> 0
    BEGIN
    set @OMessage = '*** Load Package failed ' + @PKGName
    EXEC @hr = sp_OADestroy @oPKG
    RETURN
    END
    --Executing the Package:          
    EXEC @hr = sp_OAMethod @oPKG, 'Execute'
    IF @hr <> 0
    BEGIN
    set @OMessage = '*** Execute failed'
    EXEC @hr = sp_OADestroy @oPKG
    RETURN
    END
    --Cleaning up:          
    EXEC @hr = sp_OADestroy @oPKG
    IF @hr <> 0
    BEGIN
    set @OMessage = '*** Destroy Package failed'
    RETURN
    END

    Thanks for sharing.

  • Getting error when calling package from master

    Hi ,
    I am facing one issue ,
    when i am running package indivisually its running fine , but when I am calling same package from Master package it gets failded.
    below is the error massage which I am getting.
    "Exception has been thrown by the target of an invocation"
    regards,
    Vipin jha
    Thankx & regards, Vipin jha MCP

    Hi Vipin,
    In addition, here is an article regarding how to execute a package from another package for your reference. Please see:
    http://svangasql.wordpress.com/2012/05/01/parent-child-package-ssis-2012-execute-package-task/
    Please help to elaborate your issue with more detail so that we can help you to solve this issue in a effecive manner.  
    Elvis Long
    TechNet Community Support

Maybe you are looking for

  • Worst experience ever...I can't even.

    First, let me say that I am writing this review on New Year's Eve, at 8AM. This isn't what I WANT to be doing right now, but I am so upset and frustrated that this is the only way I can think of to vent and to warn others against this experience. I d

  • Office 2013 Upload Center do not display in notification area

    Hello, I am wanting to hide the Upload centre system task tray icon for Office 2013 on all of our pc's in my organisation, I have found many articles on disabling the service from starting, but this is not my intention. Instead I wish to use either a

  • OS Patching and other routine maintenance window

    Apologize for length, just trying to get an idea of how other clients handle routine downtime such as DB patching, OS patching, Tidal Patching etc. as well as Disaster Recovery planning. Currently we are on a Window master in 5.3 but are currently in

  • Kernel _In_Page error when installing database instance on IDES 4.7e

    Dear expert, I was installing the database instance of the IDES 4.7e database instance and after 3.5 hour I received the blue screen of death with kernel_in_page_error memory dump. The system was installed on one single physical sata drive with diffe

  • ABAP and MySQL

    Guys, Is is possible to retrieve data from external database like MySQL? I don't know how to make the connection. Is there an step-by-step article on how to do this? Thanks. Adrian