Database.IsMirroringEnabled Property
Gets the Boolean value that specifies whether mirroring is enabled on the database.
Namespace: Microsoft.SqlServer.Management.Smo
Assembly: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
Syntax
'Declaration
Public ReadOnly Property IsMirroringEnabled As Boolean
public bool IsMirroringEnabled { get; }
public:
property bool IsMirroringEnabled {
bool get ();
}
/** @property */
public boolean get_IsMirroringEnabled ()
public function get IsMirroringEnabled () : boolean
Property Value
A Boolean value that specifies whether mirroring is enabled on the database. If True, the database has mirroring enabled. If False (default), the database does not have mirroring enabled.
Remarks
Updated text:17 July 2006
Updated text:14 April 2006
This namespace, class, or member is supported only in version 2.0 of the Microsoft .NET Framework.
Example
'Connect to the local, default instance of SQL Server.
Dim srv As Server
srv = New Server
'Reference the AdventureWorks database.
Dim db As Database
db = srv.Databases("AdventureWorks")
'Display information about the database.
Console.WriteLine("Is Database snapshot : " + _
db.IsDatabaseSnapshot.ToString)
Console.WriteLine("Is Database snapshot base : " + _
db.IsDatabaseSnapshotBase.ToString)
Console.WriteLine("User is Aministrator : " + _
db.IsDbAccessAdmin.ToString)
Console.WriteLine("User is backup operator : " + _
db.IsDbBackupOperator.ToString)
Console.WriteLine("User is data reader : " + _
db.IsDbDatareader.ToString)
Console.WriteLine("User is data writer : " + _
db.IsDbDatawriter.ToString)
Console.WriteLine("User is DDL administrator : " + _
db.IsDbDdlAdmin.ToString)
Console.WriteLine("User denied data reader : " + _
db.IsDbDenyDatareader.ToString)
Console.WriteLine("User denied data writer : " + _
db.IsDbDenyDatawriter.ToString)
Console.WriteLine("User is database owner : " + _
db.IsDbOwner.ToString)
Console.WriteLine("User security administrator : " + _
db.IsDbSecurityAdmin.ToString)
Console.WriteLine("Full text is enabled : " + _
db.IsFullTextEnabled.ToString)
Console.WriteLine("Database is a mail host : " + _
db.IsMailHost.ToString)
Console.WriteLine("Mirroring is enabled : " + _
db.IsMirroringEnabled.ToString)
Console.WriteLine("Database is a system object : " + _
db.IsSystemObject.ToString)
Console.WriteLine("Database is updateable : " + _
db.IsUpdateable.ToString)
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
Database Class
Database Members
Microsoft.SqlServer.Management.Smo Namespace
Other Resources
How to: Create, Alter, and Remove a Database in Visual Basic .NET
Database Mirroring
Implementing Endpoints
Creating, Altering, and Removing Databases
CREATE DATABASE (Transact-SQL)
Change History
Release |
History |
17 July 2006 |
Changed content:
|
Release |
History |
14 April 2006 |
Changed content:
|