Share via


ServiceMasterKey.Recover Method

Recovers a service master key, in case the service master key has been changed external to SQL Server.

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

Syntax

'Declaration
Public Sub Recover ( _
    oldAccount As String, _
    oldPassword As String _
)
'Usage
Dim instance As ServiceMasterKey 
Dim oldAccount As String 
Dim oldPassword As String

instance.Recover(oldAccount, oldPassword)
public void Recover(
    string oldAccount,
    string oldPassword
)
public:
void Recover(
    String^ oldAccount, 
    String^ oldPassword
)
member Recover : 
        oldAccount:string * 
        oldPassword:string -> unit
public function Recover(
    oldAccount : String, 
    oldPassword : String
)

Parameters

  • oldAccount
    Type: System.String
    A String value that specifies the old account that was used to open the service master key.
  • oldPassword
    Type: System.String
    A String value that specifies the associated password for the account that was used to open the service master key.

Examples

Using Encryption

See Also

Reference

ServiceMasterKey Class

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Encryption Hierarchy

ALTER SERVICE MASTER KEY (Transact-SQL)