One of the tables named in this query was in fact a synonym, and it
pointed outside the current database. It named another synonym that
pointed outside its database, and so on for
To review the synonyms in the current database that refer to external databases, query systables and syssyntable as follows:
SELECT T.tabname synonym, servername, dbname, user, S.tabname FROM systables T, syssyntable S WHERE T.tabtype = 'S' AND T.tabid = S.tabid AND S.btabid IS NULL
To follow a chain of synonyms through external databases, use a similar query in the external database and substitute for servername, dbname, and tabname the values that the preceding query returns each time.
SELECT T.tabname synonym, servername, dbname, user, S.tabname FROM dbname@servername:systables T, dbname@servername:syssyntable S WHERE T.tabtype = 'S' AND T.tabname = 'tabname' AND T.tabid = S.tabid
When this query returns no row, the requested tabname is not defined as a synonym in that database (it is a table, a view, or not defined).