--MARS-770

set verify off
SET serveroutput ON
--SET TIMING ON
whenever sqlerror exit sql.sqlcode rollback;

column owner format a15
column object_name format a30
column spoolname new_value spoolname 

select 'install_package_MarsGeneralRelease_MARS770_tst_' || name || '_' ||to_char(sysdate,'YYYYMMDD_HH24MISS')||'.log' spoolname from v$pdbs;
spool '&spoolname'


prompt ##### started at time #####
select systimestamp from dual;
prompt ##### database name #####
select name pdb_name from v$pdbs;

--set echo on
--=============================================================================================================================
-- start install --MARS-770 payload tst specific part
--=============================================================================================================================

INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('default', 'EnvironmentID', 'tst', '');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'Region', 'eu-frankfurt-1', 'OCI region for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'NameSpace', 'frcnomajoc7v', 'OCI namespace for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'InboxBucketName', 'mrds_inbox_tst', 'Name of the inbox bucket for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'DataBucketName', 'mrds_data_tst', 'Name of the data bucket for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'HistoryBucketName', 'mrds_history_tst', 'Name of the history bucket for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'CredentialName', 'OCI$RESOURCE_PRINCIPAL', 'Name of the credential for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'LoggingEnabled', 'ON', 'Enable logging for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'MinLogLevel', 'DEBUG', 'Minimum logging level for test environment');
INSERT INTO CT_MRDS.A_FILE_MANAGER_CONFIG (ENVIRONMENT_ID, CONFIG_VARIABLE, CONFIG_VARIABLE_VALUE, CONFIG_VARIABLE_COMMENT) VALUES ('tst', 'DefaultDateFormat', 'DD/MM/YYYY HH24:MI:SS', 'Default date format for test environment');
COMMIT;