共用方式為


MasterKey.Import 方法 (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.

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

語法

'宣告
Public Sub Import ( _
    path As String, _
    decryptionPassword As String, _
    encryptionPassword As String _
)
'用途
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
)

參數

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

範例

呼叫方法

請參閱

參考

MasterKey 類別

Import 多載

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

加密階層

CREATE MASTER KEY (Transact-SQL)