共用方式為


SetMediaPassword 方法 (SecureString)

Sets the password for a media set.

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

語法

'宣告
Public Sub SetMediaPassword ( _
    value As SecureString _
)
'用途
Dim instance As BackupRestoreBase
Dim value As SecureString

instance.SetMediaPassword(value)
public void SetMediaPassword(
    SecureString value
)
public:
void SetMediaPassword(
    SecureString^ value
)
member SetMediaPassword : 
        value:SecureString -> unit 
public function SetMediaPassword(
    value : SecureString
)

參數

備註

Use a password to protect the medium when the medium contains one or more backup sets that can be accessed by the same person.