views:

281

answers:

2

Based on the answer I received on this question (http://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?

A: 

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.

OMG Ponies
+1  A: 

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.

gbn