Rem
Rem $Header: emcore/platformservices/msapp/source/oracle/sysman/emdrep/sql/msapp/24.1.0.0.0/monsvc/em_zdt_object_grants_synonyms_basic.sql rbali_oneoff_updated/1 2025/03/14 06:41:12 rbali Exp $
Rem
Rem em_zdt_object_grants_synonyms_basic.sql
Rem
Rem Copyright (c) 2023, 2025, Oracle and/or its affiliates.

Rem BEGIN EMRU_FILE_METADATA
Rem EMRU_SOURCE_FILE:emcore/platformservices/msapp/source/oracle/sysman/emdrep/sql/msapp/24.1.0.0.0/monsvc/em_zdt_object_grants_synonyms_basic.sql
Rem EMRU_UNIX_DELIVERABLES:
Rem emcore/platformservices/msapp/source/oracle/sysman/emdrep/sql/msapp/24.1.0.0.0/monsvc/em_zdt_object_grants_synonyms_basic.sql

Rem EMRU_FILE_POSTINSTALL:<!!! enter the view based location of the executable file. If there is NONE leave as-is !!!>
Rem EMRU_GENERIC_FLAG:NONE
Rem END EMRU_FILE_METADATA

Rem
Rem    NAME
Rem      em_zdt_object_grants_synonyms_basic.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: emcore/platformservices/msapp/source/oracle/sysman/emdrep/sql/msapp/24.1.0.0.0/monsvc/em_zdt_object_grants_synonyms_basic.sql
Rem    SQL_SHIPPED_FILE:
Rem    SQL_PHASE:
Rem    SQL_STARTUP_MODE: NORMAL
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    gbafna      01/15/25 - make synonyms noneditionable
Rem    zeding      06/26/24 - add MGMT_EMREPODIAG used by HealthMonitor for
Rem                           dump
Rem    sreddy      05/25/24 - EMCC-157708: handle current_user authid objects
Rem    zeding      03/08/24 - added credential related
Rem    spramani    12/12/23 - syntax
Rem    jbacon      11/21/23 - Created
Rem

--editioning views
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_versions TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_versions FOR SYSMAN.mgmt_versions;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.MGMT_OMS_PARAMETERS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_OMS_PARAMETERS FOR SYSMAN.MGMT_OMS_PARAMETERS;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_oms_property_def TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_oms_property_def FOR SYSMAN.mgmt_oms_property_def;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.EM_OMS_PROP_NAME_MAP TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_OMS_PROP_NAME_MAP FOR SYSMAN.EM_OMS_PROP_NAME_MAP;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.MGMT_REPOS_TIME_COEFFICIENT TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_REPOS_TIME_COEFFICIENT FOR SYSMAN.MGMT_REPOS_TIME_COEFFICIENT;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_oms_property TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_oms_property FOR SYSMAN.mgmt_oms_property;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.em_oms_property TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..em_oms_property FOR SYSMAN.em_oms_property;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.EM_FUNCTIONAL_AREAS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_FUNCTIONAL_AREAS FOR SYSMAN.EM_FUNCTIONAL_AREAS;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.MGMT_OMS_PROPERTY_ENUM TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_OMS_PROPERTY_ENUM FOR SYSMAN.MGMT_OMS_PROPERTY_ENUM;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.EM_OMS_PROP_CBK TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_OMS_PROP_CBK FOR SYSMAN.EM_OMS_PROP_CBK;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_failover_table TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_failover_table FOR SYSMAN.mgmt_failover_table;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_failover_callbacks TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_failover_callbacks FOR SYSMAN.mgmt_failover_callbacks;
 
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.mgmt_parameters TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_parameters FOR SYSMAN.mgmt_parameters;

