Yes, if you have a linked server from the database server that you are connecting to, to the other database server and the login which you use to access the remote server via the linked server has access then you can access the remote database.
However using a variable for the database or server name would require using dynamic SQL.
Discuss This Question: 3  Replies