Showing posts with label firstly. Show all posts
Showing posts with label firstly. Show all posts

Friday, March 23, 2012

Refresh Linked Server without restart?

Hi All,

Firstly, apologies if this isn't the correct category for this posting but I couldn't see anything more appropriate!

I have an alias set up on my server which I want to change to point to a different server. However when I do this, the original info seems to be cached within SQL Server so any connections that were open before the change continue to use the original server. The only CONSISTENT way (that I can see) of ensuring the new attributes are picked up is by restarting the server which is a little more extreme than I would have hoped. It's worth mentioning that on a couple of occasions the updates have seemed to have filtered through without a restart which has only caused me more confusion due to this inconsistency...

If anyone knows of a handy sp or the likes that forces the linked server attributes to be refreshed I'd be mighty grateful.

Thanks in advance,

Rob.

Probably too late, but I thought it worth posting for others who may run into this:

- Change your alias
- Open SMSS and connect to the server with the linked server
- Open Server Objects -> Linked Servers -> your linked server
- Select Catalogs, and right-click "Refresh"

On my machine, this instantly corrected the cached alias value.