BackupRestoreBase.SetMediaPassword Method (SecureString)

Note: This API is now obsolete.

Sets the password for a media set.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.SmoExtended (in Microsoft.SqlServer.SmoExtended.dll)

Syntax

'Declaration
<ObsoleteAttribute> _
Public Sub SetMediaPassword ( _
    value As SecureString _
)
'Usage
Dim instance As BackupRestoreBase 
Dim value As SecureString

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

Parameters

Remarks

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

Examples

Backing Up and Restoring Databases and Transaction Logs

See Also

Reference

BackupRestoreBase Class

SetMediaPassword Overload

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Security Considerations for Backup and Restore (SQL Server)

RESTORE (Transact-SQL)

BACKUP (Transact-SQL)