Displays or changes options for a remote login defined on the local server running Microsoft® SQL Server™.
sp_remoteoption [[@remoteserver =] 'remoteserver']
[,[@loginame =] 'loginame']
[,[@remotename =] 'remotename']
[,[@optname =] 'optname']
[,[@optvalue =] 'optvalue']
0 (success) or 1 (failure)
Column name | Data type | Description |
---|---|---|
remotelogin_option | sysname | Remote login option. Only trusted is valid. |
To display a list of the remote login options, execute sp_remoteoption with no parameters.
sp_remoteoption cannot be executed within a user-defined transaction.
Only members of the sysadmin or securityadmin fixed server roles can execute sp_remoteoption.
This example lists the remote login options.
EXEC sp_remoteoption
go
Settable remotelogin options.
remotelogin_option
--------------------------------------------
trusted
This example defines a remote login chris, mapped to the local login salesmgr, from the remote server ACCOUNTS to be trusted (the password is not checked).
EXEC sp_remoteoption 'ACCOUNTS', 'salesmgr', 'chris', 'trusted', 'TRUE'
This example defines a remote login chris, mapped to the local login salesmgr, from the remote server ACCOUNTS to be untrusted (the password is checked).
EXEC sp_remoteoption 'ACCOUNTS', 'salesmgr', 'chris', 'trusted', 'FALSE'
Configuring Remote Servers | sp_helpremotelogin |
sp_addremotelogin | System Stored Procedures |