TEST
master tcp ether hpsrv1 1200
query tcp ether hpsrv1 1200
Note that preceding the master/query entries there's a tab.This is as far as the name TEST is used. Without further configuration the server does not know its name is TEST, nor do any client applications. Typically there will also be query entries under TEST in the local interfaces file, and client programs running on the same machine as the server will pick this connection information up. However, there is nothing to stop the query entry being duplicated under another name entirely in the same interfaces file.
ARTHUR
query tcp ether hpsrv1 1200
isql -STEST or isql -SARTHUR will connect to the same
server. The name is simply a search parameter into the
interfaces file.
TEST
master tli spx /dev/nspx/ \xC12082580000000000012110
master tcp ether hpsrv1 1200
Then the client can have a meaningful name:
ACCOUNTS_TEST_SERVER
query tcp ether hpsrv1 1200
or alternative protocols:
TEST_IP
query tcp ether hpsrv1 1200
TEST_SPX
query tli spx /dev/nspx/ \xC12082580000000000012110
Entries are added using the sp_addserver system procedure - add a remote server with this format:
sp_addserver server_name, null, network_name
server_name is any name you wish to refer to a remote server by, but
network_name must be the name of the remote server as referenced in the
interfaces file local to your local server. It normally makes sense to
make the server_name the same as the network_name, but you can easily do:
sp_addserver LIVE, null, ACCTS_LIVE
When you execute for example, exec LIVE.master..sp_helpdb the local SQL
Server will translate LIVE to ACCTS_LIVE and try and talk to ACCTS_LIVE
via the ACCTS_LIVE entry in the local interfaces file.
Finally, a variation on the sp_addserver command:
sp_addserver LOCALSRVNAME, local
names the local server (after a restart). This is the name the server
reports in the errorlog at startup, the value returned by @@SERVERNAME,
and the value placed in Open Client server messages. It can be completely
different from the names in RUN_SRVNAME or in local or remote interfaces -
it has no bearing on connectivity matters.