I am creating a table (here below is the code) - this is executed through some script on unix. The script also creates some synonyms (not sure what/how):
drop table BNS_SAA_MESSAGES;
CREATE TABLE BNS_SAA_MESSAGES
(
HostNumber varchar(50) NOT NULL,
SAAMessage varchar(2048) NOT NULL,
PRIMARY KEY (HostNumber)
);
I'm getting the following error:
Processing bns_saa_messages
cat: cannot open bns_saa_messages.sql
Commit complete.
GRANT SELECT ON bns_saa_messages TO RL_ORDFX_RPT
GRANT SELECT ON bns_saa_messages TO RL_ORDFX_RPT
*
ERROR at line 1:
ORA-01775: looping chain of synonyms
GRANT INSERT ON bns_saa_messages TO RL_ORDFX_RPT
GRANT INSERT ON bns_saa_messages TO RL_ORDFX_RPT
*
ERROR at line 1:
ORA-01775: looping chain of synonyms
GRANT UPDATE ON bns_saa_messages TO RL_ORDFX_RPT
GRANT UPDATE ON bns_saa_messages TO RL_ORDFX_RPT
*
ERROR at line 1:
ORA-01775: looping chain of synonyms
GRANT DELETE ON bns_saa_messages TO RL_ORDFX_RPT
GRANT DELETE ON bns_saa_messages TO RL_ORDFX_RPT
*
ERROR at line 1:
ORA-01775: looping chain of synonyms
create public synonym bns_saa_messages for ORDMSO.bns_saa_messages
create public synonym bns_saa_messages for ORDMSO.bns_saa_messages
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
Commit complete.
I googled for ORA-01775: looping chain of synonyms
and it seems to mean that a something was removed but there is a pointer to it. I'm guessing it happens during select
from 'things' that do not exist anymore. Not sure if these things are tables or something else. This is what I gathered from my research.
Any idea how to create my tables? I tried to execute multiple times the SQL code, but to no avail - I get the same error every time.
Also the table is not created:
SQL> select * from bns_saa_messages;
select * from bns_saa_messages
*
ERROR at line 1:
ORA-01775: looping chain of synonyms
I've looked at the following so questions, but it doesn't seem to be helping. Maybe you can see something I don't:
I get an ORA-01775: looping chain of synonyms error when I use sqlldr
How to debug ORA-01775: looping chain of synonyms?
ORA-01775: looping chain of synonyms but there are no synonyms
Thanks
:UPDATE:
After executing: select * from all_synonyms where synonym_name = 'BNS_SAA_MESSAGES';
as per Craig's suggestion I get:
OWNER SYNONYM_NAME
------------------------------ ------------------------------
TABLE_OWNER TABLE_NAME
------------------------------ ------------------------------
DB_LINK
--------------------------------------------------------------------------------
PUBLIC BNS_SAA_MESSAGES
ORDMSO BNS_SAA_MESSAGES
:UPDATE: 2
Running: select * from all_tables where table_name = 'BNS_SAA_MESSAGES';
SQL> select * from all_tables where table_name = 'BNS_SAA_MESSAGES';
no rows selected