Home Forums SQL Server 2005 T-SQL (SS2K5) Using a variable for a linked server name in stored procedures RE: Using a variable for a linked server name in stored procedures

  • Thanks for the quick response. I took a look at this sysservers table and I don't think this solution will help because all four database environments are on the same SQL server.

    So the setup I have is 1 SQL Server with all my SQL database environments on, with a Linked Server set up on this SQL server called ERPLIVE with the connection details to the Oracle server/db for the LIVE ERP system, and a similar Linked Server on this SQL server called ERPTEST with the connection details to the Oracle server/db for the TEST ERP system.

    Hence, I can't use the srvnetname as the variable because I have the LIVE and TEST (and other) integration routines running on the same server.