ORA-01031: insufficient privileges [message #303277] |
Thu, 28 February 2008 11:19 |
caprikar
Messages: 226 Registered: March 2007
|
Senior Member |
|
|
Hi,
I create a table and constraints in a schema REF with the following statments and granted access to INT user. And when I try to create a foreign key for a table in INT, I'm getting "ORA-01031: insufficient privileges"
CREATE TABLE REF.MTHD_LKUP (
MTHD_CD VARCHAR2(4 BYTE) NOT NULL,
MTHD_DESC VARCHAR2(60 BYTE) NULL,
CREATE_DT DATE DEFAULT sysdate NULL,
CREATE_USER_ID VARCHAR2(30 BYTE) DEFAULT user NULL,
UPDATE_DT DATE DEFAULT sysdate NULL,
UPDATE_USER_ID VARCHAR2(30 BYTE) DEFAULT user NULL,
DEACTV_DT DATE NULL
);
Table created.
ALTER TABLE REF.MTHD_LKUP
ADD (
CONSTRAINT PK_MTHD_LKUP
PRIMARY KEY
(MTHD_CD));
Table altered.
GRANT SELECT, UPDATE, INSERT, DELETE ON REF.MTHD_LKUP TO INT;
Grant succeeded.
CREATE TABLE INT.SRVC_SPCL (
SRVC_NAME VARCHAR2(60),
SRVC_DESC VARCHAR2(150),
SRVC_LONG_DESC VARCHAR2(250),
MTHD_CD VARCHAR2(4)
);
Table created.
ALTER TABLE INT.SRVC_SPCL ADD (
CONSTRAINT FK_SRVC_SPEC_MTHD
FOREIGN KEY (MTHD_CD)
REFERENCES REF.MTHD_LKUP(MTHD_CD)
ON DELETE SET NULL);
REFERENCES REF.MTHD_LKUP(MTHD_CD)
*
ERROR at line 4:
ORA-01031: insufficient privileges
-can anyone tell me what could be the problem?
Thanks,
GK
|
|
|
|
|