59.76 GET_SUPPORTING_OBJECT_SCRIPT Procedure
This procedure gets supporting object scripts and outputs to sys.dbms_output
buffer or download as a file.
Note:
The workspace ID must be set before the call.
Syntax
APEX_UTIL.GET_SUPPORTING_OBJECT_SCRIPT (
p_application_id IN NUMBER,
p_script_type IN VARCHAR2,
p_output_type IN VARCHAR2 DEFAULT c_output_as_dbms_output );
Parameters
Parameter | Description |
---|---|
p_application_id |
The application ID to get supporting objects from. |
p_script_type |
The supporting objects script type. Valid values are apex_util.c_install_script , apex_util.c_upgrade_script , apex_util.c_deinstall_script .
|
p_output_type |
The script can be output to sys.dbms_output buffer or download as a file. Valid values are apex_util.c_output_as_dbms_output , apex_util.c_output_as_file . The default is c_output_as_dbms_output .
|
Example 1
The following example shows how to set workspace ID for workspace FRED
, then get install script from application ID 100
and output to the command-line buffer.
set serveroutput on;
begin
apex_util.set_workspace( p_workspace => 'FRED');
apex_util.get_supporting_object_script(
p_application_id => 100,
p_script_type => apex_util.c_install_script );
end;
Example 2
The following example shows how to download upgrade script file from application ID 100
in the browser. Useful if the script needs to be downloaded using an application process.
begin
apex_util.set_workspace( p_workspace => 'FRED');
apex_util.get_supporting_object_script(
p_application_id => 100,
p_script_type => apex_util.c_upgrade_script,
p_output_type => apex_util.c_output_as_file );
end;
Parent topic: APEX_UTIL