--MARS-757

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_MarsDEVOreplicator_MARS757_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-757 create user
--=============================================================================================================================

BEGIN
  DBMS_CLOUD.CREATE_CREDENTIAL(
    credential_name => 'DEVO_CRED_ARN',
    params => JSON_OBJECT(
        'aws_role_arn' value 'arn:aws:iam::224181934276:role/ECB_AWS_EXTERNAL_A2A_MRDS_TST',
        'external_id_type' value 'database_ocid')
  );
END;