End_Upgrade
Purpose
This script is run for ending an application upgrade for patch-set.
Syntax
/* Pre-requisites: Step 3 on Application associated pdb creation is completed */
SET VERIFY ON
SET HEAD ON
SET FEEDBACK 1
SET ARRAY 1
SET LINESIZE 10000
SET PAGESIZE 50000
SET LONG 10000
SET ECHO ON
SET TRIMSPOOL ON
SET COLSEP ';'
SET SERVEROUT OFF
clear screen
SPOOL ON
SET SQLBLANKLINES ON
SET SERVEROUTPUT ON
SET ERRORLOGGING ON
SET ECHO ON
prompt Welcome to Application end Upgrade
SPOOL "&SPOOL_PATH"
DECLARE
l_app_name VARCHAR2(128);
l_sql VARCHAR2(256);
BEGIN
BEGIN
SELECT app_name
INTO l_app_name
FROM dba_applications
WHERE app_implicit <> 'Y'
AND app_name = (SELECT param_val FROM cstb_param WHERE param_name = 'MULTI_TENANT_APP_NAME');
EXCEPTION
WHEN NO_DATA_FOUND THEN
dbms_output.put_line('Error1 Nodata--->'||SQLERRM);
WHEN OTHERS THEN
dbms_output.put_line('Error1 others--->'||SQLERRM);
END;
l_sql := 'ALTER PLUGGABLE DATABASE APPLICATION ' || l_app_name||' END UPGRADE ';
dbms_output.put_line('l_sql: ' || l_sql);
EXECUTE IMMEDIATE l_sql;
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE('Error --->'||SQLERRM);
END;
/
SET ERRORLOGGING OFF
SPOOL OFF