环境:
OS:Centos 7
DB:11.2.0.4
1.创建普通用户
开启了vault后,创建用户只能通过dbvmgr账号创建
SQL> connect dbvmgr/Oracle#123
Connected.
SQL> create user jt identified by oracle;
User created.
SQL> grant connect,resource to jt;
grant connect,resource to jt
*
ERROR at line 1:
ORA-47410: Realm violation for GRANT on UNLIMITED TABLESPACE
发现授权报错,因为这里不能使用dbvmgr收取,需要使用sys账号授权.
好像不能使用connect授权,换成create session就可以了
SQL> grant resource to JT;
SQL> grant create session to JT;
2.新用户登录创建表并写入数据
[oracle@11g ~]$ sqlplus /nolog
SQL> connect jt/oracle
Connected.
SQL> create table tb_aa(id number,name varchar2(32));
Table created.
SQL> insert into tb_aa values(1,'name1');
insert into tb_aa values(2,'name2');
1 row created.
SQL>
1 row created.
SQL> insert into tb_aa values(3,'name3');
1 row created.
SQL> insert into tb_aa values(4,'name4');
1 row created.
SQL> insert into tb_aa values(5,'name5');
1 row created.
SQL> commit;
Commit complete.
3.这个时候我们使用sys登录查看表数据
SQL> connect / as sysdba
Connected.
SQL> select * from jt.tb_aa;
ID NAME
---------- --------------------------------
1 name1
2 name2
3 name3
4 name4
5 name5
这个时候我们是可以查看得到jt账号下的表数据的,下面我们创建vault领域,不让sys账号查看
4.浏览器登录dvb
https://192.168.56.144:1158/dva/login.jsp
输入账号密码:dbvowner/Oracle#123
如下:
这个时候sys就无法访问jt用户下的表数据了
SQL> select * from jt.tb_aa;
select * from jt.tb_aa
*
ERROR at line 1:
ORA-01031: insufficient privileges
SQL> show user;
USER is "SYS"
SQL>