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.