I am trying to get data from different sever, and the sever name might change. So I set the server name as a parameter. The idea of my sql store procedure is something like this
CREATE PROCEDURE [dbo].[GetData]
@ServerName
AS
BEGIN
SELECT * FROM @ServerName.ClientDataBase.dbo.Client
END
Does anyone know how to achieve this?
The database version is sql server 2005