GRANT ALL ON SYSMAN.EM_TARGETS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_TARGETS FOR SYSMAN.EM_TARGETS;
GRANT ALL ON SYSMAN.EM_TARGET_TYPES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_TARGET_TYPES FOR SYSMAN.EM_TARGET_TYPES;
GRANT ALL ON SYSMAN.EM_PROPERTY_ENUM TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_PROPERTY_ENUM FOR SYSMAN.EM_PROPERTY_ENUM;
GRANT ALL ON SYSMAN.MGMT_ALL_TARGET_PROPS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_ALL_TARGET_PROPS FOR SYSMAN.MGMT_ALL_TARGET_PROPS;
GRANT ALL ON SYSMAN.MGMT_TARGET_PROPERTIES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_TARGET_PROPERTIES FOR SYSMAN.MGMT_TARGET_PROPERTIES;
GRANT ALL ON SYSMAN.MGMT_ASSOC_INSTANCES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_ASSOC_INSTANCES FOR SYSMAN.MGMT_ASSOC_INSTANCES;
 
 
--AQs
GRANT SELECT, INSERT, UPDATE, DELETE ON SYSMAN.aq$mgmt_adminmsg_bus_s TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..aq$mgmt_adminmsg_bus_s FOR SYSMAN.aq$mgmt_adminmsg_bus_s;


-- EXEC DBMS_AQADM.GRANT_QUEUE_PRIVILEGE(privilege => 'ALL', queue_name => 'mgmt_adminmsg_bus', grantee => '&&EM_ZDT_USER', grant_option => FALSE);

CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..aq$mgmt_adminmsg_bus FOR SYSMAN.aq$mgmt_adminmsg_bus;
 
 
--types
GRANT EXECUTE ON SYSMAN.SMP_EMD_NVPAIR_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..SMP_EMD_NVPAIR_ARRAY FOR SYSMAN.SMP_EMD_NVPAIR_ARRAY;
 
GRANT EXECUTE ON SYSMAN_TYPES.MGMT_ADMINMSG_NAMEVAL_OBJ TO &&EM_ZDT_USER;
GRANT EXECUTE ON SYSMAN_TYPES.MGMT_ADMINMSG_NAMEVAL_ARRAY TO &&EM_ZDT_USER;
GRANT EXECUTE ON SYSMAN_TYPES.MGMT_ADMIN_MSG TO &&EM_ZDT_USER;
 
GRANT EXECUTE ON SYSMAN.MGMT_ADMIN_MSG_LIST TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_ADMIN_MSG_LIST FOR SYSMAN.MGMT_ADMIN_MSG_LIST;

GRANT ALL ON SYSMAN_TYPES.MGMT_INTEGER_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE NONEDITIONABLE SYNONYM &&EM_ZDT_USER..MGMT_INTEGER_ARRAY FOR SYSMAN_TYPES.MGMT_INTEGER_ARRAY;
GRANT ALL ON SYSMAN_TYPES.MGMT_MEDIUM_STRING_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE NONEDITIONABLE SYNONYM &&EM_ZDT_USER..MGMT_MEDIUM_STRING_ARRAY FOR SYSMAN_TYPES.MGMT_MEDIUM_STRING_ARRAY;
GRANT ALL ON SYSMAN_TYPES.MGMT_SHORT_STRING_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE NONEDITIONABLE SYNONYM &&EM_ZDT_USER..MGMT_SHORT_STRING_ARRAY FOR SYSMAN_TYPES.MGMT_SHORT_STRING_ARRAY;
GRANT ALL ON SYSMAN.SMP_EMD_STRING_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..SMP_EMD_STRING_ARRAY FOR SYSMAN.SMP_EMD_STRING_ARRAY;
GRANT ALL ON SYSMAN.SMP_EMD_INTEGER_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..SMP_EMD_INTEGER_ARRAY FOR SYSMAN.SMP_EMD_INTEGER_ARRAY;
GRANT ALL ON SYSMAN_TYPES.EM_ANY_GUID_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE NONEDITIONABLE SYNONYM &&EM_ZDT_USER..EM_ANY_GUID_ARRAY FOR SYSMAN_TYPES.EM_ANY_GUID_ARRAY;
GRANT ALL ON SYSMAN.MGMT_USER_GUID_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_USER_GUID_ARRAY FOR SYSMAN.MGMT_USER_GUID_ARRAY;
GRANT ALL ON SYSMAN.GUID_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..GUID_ARRAY FOR SYSMAN.GUID_ARRAY;
 
