Topic Last Modified: 2014-02-21

Returns information about whether database mirroring has been implemented for a specified database on a specified pool. Database mirroring enables you to simultaneously maintain two copies of a database, with each copy residing on a different server. This cmdlet was introduced in Lync Server 2013.

Syntax

Get-CsDatabaseMirrorState -PoolFqdn <Fqdn> [-DatabaseType <Application | Archiving | Monitoring | User | Provision | Lyss | Registrar | Edge | PersistentChat | PersistentChatCompliance | CentralMgmt | SigninTelemetry | ActiveMonitoring>] [-LocalStore <SwitchParameter>] [-Report <String>]

Examples

Example 1

The command shown in Example 1 returns the state of the database mirror assigned to the monitoring database for the pool atl-cs-001.litwareinc.com.

Copy Code
Get-CsDatabaseMirrorState -PoolFqdn "atl-cs-001.litwareinc.com" -DatabaseType Monitoring

Detailed Description

The Get-CsDatabaseMirrorState cmdlet returns information about the mirror databases configured for a pool; this includes information about the mirror databases that might (or might not) have been configured for the Front End server database, the Location Information Service database, the call detail recording and Quality of Experience databases, and so on. For each database the cmdlet will report back the synchronization status for both the primary database and the mirror database. In some cases you will see output similar to this, including the property value DatabaseInaccessibleOrMirroringNotEnabled:

DatabaseName : lcscdr

StateOnPrimary : DatabaseInaccessibleOrMirroringNotEnabled

StateOnMirror : DatabaseInaccessibleOrMirroringNotEnabled

MirroringStatusOnPrimary :

MirroringStatusOnSecondary :

That typically means that no mirror database has been assigned to the primary database (in this case, the database lcscdr, used for maintaining call detail data).

To return a list of all the role-based access control (RBAC) roles this cmdlet has been assigned to (including any custom RBAC roles you have created yourself), run the following command from the Windows PowerShell command-line interface prompt:

Get-CsAdminRole | Where-Object {$_.Cmdlets –match "Get-CsDatabaseMirrorState"}

Lync Server Control Panel: The functions carried out by the Get-CsDatabaseMirrorState cmdlet are not available in the Lync Server Control Panel.

Parameters

Parameter Required Type Description

PoolFqdn

Required

Microsoft.Rtc.Management.Deploy.Fqdn

Fully qualified domain name of the pool whose database mirroring state is being checked. For example:

-PoolFqdn "atl-cs-001.litwareinc.com"

DatabaseType

Optional

Microsoft.Rtc.Management.Deployment.DatabaseNameType

Type of database whose mirror state is being checked. Allowed values are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

LocalStore

Optional

System.Management.Automation.SwitchParameter

Retrieves the backup mirror state from the local replica of the Central Management store rather than from the Central Management store itself.

Report

Optional

System.String

Enables you to specify a file path for the log file created when the cmdlet runs. For example:

-Report "C:\Logs\DatabaseMirrorState.html"

Input Types

None. The Get-CsDatabaseMirrorState cmdlet does not accept pipelined input.

Return Types

The Get-CsDatabaseMirrorState cmdlet returns instances of the Microsoft.Rtc.Management.Deployment.DatabaseMirrorState class.

See Also