开发者

Create local Linked Server using Server Name or IP Address?

Based on the answer I receive开发者_C百科d on this question (https://stackoverflow.com/questions/1911969/...) I have set up a Linked Server on SQL Server 2008 to a Pervasive database.

Since both databases are on the same physical server, what would be the recommended method to create the linked server, using the IP Address of the server or the Server Name? My gut tells me to use the IP address as to avoid resolving the name and avoid any unnecessary lookups. Or does it really not matter at all speed wise?

What do you think and why?


Use server name, whether FQDN (SVR01.domain.tld) or DNS alias or "localhost" or "127.0.0.1". Not the actual server IP. It makes life easier in future.

Or call it "pervasive" and point it locally?

As you mentioned, server names must be unique in sys.servers and SQL itself (@@SERVERNAME) uses the name of the instance. If you have a default SQL instance and pervasive on SVR01, you can't refer to "SVR01" for the pervasive linked server.

Performance is neither here nor there. Once the name is resolved it's cached anyway.


Either is fine, but I too lean towards using the IP to avoid name resolution issues.

A benefit to using the DNS name is that if the IP changed for whatever reason, the link would still work. But that's not an issue, being that your databases are on the same server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