I have an app that has some stored procedures running queries across a linked server. In our development environment, the linked database is on a box called 10.xxx.xxx.xx. In the production environment, the linked database will be on a server called something else. What I want to do is have the linked server in the development environment named the same thing as the linked server in the production environment, so that I won't have to change the stored procedures when migrating the project into production.
SQL Server 2005 isn't giving me the option to rename or alias the linked server, though. Is there anyway to do this so that I can have the linked server named the same thing on the two different boxes and not have to change the sp's?
I don't think you can rename linked servers, but you can create them correctly for your needs. Don't select SQL Server, but do select the SQL native client, or just use T-SQL which may make more sense if trying to standardise stuff accross machines anyway
EXEC sp_addlinkedserver @.server= 'FRED1' ,@.provider='SQLNCLI' ,@.datasrc='10.1.1.1' ,@.srvproduct = 'SQL'
In future please try and pick a more appropriate forum. This is really SQL Server question issue, not SSIS.
sql
No comments:
Post a Comment