A system security officer uses sp_addserver to add entries to the sysservers table. On the server originating the call, you must add one entry for the local server, and one for each remote server that your server will call.
When you create entries for a remote server, you can either:
Refer to them by the name listed in the interfaces file, or
Provide a local name for the remote server. For example, if the name in the interfaces file is “MAIN_PRODUCTION,” you may want to call it simply “main.”
The syntax is:
sp_addserver lname [{, local | null} [, pname]]
where:
lname – provides the local “call name” for the remote server. If this name is not the same as the remote server’s name in the interfaces file, provide that name as the third parameter, pname.
The remote server must be listed in the interfaces file on the local machine. If it is not listed, copy the interfaces file entry from the remote server and append it to your existing interfaces file. Keep the same port numbers.
local – identifies the server being added as a local server. The local value is used only after starting up, or after a restart, to identify the local server name so that it can appear in messages printed out by Adaptive Server. null specifies that this server is a remote server.
For users to successfully run RPCs from the local server, add the local server using the local option, and restart it. The restarting is required to set the global variable @@servername.
pname – is the remote server listed in the interfaces file for the server named lname. This optional argument permits you to establish local aliases for any other Adaptive Server, Open Server, or Backup Server that you may need to communicate with. If you do not specify pname, to lname is the default.