--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_acc_' || 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 acc specific part
--=============================================================================================================================

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