Adds a new remote login ID on the local server. This enables remote servers to connect and execute remote procedure calls.
This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible. Use linked servers and linked server stored procedures instead.
A. Mapping one to one
The following example maps remote names to local names when the remote server ACCOUNTS and local server have the same user logins.
EXEC sp_addremotelogin 'ACCOUNTS';
B. Mapping many to one
The following example creates an entry that maps all users from the remote server ACCOUNTS to the local login ID Albert.
EXEC sp_addremotelogin 'ACCOUNTS', 'Albert';
C. Using explicit one-to-one mapping
The following example maps a remote login from the remote user Chris on the remote server ACCOUNTS to the local user salesmgr.
EXEC sp_addremotelogin 'ACCOUNTS', 'salesmgr', 'Chris';