マルチスキーマ設定に関して、Oracle で何が可能で何が不可能かを理解するのに苦労しています。A
私が2つのスキーマを持っているとしましょうB
:
-- with user SYS connect as SYSDBA
-- note: ALL PRIVILEGES are granted for simplicity in the scope of this question.
-- real life databases would have more fine-grained grants...
create user A identified by A;
grant all privileges to A;
create user B identified by B;
grant all privileges to B;
-- with user A
create table A.REFERENCED_TABLE (
ID number(7) not null,
constraint REFERENCED_TABLE_PK primary key (ID)
);
-- with user A or B
create table B.REFERENCING_TABLE (
A_ID number(7) not null,
constraint REFERENCING_TABLE_FK
foreign key (A_ID)
references A.REFERENCED_TABLE(ID)
on delete cascade
);
しかし、上記のステートメントが原因で
ORA-01031: insufficient privileges
あるスキーマのテーブルが別のスキーマのテーブルを参照するようにするにはどうすればよいですか? GRANT
まだ足りないものはありますか?これは可能ですか?