INSTALL Function Signature 2

This function installs specified packaged application and returns installed application ID. If any of the following are true, the function raises an error:
  • Invalid packaged application ID passed.

  • Invalid authentication type passed. For list of available authentication types, query APEX_PKG_APP_AUTHENTICATIONS view.

Syntax

APEX_PKG_APP_INSTALL.INSTALL( 
    p_app_name            in varchar2,
    p_authentication_type in wwv_flow_authentication_api.t_authentication_type default null,
    p_schema              in varchar2 default null ) return number;

Parameters

Table 25-4 INSTALL Function Signature 2 Parameters

Parameter Description

p_app_name

The case insensitive packaged application name.

p_authentication_type

The type of authentication to use. If NULL, Oracle APEX builder authentication is used. The value must be apex_authentication.t_authentication_type.

p_schema

The database schema the application parses SQL statements as. If NULL, it defaults to the workspace schema. If there are more than one workspace schema, it defaults to the first schema provisioned for the workspace.

Example

The following example shows how to use INSTALL function to install packaged application named 'Bug Tracking' in DEMO workspace with 'Application Express Account' authentication using ‘SCOTT’ schema.

declare
    l_installed_app_id   number;
begin
    APEX_UTIL.SET_WORKSPACE( 'DEMO' );
    l_installed_app_id := APEX_PKG_APP_INSTALL.INSTALL( 
                            p_app_name            => 'Bug Tracking',
                            p_authentication_type => APEX_AUTHENTICATION.C_TYPE_APEX_ACCOUNTS,
                            p_schema              => 'SCOTT' );
end;