--plsql packages
GRANT EXECUTE ON SYSMAN.EM_OMS_PROPERTIES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_OMS_PROPERTIES FOR SYSMAN.EM_OMS_PROPERTIES;
 
GRANT EXECUTE ON SYSMAN.MGMT_TIME_SYNC TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_TIME_SYNC FOR SYSMAN.MGMT_TIME_SYNC;
 
GRANT EXECUTE ON SYSMAN.SETEMUSERCONTEXT TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..SETEMUSERCONTEXT FOR SYSMAN.SETEMUSERCONTEXT;
 
GRANT EXECUTE ON SYSMAN.mgmt_failover TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..mgmt_failover FOR SYSMAN.mgmt_failover;

GRANT EXECUTE ON SYSMAN.em_oms_monitor TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..em_oms_monitor FOR SYSMAN.em_oms_monitor;
 
GRANT EXECUTE ON SYSMAN.EM_ADMINMSG_BUS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_ADMINMSG_BUS FOR SYSMAN.EM_ADMINMSG_BUS;

GRANT ALL ON SYSMAN.EM_CREDENTIAL TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CREDENTIAL FOR SYSMAN.EM_CREDENTIAL;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL FOR SYSMAN.MGMT_CREDENTIAL;
GRANT ALL ON SYSMAN.MGMT_CREDENTIALS_UI TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIALS_UI FOR SYSMAN.MGMT_CREDENTIALS_UI;
GRANT ALL ON SYSMAN.MGMT_AUDIT_ADMIN TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_AUDIT_ADMIN FOR SYSMAN.MGMT_AUDIT_ADMIN;
GRANT ALL ON SYSMAN.MGMT_SERVICE TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_SERVICE FOR SYSMAN.MGMT_SERVICE;
GRANT ALL ON SYSMAN.MGMT_SEVERITY_UI TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_SEVERITY_UI FOR SYSMAN.MGMT_SEVERITY_UI;
GRANT ALL ON SYSMAN.EMD_MNTR TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EMD_MNTR FOR SYSMAN.EMD_MNTR;
GRANT ALL ON SYSMAN.EM_ASSOC TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_ASSOC FOR SYSMAN.EM_ASSOC;

