Websphere v4 Microsoft SQL Server JDBC Driver want to include SQL Synonyms

47 views Asked by At

My current database contains synonyms. The driver is currently getting only the tables. I have searched many documentations and haven't found some workaround for this.

Do you have any idea how I could include the synonyms in the driver?

1

There are 1 answers

0
David Browne - Microsoft On

This is not a driver issue. Synonyms don't appear in the sys.tables or information_schema.tables catalog views. So most metadata scanning tools can't identify them as thing-that-can-be-queried.

This is made harder because you can have synonyms for tables, view, procedures, etc. And the metadata associated with the synonym is just the name of the target object as it was specified in the CREATE SYNONYM statement.

So if you can provide a SQL query directly to the tool, synonyms will work. But don't expect to pick a synonym from a list of tables.