同义词/dblink/with admin option

rptdb数据库的P1RPTDW schema访问mesdb adg上面的某个schem的表,通过创建db link实现。
但是P1RPTDW schem

RPTDB: P1RPTDW
CREATE SYNONYM OMLOT_HOLD_CACHE FOR MES_PROD.OMLOT_HOLD@MES;

CREATE PUBLIC SYNONYM OHAMONJOB_LOT_WAFER_CACHE FOR MES_PROD.OHAMONJOB_LOT_WAFER@MES;--公有同义词

CREATE SYNONYM OHAMONJOB_LOT_WAFER_CACHE FOR MES_PROD.OHAMONJOB_LOT_WAFER@MES;--私有同义词

DROP PUBLIC SYNONYM OHAMONJOB_LOT_WAFER_CACHE; --删除公有同义词
DROP SYNONYM OHAMONJOB_LOT_WAFER_CACHE; --删除私有同义词


-- Create the user
create user P1RPTDW
default tablespace TBS DW
temporary tablespace TEMP
Profile DEFAULT;

Profile DEFAULT;
--Grant/Revoke role privileges
grant aq_administrator role to P1RPTDW;
grant aq_user_role to P1RPTDW;
grantconnect to P1RPTDW;
grantexecute_catalog_role to P1RPTDW;
grant resource to P1RPTDW;
grantselect_catalog_role to P1RPTDW;

-- Grant/Revoke system privileges
grant select any table to P1RPTDW with admin option;
grant grant any role to P1RPTDW with admin option;
grant grant any object privilege to P1RPTDW with admin option;
grant execute any procedure to P1RPTDW with admin option;
grant drop any table to P1RPTDW with admin option;
grant drop any synonym to P1RPTDW with admin option;
grant drop any procedure to P1RPTDW with admin option;
grant drop any index to P1RPTDW with admin option;
grant debug connect session to P1RPTDW with admin option;
grant debug any procedure to P1RPTDW with admin option;
grant create database link to P1RPTDW with admin option;
grant create any view to P1RPTDW with admin option;
grant create any trigger to P1RPTDW with admin option;
grant create any synonym to P1RPTDW with admin option;
grant create any sequence to P1RPTDW with admin option;
grant create any procedure to P1RPTDW with admin option;
grant create any job to P1RPTDW with admin option;
grant create any index to P1RPTDW with admin option;
grant alter any table to P1RPTDW with admin option;

posted @ 2026-01-26 10:24  ocmji  阅读(0)  评论(0)    收藏  举报