Share via


MasterKey.Import Method (String, String, String)

Loads the database master key from the file that is located at the specified system path by using the specified passwords to decrypt and encrypt the master key.

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

Syntax

'Declaration
Public Sub Import ( _
    path As String, _
    decryptionPassword As String, _
    encryptionPassword As String _
)
'Usage
Dim instance As MasterKey 
Dim path As String 
Dim decryptionPassword As String 
Dim encryptionPassword As String

instance.Import(path, decryptionPassword, _
    encryptionPassword)
public void Import(
    string path,
    string decryptionPassword,
    string encryptionPassword
)
public:
void Import(
    String^ path, 
    String^ decryptionPassword, 
    String^ encryptionPassword
)
member Import : 
        path:string * 
        decryptionPassword:string * 
        encryptionPassword:string -> unit
public function Import(
    path : String, 
    decryptionPassword : String, 
    encryptionPassword : String
)

Parameters

  • path
    Type: System.String
    A String value that specifies the system path location of the file to save the master key to.
  • decryptionPassword
    Type: System.String
    A String value that specifies the password with which to decrypt the master key.
  • encryptionPassword
    Type: System.String
    A String value that specifies the password with which to encrypt the master key.

Examples

Calling Methods

See Also

Reference

MasterKey Class

Import Overload

Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Encryption Hierarchy

CREATE MASTER KEY (Transact-SQL)