Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

user12251389Jan 17 2017 — edited Jan 17 2017

I am running the below query from RATOR_MONITORING schema which is granting the reference permission from RATOR_MONITORING_CONFIGURATION.SMSC_GATEWAY table to RATOR_MONITORING schema.

GRANT REFERENCES ON "RATOR_MONITORING_CONFIGURATION"."SMSC_GATEWAY" TO "RATOR_MONITORING";

ALTER TABLE "RATOR_MONITORING"."SMSC_GATEWAY_STATUS" ADD CONSTRAINT "SMSC_GATEWAY_STATUS_FK1" FOREIGN KEY ("SMSC_GATEWAY_ID")

   REFERENCES "RATOR_MONITORING_CONFIGURATION"."SMSC_GATEWAY" ("ID") ON DELETE CASCADE ENABLE;

When i run the below query i am  getting error as :

SQL Error: ORA-01749: you may not GRANT/REVOKE privileges to/from yourself

I have other sql statements as well which i want to run from RATOR_MONITOR schema only. This sql statement are stored in a sql file. And i am running this sql file in sql plus. So is there any way using anonymous block or any other approch where i can connect to schema RATOR_MONITORING_CONFIGURATION schema and grant the reference permission and again connect to rator_monitor schema and run the alter table statement and also other sql statements.

This post has been answered by Chris Hunt on Jan 17 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 14 2017
Added on Jan 17 2017
5 comments
2,008 views