DML over DBLINK - ORA-01031

Hi All,
here i want to share a simple problem which i have faced today. I was asked to solve an insert into over dblink issue where the user got ORA-01031: insufficient privilege inspite of having required privilege. So I ran a test case and found the below result

linkB2A: A database link is from database A to B
as user USER_A of Database A:
create table USER_A.tbl_shaon (id number);
insert into USER_A.tbl_shaon values(1);
insert into USER_A.tbl_shaon values(2);
commit;
select * from USER_A.tbl_shaon;

ID
1
2
grant insert on USER_A.tbl_shaon to USER_B;

------------------------------------------------------------
as user USER_B of Database B:

insert into USER_A.tbl_shaon@linkA2B values (6);

ORA-01031: insufficient privileges
ORA-02063: preceding line from linkA2B

------------------------------------------------------------
as user USER_A of Database A:
grant select on USER_A.tbl_shaon to USER_B;

as user USER_B of Database B
insert into USER_A.tbl_shaon@linkA2B values (6);
select * from USER_A.tbl_shaon@linkA2B;
ID
6
1
2


If you have any findings please let me know.

Comments

Popular posts from this blog

Restoring Master, Model and MSDB from Netbackup

Oracle Job Operations