共用方式為


LinkedServerLogin.SetRemotePassword 方法 (SecureString)

Sets the password for an alternative login name used when a distributed query or another SQL Server process accesses data on a linked server using an OLE DB Provider.

命名空間:  Microsoft.SqlServer.Management.Smo
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
Public Sub SetRemotePassword ( _
    password As SecureString _
)
'用途
Dim instance As LinkedServerLogin 
Dim password As SecureString

instance.SetRemotePassword(password)
public void SetRemotePassword(
    SecureString password
)
public:
void SetRemotePassword(
    SecureString^ password
)
member SetRemotePassword : 
        password:SecureString -> unit
public function SetRemotePassword(
    password : SecureString
)

參數

備註

This property is only valid when the Impersonate property is set to the value True.

範例

在 SMO 中使用連結的伺服器

請參閱

參考

LinkedServerLogin 類別

SetRemotePassword 多載

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

連結的伺服器 (Database Engine)

sp_addlinkedsrvlogin (Transact-SQL)