-- credential related 
GRANT ALL ON SYSMAN.EM_NC_CREDS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_NC_CREDS FOR SYSMAN.EM_NC_CREDS;
GRANT ALL ON SYSMAN.EM_NC_CRED_COLUMNS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_NC_CRED_COLUMNS FOR SYSMAN.EM_NC_CRED_COLUMNS;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_TYPE_REF TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_TYPE_REF FOR SYSMAN.MGMT_CREDENTIAL_TYPE_REF;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_TYPES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_TYPES FOR SYSMAN.MGMT_CREDENTIAL_TYPES;
GRANT ALL ON SYSMAN.EM_CRED_CONSUMERS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CRED_CONSUMERS FOR SYSMAN.EM_CRED_CONSUMERS;
GRANT ALL ON SYSMAN.EM_CRED_ACTIVITIES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CRED_ACTIVITIES FOR SYSMAN.EM_CRED_ACTIVITIES;
GRANT ALL ON SYSMAN.EM_TARGET_CREDS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_TARGET_CREDS FOR SYSMAN.EM_TARGET_CREDS;
GRANT ALL ON SYSMAN.EM_NC_CRED_MAPPERS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_NC_CRED_MAPPERS FOR SYSMAN.EM_NC_CRED_MAPPERS;
GRANT ALL ON SYSMAN.EM_CRED_STRIPES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CRED_STRIPES FOR SYSMAN.EM_CRED_STRIPES;
GRANT ALL ON SYSMAN.EM_CRED_STRIPE_CONFIG TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CRED_STRIPE_CONFIG FOR SYSMAN.EM_CRED_STRIPE_CONFIG;
GRANT ALL ON SYSMAN.GC_CREDENTIAL_OBJ TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..GC_CREDENTIAL_OBJ FOR SYSMAN.GC_CREDENTIAL_OBJ;
GRANT ALL ON SYSMAN.GC_CRED_COLUMN_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..GC_CRED_COLUMN_ARRAY FOR SYSMAN.GC_CRED_COLUMN_ARRAY;
GRANT ALL ON SYSMAN.GC_STORAGE_CRED_MAPCOL_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..GC_STORAGE_CRED_MAPCOL_ARRAY FOR SYSMAN.GC_STORAGE_CRED_MAPCOL_ARRAY;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_TYPE_COL_VALS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_TYPE_COL_VALS FOR SYSMAN.MGMT_CREDENTIAL_TYPE_COL_VALS;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_SET_COL_VALS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_SET_COL_VALS FOR SYSMAN.MGMT_CREDENTIAL_SET_COL_VALS;
GRANT ALL ON SYSMAN.MGMT_TYPE_PROPERTIES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_TYPE_PROPERTIES FOR SYSMAN.MGMT_TYPE_PROPERTIES;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_SETS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_SETS FOR SYSMAN.MGMT_CREDENTIAL_SETS;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_SET_COLUMNS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_SET_COLUMNS FOR SYSMAN.MGMT_CREDENTIAL_SET_COLUMNS;
GRANT ALL ON SYSMAN.EM_CREDENTIAL_SET_TYPES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_CREDENTIAL_SET_TYPES FOR SYSMAN.EM_CREDENTIAL_SET_TYPES;
GRANT ALL ON SYSMAN.MGMT_CREDENTIAL_TYPE_COLUMNS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CREDENTIAL_TYPE_COLUMNS FOR SYSMAN.MGMT_CREDENTIAL_TYPE_COLUMNS;
GRANT ALL ON SYSMAN.MGMT_PARAMETERS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_PARAMETERS FOR SYSMAN.MGMT_PARAMETERS;
GRANT ALL ON SYSMAN.MGMT_BLOCKED_AGENTS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_BLOCKED_AGENTS FOR SYSMAN.MGMT_BLOCKED_AGENTS;
GRANT ALL ON SYSMAN.MGMT_JOB_SINGLE_TARGET_TYPES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_JOB_SINGLE_TARGET_TYPES FOR SYSMAN.MGMT_JOB_SINGLE_TARGET_TYPES;
GRANT ALL ON SYSMAN.MGMT_JOB_TYPE_INFO TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_JOB_TYPE_INFO FOR SYSMAN.MGMT_JOB_TYPE_INFO;
GRANT ALL ON SYSMAN.MGMT_JOB_TYPE_MAX_VERSIONS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_JOB_TYPE_MAX_VERSIONS FOR SYSMAN.MGMT_JOB_TYPE_MAX_VERSIONS;
GRANT ALL ON SYSMAN.MGMT_JOB_TYPE_DISPLAY_INFO TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_JOB_TYPE_DISPLAY_INFO FOR SYSMAN.MGMT_JOB_TYPE_DISPLAY_INFO;
GRANT ALL ON SYSMAN.MGMT_TARGETS_LOAD_TIMES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_TARGETS_LOAD_TIMES FOR SYSMAN.MGMT_TARGETS_LOAD_TIMES;
GRANT ALL ON SYSMAN.EM_METRIC_INTEGER_ARRAY_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_METRIC_INTEGER_ARRAY_ARRAY FOR SYSMAN.EM_METRIC_INTEGER_ARRAY_ARRAY;
GRANT ALL ON SYSMAN.EM_METRIC_KEY_ARRAY_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_METRIC_KEY_ARRAY_ARRAY FOR SYSMAN.EM_METRIC_KEY_ARRAY_ARRAY;
GRANT ALL ON SYSMAN.EM_METRIC_VALUE_ARRAY_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_METRIC_VALUE_ARRAY_ARRAY FOR SYSMAN.EM_METRIC_VALUE_ARRAY_ARRAY;
GRANT ALL ON SYSMAN.EM_METRIC_KEY_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_METRIC_KEY_ARRAY FOR SYSMAN.EM_METRIC_KEY_ARRAY;
GRANT ALL ON SYSMAN.EM_METRIC_STRING_ARRAY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_METRIC_STRING_ARRAY FOR SYSMAN.EM_METRIC_STRING_ARRAY;
GRANT ALL ON SYSMAN.MGMT_CURRENT_VIOLATION TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CURRENT_VIOLATION FOR SYSMAN.MGMT_CURRENT_VIOLATION;
GRANT ALL ON SYSMAN.MGMT_VIOLATIONS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_VIOLATIONS FOR SYSMAN.MGMT_VIOLATIONS;
GRANT ALL ON SYSMAN.MGMT_CURRENT_AVAILABILITY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CURRENT_AVAILABILITY FOR SYSMAN.MGMT_CURRENT_AVAILABILITY;
GRANT ALL ON SYSMAN.MGMT_AVAILABILITY_MARKER TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_AVAILABILITY_MARKER FOR SYSMAN.MGMT_AVAILABILITY_MARKER;
GRANT ALL ON SYSMAN.MGMT_METRICS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_METRICS FOR SYSMAN.MGMT_METRICS;
GRANT ALL ON SYSMAN.MGMT_CURRENT_METRICS TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_CURRENT_METRICS FOR SYSMAN.MGMT_CURRENT_METRICS;
GRANT ALL ON SYSMAN.MGMT_RCA_METRIC_TEST TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_RCA_METRIC_TEST FOR SYSMAN.MGMT_RCA_METRIC_TEST;
GRANT ALL ON SYSMAN.MGMT_TARGETS_LOAD_TIMES TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_TARGETS_LOAD_TIMES FOR SYSMAN.MGMT_TARGETS_LOAD_TIMES;
GRANT ALL ON SYSMAN.EM_TOKEN_PRODUCER TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_TOKEN_PRODUCER FOR SYSMAN.EM_TOKEN_PRODUCER;
GRANT ALL ON SYSMAN.EM_TOKEN_PRODUCER_KEY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_TOKEN_PRODUCER_KEY FOR SYSMAN.EM_TOKEN_PRODUCER_KEY;

