WHENEVER SQLERROR EXIT FAILURE
SET SERVEROUTPUT ON
SET TIMING ON
SET ECHO ON
SET HEADING OFF
SET FEEDBACK ON
SET VERIFY OFF

-- Simple filename without PDB reference
var filename VARCHAR2(100)
BEGIN
	SELECT 'INSTALL_MARS_1011_' || TO_CHAR(SYSDATE,'YYYYMMDD_HH24MISS')||'.log' INTO :filename from DUAL;
END;
/
column filename new_value _filename
select :filename filename from dual;
spool &_filename 

prompt ##### started at time #####
select systimestamp from dual;
prompt ##### database name #####
SELECT SYS_CONTEXT('USERENV', 'DB_NAME') AS DATABASE_NAME FROM DUAL;

prompt ========================================
prompt MARS-1011: Installing WORKFLOW_MANAGER v1.7.1
prompt Description: Add SERVICE_NAME='ODS' to INIT_TASK function
prompt ========================================

@@01_MARS_1011_install_CT_MRDS_WORKFLOW_MANAGER_SPEC.sql
@@02_MARS_1011_install_CT_MRDS_WORKFLOW_MANAGER_BODY.sql
@@03_MARS_1011_verify_CT_MRDS_WORKFLOW_MANAGER.sql
@@04_MARS_1011_track_CT_MRDS_WORKFLOW_MANAGER_version.sql

SET ECHO OFF

prompt ##### completed at time #####
select systimestamp from dual;

SPOOL OFF
EXIT