简体   繁体   中英

User not able to view table entries oracle 12c

I am a newbie to the database and trying to learn roles and privilege in oracle12c. I am logged in as user dba643 and have following codes.

create table test
(
  obj1 Number,
  obj2 Varchar2(3)
);


Insert into test values('1','A');
Insert into test values('2','B');

create user rtest identified by rtest;

grant connect,resource to rtest;

grant select,insert,update,delete on test to rtest;

After logging in as rtest user and issuing the following select statement:

select * from dba643.test;

The user rtest is able to see the two table entries. However, if the user dba643 inserts a new record into the test table, that newly inserted record cannot be viewed by the user rtest . Similarly, the user rtest is able to insert a record into test table, however, the inserted record cannot be viewed by the dba643 user. Is there something basic I am missing in this?

Use "commit".

I am not seeing any commit on your code. Without using commit you can see the entries only on dba643 user. After committing records will be available for all user.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM