Topic Last Modified: 2014-02-21

Uninstalls a Lync Server 2013 Management Shell mirror database. A database mirror enables you to simultaneously maintain two copies of a database, each copy residing on a different server. This cmdlet was introduced in Lync Server 2013.

Syntax

Uninstall-CsMirrorDatabase -DatabaseType <Application | Archiving | Monitoring | User | Provision | Lyss | Registrar | Edge | PersistentChat | PersistentChatCompliance | CentralMgmt | SigninTelemetry | ActiveMonitoring> -SqlServerFqdn <Fqdn> [-SqlInstanceName <String>] [-Confirm [<SwitchParameter>]] [-DropExistingDatabasesOnMirror <SwitchParameter>] [-Report <String>] [-WhatIf [<SwitchParameter>]]

Examples

Example 1

The command shown in Example 1 uninstalls the user database from the SQL Server instance RTC on the computer atl-mirror-001.litwareinc.com. Because the DropExistingDatabaseOnMirror parameter was included, the command will also delete the actual User database mirror.

Copy Code
Uninstall-CsMirrorDatabase -SqlServerFqdn "atl-mirror-001.litwareinc.com" -SqlInstanceName "RTC" -DatabaseType "User" -DropExistingDatabasesOnMirror

Detailed Description

Mirror databases enable you to simultaneously maintain two copies of a database: when data is written to Database A, a copy of that data is also written to its mirror database. This provides the ability to instantly replace Database A should that database become unavailable: you can “failover” to the mirror database with minimal disruption to your users and with minimal data loss.

Mirror databases can be installed and configured by using the Install-CsMirrorDatabase cmdlet. If you ever need to remove a mirror database, you can do so by using the Uninstall-CsMirrorDatabase cmdlet.

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 "Uninstall-CsMirrorDatabase"}

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

Parameters

Parameter Required Type Description

DatabaseType

Required

Microsoft.Rtc.Management.Deployment.DatabaseNameType

Type of mirror database to be installed. Allowed values are:

ActiveMonitoring

Application

Archiving

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

SigninTelemetry

User

SqlServerFqdn

Required

Microsoft.Rtc.Management.Deploy.Fqdn

Fully qualified domain name (FQDN) of the computer containing the database is to be uninstalled. For example:

-SqlServerFqdn atl-sql-001.litwareinc.com

This should be the FQDN of the primary SQL Server computer.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

DropExistingDatabasesOnMirror

Optional

System.Management.Automation.SwitchParameter

When present, deletes any existing copies of the mirrored databases from the mirror server.

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\UnInstallDatabaseMirror.html"

SqlInstanceName

Optional

System.String

Name of the database instance where the database is to be installed. A database instance is simply a set of running processes that provides access to database files. If this parameter is omitted, the Uninstall-CsMirrorDatabase cmdlet will use the default SQL Server instance.

WhatIf

Optional

System.Management.Automation.SwitchParameter

Describes what would happen if you executed the command without actually executing the command.

Input Types

None. The Uninstall-CsMirrorDatabase cmdlet does not accept pipelined input.

Return Types

None.

See Also