I have several SQL Server linked servers set up and was wondering whether there is a way to create an alias to substitute for the four-part naming convention?
So instead of having to write:
select *
from [server].database.tableowner.table
for a query on a table that is on the linked server, is there some way of specifying an alias or "shortcut" for this four-part naming convention?
something like:
select *
from a_db1..table
where a_db1 has been defined to be [server].database1.
I do not want to create views on the linked server, because it will only work for existing tables, not newly created ones, plus, I would have to create a view on the linked server for every table that exists on the other server...
So instead of having to write:
select *
from [server].database.tableowner.table
for a query on a table that is on the linked server, is there some way of specifying an alias or "shortcut" for this four-part naming convention?
something like:
select *
from a_db1..table
where a_db1 has been defined to be [server].database1.
I do not want to create views on the linked server, because it will only work for existing tables, not newly created ones, plus, I would have to create a view on the linked server for every table that exists on the other server...