共用方式為


Database.MasterKey 屬性

Gets the master key that is used to encrypt the private keys of certificates.

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

語法

'宣告
<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.ZeroToOne)> _
Public ReadOnly Property MasterKey As MasterKey 
    Get
'用途
Dim instance As Database 
Dim value As MasterKey 

value = instance.MasterKey
[SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.ZeroToOne)]
public MasterKey MasterKey { get; }
[SfcObjectAttribute(SfcObjectRelationship::Object, SfcObjectCardinality::ZeroToOne)]
public:
property MasterKey^ MasterKey {
    MasterKey^ get ();
}
[<SfcObjectAttribute(SfcObjectRelationship.Object, SfcObjectCardinality.ZeroToOne)>]
member MasterKey : MasterKey
function get MasterKey () : MasterKey

屬性值

型別:Microsoft.SqlServer.Management.Smo.MasterKey
A MasterKey object value that specifies the master key that is used to encrypt the private keys of certificates.The database master key can be encrypted by the service master key.

範例

使用資料庫物件

請參閱

參考

Database 類別

Microsoft.SqlServer.Management.Smo 命名空間

其他資源

使用加密

建立、改變和移除資料庫

CREATE DATABASE (Transact-SQL)