| title | sp_helpremotelogin (Transact-SQL) | ||
|---|---|---|---|
| description | Reports information about remote logins for a particular remote server, or for all remote servers, defined on the local server. | ||
| author | markingmyname | ||
| ms.author | maghan | ||
| ms.reviewer | randolphwest | ||
| ms.date | 06/23/2025 | ||
| ms.service | sql | ||
| ms.subservice | system-objects | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
||
| dev_langs |
|
[!INCLUDE SQL Server]
Reports information about remote logins for a particular remote server, or for all remote servers, defined on the local server.
Important
[!INCLUDE ssNoteDepFutureAvoid] Use linked servers and linked server stored procedures instead.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_helpremotelogin
[ [ @remoteserver = ] N'remoteserver' ]
[ , [ @remotename = ] N'remotename' ]
[ ; ]
Specifies the remote server about which the remote login information is returned. @remoteserver is sysname, with a default of NULL. If @remoteserver isn't specified, information about all remote servers defined on the local server is returned.
A specific remote login on the remote server. @remotename is sysname, with a default of NULL. If @remotename isn't specified, information about all remote users defined for @remoteserver is returned.
0 (success) or 1 (failure).
| Column name | Data type | Description |
|---|---|---|
server |
sysname | Name of a remote server defined on the local server. |
local_user_name |
sysname | Login on the local server that remote logins from server map to. |
remote_user_name |
sysname | Login on the remote server that maps to local_user_name. |
options |
sysname | Trusted = The remote login doesn't need to supply a password when connecting to the local server from the remote server.Untrusted (or blank) = The remote login is prompted for a password when connecting to the local server from the remote server. |
Use sp_helpserver to list the names of remote servers defined on the local server.
No permissions are checked.
The following example displays information about all remote users on the remote server Accounts.
EXECUTE sp_helpremotelogin 'Accounts';The following example displays information about all remote users on all remote servers known to the local server.
EXECUTE sp_helpremotelogin;