1.创建只读角色 CREATE ROLE readaccess; 2.授予对现有表的访问权限 GRANT USAGE ON SCHEMA public TO readaccess; GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess; 3.授予后面新增表的访问权限 ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess; 4.创建用…
创建只读用户:grant connect to user; grant create session to user; 1.创建角色 CREATE ROLE SELECT_ROLE 2.给角色分配权限 grant SELECT ANY DICTIONARY to SELECT_ROLE; grant SELECT ANY TABLE to SELECT_ROLE; grant SELECT ANY TRANSACTION to SELECT_ROLE; grant SELECT ANY SEQU…