Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 3145

Synonyms

$
0
0
I think the answer is 'no', but I'll ask it anyway. I have two databases on different servers referenced through linked server. Is it possible to create a synonym that encompass the linked server name, database name and schema , but not the object? For example:CREATE SYNONYM MySynonym FOR[MyLinkedServer].[MyRemoteDB].[MyRemoteSchema]Then use the synonym as:select * from MySynonym.MyRemoteTableSQL Server had no problem creating the synonym, but I couldn't get the query to work, and I was wondering if I was doing something wrong with the query, or the problem is more basic, that I can't use the synonym as I wish.Thanks

Viewing all articles
Browse latest Browse all 3145

Trending Articles