--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_prd_' || 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 prd specific part
--=============================================================================================================================

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