質問

This works:

(connect to some_db)
INSERT INTO some_schema.some_table(id) VALUES (some_schema.some_table.nextval);

THis works too:

(connect to some_other_db)
SELECT some_schema.some_table.nextval@some_db FROM DUAL;

This does not work:

(connect to some_other_db)
INSERT INTO some_schema.some_table@some_db(id) VALUES (some_schema.some_table.nextval@some_db);

The error I get is ORA-01031: insufficient privileges ORA-02063: preceding line from SOME_DB. The insert privilege for some_schema.some_table is granted through a default role.

What could be the problem here?

Update: adding select right for the table made the remote query work.

役に立ちましたか?

解決

If you insert in the local database the insert privilege is sufficient, if you insert into the remote database, you need select and the inset privilege as it will do a select during the parse phase.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top