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, you must provide that name as the third parameter, pname.
The remote server must be listed in the interfaces file on the local machine. If it’s not listed, copy the interfaces file entry from the remote server and append it to your existing interfaces file. Be sure to keep the same port numbers.
local – identifies the server being added as a local server. The local value is used only after start-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 be able to run RPCs successfully from the local server, the local server must be added with the local option and restarted. 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, it defaults to lname.