Alias a linked Server in SQL server management studio?
Hoping someone can help - is there a way in SQL server management studio 2008 R2 that I can alias a linked SQL server?
I have a server, added by IP address, to which I do not have the login credentials - however as the connection is already setup I can login ok.
Issue is that, this is a dev environment, prior to a live deployment and the IP I have as a linked server needs to be 'accessible' by my stored procs under a different name, eg 'myserver' not 192.168.xxx.xxx...
Any help much appreciated.
This method seems to work:
http://alexpinsker.blogspot.com/2007/08/how-to-give-alias-to-sql-linked-server.html
The details in case that link goes bad:
There are no problems to add SQL linked server to the specific host running it. But what if you need to give it an alias, rather than use hostname as linked server name? Here is how to do it:
Step 1:
- In SQL Server Management Studio open Linked Servers and then 'New Linked Server'.
- Inside of appeared wizard – Select the General tab.
- Specify alias name in "Linked server" field.
- Select SQL Native Client as provider.
- Add sql_server in "Product Name" field (that's the magic).
- In "Data Source" – specify name of the host to be used as linked server.
Step 2:
- In Security tab – specify proper security options (e.g. security context)
Step 3:
- In Server Options tab – set "Data Access", RPC, "Rpc Out" and "Use Remote Collation" to true.
Follow the steps to create new alias->all programs->microsoft sql server 2008 R2->Configuration tools-> select sql server configuration manager->select alias->new alias->then enter server name