-- EMCC-157708: Begin
--   Add grant/synonym over zdt dependencies that are executed with current_user authid
GRANT ALL ON SYSMAN.EMD_MAINT_UTIL TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EMD_MAINT_UTIL FOR SYSMAN.EMD_MAINT_UTIL;
GRANT ALL ON SYSMAN.EM_EBR_UTIL TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_EBR_UTIL FOR SYSMAN.EM_EBR_UTIL;
GRANT ALL ON SYSMAN.EM_COMPLIANCE_CUR_USER TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_COMPLIANCE_CUR_USER FOR SYSMAN.EM_COMPLIANCE_CUR_USER;
-- EMCC-157708: End

GRANT ALL ON SYSMAN.MGMT_EMREPODIAG TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..MGMT_EMREPODIAG FOR SYSMAN.MGMT_EMREPODIAG;

-- PROXY related used by TMClient
GRANT ALL ON SYSMAN.EM_AGENT_PROXY_MAP TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_AGENT_PROXY_MAP FOR SYSMAN.EM_AGENT_PROXY_MAP;
GRANT ALL ON SYSMAN.EM_PROXY TO &&EM_ZDT_USER;
CREATE OR REPLACE SYNONYM &&EM_ZDT_USER..EM_PROXY FOR SYSMAN.EM_PROXY;


