There are only two ways that I know of, and both suck. The first is to use dynamic SQL, for example:
declare @db varchar(512) set @db = 'NorthwindV1.1' declare @sql varchar(max) set @sql = 'select * from ' + @db + '.dbo.YourTable' exec (@sql)
Secondly, you need to install multiple instances if SQL Server is on the machine. Like localhost\v1.0 , localhost\v1.1 , etc. Then you can create the linked server that you request, for example:
select * from linkedserver.northwind.dbo.YourTable
Now you can modify the linkedserver to specify one of localhost\v1.0 , localhost\v1.1 and the subsequent stored procedures.
I will look at this question to see if the best deals appear :)
Andomar
source share