다음을 통해 공유


MasterKey 클래스

The MasterKey object represents a SQL Server database master key.

네임스페이스:  Microsoft.SqlServer.Management.Smo
어셈블리:  Microsoft.SqlServer.Smo.dll의 Microsoft.SqlServer.Smo

구문

‘선언
Public NotInheritable Class MasterKey _
    Inherits SqlSmoObject _
    Implements IDroppable
‘사용 방법
Dim instance As MasterKey
public sealed class MasterKey : SqlSmoObject, 
    IDroppable
public ref class MasterKey sealed : public SqlSmoObject, 
    IDroppable
[<SealedAttribute>]
type MasterKey =  
    class
        inherit SqlSmoObject
        interface IDroppable
    end
public final class MasterKey extends SqlSmoObject implements IDroppable

주의

A database master key is used to symmetrically encrypt keys and certificates that are stored in the database. A database master key can be encrypted by using the service master key or by using a user-specified password. When a database master key is created, a password must be supplied to encrypt and decrypt it.

When a database is attached to an instance of SQL Server, the database administrator must either supply the master key password or make an unencrypted copy of the master key that is available for encryption with the service master key.

The service master key is the top layer in the encryption hierarchy that is used to encrypt lower layers in the encryption hierarchy. The service master key is generated automatically by Windows. It can be opened only by the Windows service account under which it was created, or by a user who knows both the service account name and its password.

To get MasterKey object properties, users can be a member of the public fixed server role.

To set MasterKey object properties, users must have CONTROL permission on the database or be a member of the db_owner fixed database role.

To create or drop a master key, users must have CONTROL permission on the database or be a member of the db_owner fixed database role.

To open or regenerate a master key, users must have CONTROL permission on the database or be a member of the db_owner fixed database role.

To add or drop service key encryption, users must have CONTROL permission on the database or be a member of the db_owner fixed database role.

To drop a master key, users can be a member of the public fixed server role.

상속 계층 구조

System. . :: . .Object
  Microsoft.SqlServer.Management.Smo. . :: . .SmoObjectBase
    Microsoft.SqlServer.Management.Smo. . :: . .SqlSmoObject
      Microsoft.SqlServer.Management.Smo..::..MasterKey

스레드로부터의 안전성

이 형식의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.