oracle 只读用户创建
1.创建用户
1.1 创建表空间
create tablespace NEWSPACE logging datafile 文件路径 size 200m autoextend on uniform size 50m;
1.2 创建用户指定表空间
create user newuser identified by password default tablespace NEWSPACE temporary tablespace temp;
1.3 为用户user1授权:
grant connect to newuser;
2.生成赋权语句
select 'grant select on '||owner||'.'||object_name||' to newuser;'
from dba_objects
where owner = 'OWNER'
and object_type='TABLE';
3.执行已生成的赋权语句