共用方式為


ConfigurationSetting 方法 - RestoreEncryptionKey

將指定的加密金鑰重新套用至報表伺服器資料庫。

語法

Public Sub RestoreEncryptionKey(ByRef KeyFile() As Integer, _  
    ByRef Length As Int32, ByVal Password As String, _  
    ByRef HRESULT As Int32, ByRef ExtendedErrors() As String)  
public void RestoreEncryptionKey(out Byte[] KeyFile, out Int32 Length,   
            string Password, out Int32 HRESULT, out string[] ExtendedErrors);  

參數

KeyFile[]
[out] 包含已加密之加密金鑰的陣列。

長度
[out] 此方法所傳回之陣列的長度。

密碼
用來加密加密金鑰的字串。

HRESULT
[out] 指出呼叫成功或失敗的值。

ExtendedErrors[]
[out] 包含呼叫所傳回之其他錯誤的字串陣列。

傳回值

傳回 HRESULT ,指出方法呼叫成功或失敗。 值為 0 表示方法呼叫成功。 非零值表示發生錯誤。

備註

如果報表伺服器的項目已經存在報表伺服器資料庫中,就會刪除此項目。 然後,系統會使用指定的加密金鑰和報表伺服器的公開金鑰來建立新項目。

在清除加密金鑰清單的 DeleteEncryptionKey 方法之後呼叫此方法最有效。

需求

Namespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin

MSReportServer_ConfigurationSetting 成員