I have two database servers, server1 and server2, which are our diff environment of our legacy system. I have to write a stored procedure for getting data which is communicate with one of the env.
I want a way so that I can easily switch the env
Like:
Declare @Server nvarchar(20)
set @Server="server1"
select *
from @Server.global.dbo.tblaccount