Selecting Oracle data via SS Query Analyzer for public synonyms

  •  I have setup the linked server from SQL 2000 to Oracle 9i and all of that. I can select from the base tables via the select * from servername..schemaname.table.  That all works fine. Where I have a problem is I don't know what to put for a public synonym. Public synonyms don't have a schema owner. If I don't sepecify an owner it gives me an 'invalid object name'. 

     Any help would be appreciated.

  • This was removed by the editor as SPAM

  • You can create a puiblic synonym so each time you reference that table you dont need the owner of that table prefixed.

    CREATE PUBLIC SYNONYM customers FOR oe.customers;

    SELECT COUNT(*) FROM customers;
    This will reference oe.customer table unless the user name logged in has a customers table, it will reference the user's table instead.
    Chris

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply