I am knew to programming against an Oracle DB and I am getting this error:
ORA-06550: line 2, column 9: PL/SQL: ORA-01775: looping chain of synonyms
Is this something wrong in my code or in my DB? The code is the same for pretty much the whole data access layer and I am only getting this error when I try to insert into one particular table.
BEGIN
UPDATE DEAL_NOTE
SET NOTE_TXT=:prmNOTE_TXT
WHERE DEAL_ID=:prmDEAL_ID;
IF SQL%NOTFOUND THEN
INSERT INTO DEAL_NOTE (NOTE_TXT, DEAL_ID) values (:prmNOTE_TXT, :prmDEAL_ID);
END IF;
END;
You have a problem in your database.
The ORA-01775 error indicates that you have one synonym A that references another synonym B. Synonym B, in turn, references synonym A. Something like
The only way to correct this is to fix the synonyms in the database so that you don’t have these sorts of circular dependencies. You can run a query to identify these synonym loops (assuming you just have a one-level loop where A points to B and B points to A rather than more involved cycles) with a query like this