26.3 INSTALL Function Signature 1

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_id              IN NUMBER,
    p_authentication_type IN apex_authentication.t_authentication_type DEFAULT NULL,
    p_schema              IN VARCHAR2 default null ) RETURN NUMBER;

Parameters

Table 26-3 INSTALL Function Signature 1 Parameters

Parameter Description

p_app_id

The packaged application ID.

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 ID 7060 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_id              => 7060,
                            p_authentication_type => APEX_AUTHENTICATION.C_TYPE_APEX_ACCOUNTS,
                            p_schema              => 'SCOTT' );
end;