Quantcast
Channel: Database Design forum
Viewing all articles
Browse latest Browse all 2729

Using a synonym table within a synonym stored procedure

$
0
0

We have set up each client with their own database and then created a master database with common tables and stored procedure.  We want to access them via synonyms.  Accessing the tables works fine but when we try and execute a stored procedure that accesses a table in the client database (i.e. where the synonym is located), it returns an error that it can't find it.  I was under the impression that a synonym is a pointer and that it would pull back the object referenced and treat it as a local object.  But it seems that, at least for a stored procedure, it is not running within the database holding the synonym reference.

I've researched this and really can't find anything substantive.  Is there a way to force the synonym to run within the context of the client db and use those tables?  


Viewing all articles
Browse latest Browse all 2729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>