Share via


MasterKey.IsOpen Property

Gets the Boolean property value that specifies whether the database master key is open.

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

Syntax

'Declaration
Public ReadOnly Property IsOpen As Boolean
public bool IsOpen { get; }
public:
property bool IsOpen {
    bool get ();
}
/** @property */
public boolean get_IsOpen ()
public function get IsOpen () : boolean

Property Value

A Boolean value that specifies whether the master key is open. If True, the master key is open. If False, the master key is closed.

Remarks

If the master key was encrypted with the service master key, it is automatically opened when the session begins. In this case, it is not necessary to open the master key explicitly. If the master key is encrypted with a password, you must open it explicitly by using the Open method and providing the password.

This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.

Example

How to: Get and Set a Property in Visual Basic .NET

Thread Safety

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

Target Platforms

For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.

See Also

Reference

MasterKey Class
MasterKey Members
Microsoft.SqlServer.Management.Smo Namespace

Other Resources

Encryption Hierarchy
CREATE MASTER KEY (Transact-SQL)