Topic Last Modified: 2014-02-21
Invokes the process in which a Lync Server 2013 database fails over to its mirror database. After failover has been completed, the mirror database will become the principal database and will handle all new database requests. This cmdlet was introduced in Lync Server 2013.
Syntax
Invoke-CsDatabaseFailover -DatabaseType <Application |
Archiving | Monitoring | User | Provision | Lyss | Registrar | Edge
| PersistentChat | PersistentChatCompliance | CentralMgmt |
SigninTelemetry | ActiveMonitoring> -NewPrincipal <Primary |
Mirror> -PoolFqdn <Fqdn> [-Confirm
[<SwitchParameter>]] [-ExcludeDatabaseList <String[]>]
[-Force <SwitchParameter>] [-LocalStore
<SwitchParameter>] [-Report <String>] [-WhatIf
[<SwitchParameter>]]
|
Examples
Example 1
The command shown in Example 1 invokes failover for the User database found on the pool atl-cs-001.litwareinc.com. The command causes the User database to failover to a previously-assigned mirror database.
Copy Code | |
---|---|
Invoke-CsDatabaseFailover -PoolFqdn atl-cs-001.litwareinc.com -DatabaseType "User" -NewPrincipal "Mirror" |
Example 2
In Example 2, all databases on the pool atl-cs-001.litwareinc.com are failed over except for the LcsCDR and LcsLog databases. These databases are exempted from failover by using the ExcludeDatabaseList parameter.
Copy Code | |
---|---|
Invoke-CsDatabaseFailover -PoolFqdn atl-cs-001.litwareinc.com -ExcludeDatabase -NewPrincipal "Mirror" -ExcludeDatabaseList "LcsCDR", "LcsLog" |
Detailed Description
The Invoke-CsDatabaseFailover cmdlet provides a way for administrators to "failover" one or more Lync Server 2013 databases. For example, suppose you need to temporarily take down the primary database, perhaps to perform a hardware upgrade. In that case, you can use the Invoke-CsDatabaseFailover cmdlet to failover from the primary database to the mirror database; when you do that, all requests for the database in question will be routed to the mirror database. Later, when the hardware upgrade is complete, you can use this same cmdlet to failback to the primary database.
Note that any commands using the Invoke-CsDatabaseFailover cmdlet will fail if you have not configured both a primary database and a mirror database for the database in question.
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 "Invoke-CsDatabaseFailover"}
Lync Server Control Panel: The functions carried out by the Invoke-CsDatabaseFailover cmdlet are not available in the Lync Server Control Panel.
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
DatabaseType |
Required |
Microsoft.Rtc.Management.Deployment.DatabaseNameType |
Type of database being failed over. Valid values are: * ActiveMonitoring * Application * Archiving * CentralMgmt * Cls * Edge * Lyss * Monitoring * PersistentChat * PersistentChatCompliance * Provision * Registrar * SigninTelemetry * User |
NewPrincipal |
Required |
Microsoft.Rtc.Management.Deployment.MirrorRole |
Specifies whether failover will be to the primary database or to the mirror database. Valid values are: * * Mirror Primary |
PoolFqdn |
Required |
Microsoft.Rtc.Management.Deploy.Fqdn |
Fully qualified domain name of the pool containing the database to be failed over. |
Confirm |
Optional |
System.Management.Automation.SwitchParameter |
Prompts you for confirmation before executing the command. |
ExcludeDatabaseList |
Optional |
System.String[] |
List of databases that should not be failed over. For example: -ExcludeDatabaseList "LcsCDR" To prevent multiple databases from being failed over, separate the database names using commas: -ExcludeDatabaseList "LcsCDR", "LcsLog" |
Force |
Optional |
System.Management.Automation.SwitchParameter |
Suppresses the display of any non-fatal error message that might occur when running the command. The Force parameter is also used if the current database is not accessible. |
LocalStore |
Optional |
System.Management.Automation.SwitchParameter |
Retrieves topology information 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\DatabaseFailover.html" |
WhatIf |
Optional |
System.Management.Automation.SwitchParameter |
Describes what would happen if you executed the command without actually executing the command. |
Input Types
None. The Invoke-CsDatabaseFailover cmdlet does not accept pipelined input.
Return Types
None.