Export (0) Print
Expand All
Expand Minimize

Test-CsDatabase

Lync Server 2013
 

Topic Last Modified: 2014-06-05

Tests the configuration of the Lync Server 2013 databases. This cmdlet was introduced in Lync Server 2013.

Test-CsDatabase -LocalService <SwitchParameter> <COMMON PARAMETERS>
Test-CsDatabase -CentralManagementDatabase <SwitchParameter> [-SqlInstanceName <String>] [-SqlServerFqdn <Fqdn>] <COMMON PARAMETERS>
Test-CsDatabase -ConfiguredDatabases <SwitchParameter> -SqlServerFqdn <Fqdn> <COMMON PARAMETERS>
Test-CsDatabase -DatabaseType <Application | Archiving | Monitoring | User | Provision | CentralAdmin | Lyss | Registrar | Edge | PersistentChat | PersistentChatCompliance | CentralMgmt> -SqlServerFqdn <Fqdn> [-SqlInstanceName <String>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]] [-Report <String>] [-WhatIf [<SwitchParameter>]]

The command shown in Example 1 verifies the configuration of the Central Management database.

Test-CsDatabase -CentralManagementDatabase

Example 2 verifies all the Lync Server databases installed on the computer atl-sql-001.litwareinc.com.

Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "atl-sql-001.litwareinc.com"

In Example 3, verification is performed only for the Archiving database installed on the computer atl-sql-001.litwareinc.com. Note that the SqlInstanceName parameter is included to specify the SQL Server instance (Archinst) where the Archiving database is located.

Test-CsDatabase -DatabaseType "Archiving" -SqlServerFqdn "atl-sql-001.litwareinc.com" -SqlInstanceName "archinst"

The command shown in Example 4 verifies the databases installed on the local computer.

Test-CsDatabase -LocalService

The Test-CsDatabase cmdlet verifies connectivity to one or more Lync Server 2013 databases. When run, the Test-CsDatabase cmdlet reads the Lync Server topology, attempts to connect each of the relevant databases, and then reports back the success or failure of each attempt. If a connection can be made, the cmdlet will also report back such information as the database name, SQL Server version information, and the location of any installed mirror databases.

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 "Test-CsDatabase"}

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

 

Parameter Required Type Description

CentralManagementDatabase

Required

System.Management.Automation.SwitchParameter

Tests the configuration of the Central Management database. This parameter cannot be used in conjunction with the ConfiguredDatabases parameter or the DatabaseType parameter.

ConfiguredDatabases

Required

System.Management.Automation.SwitchParameter

Tests the configuration of all the Lync Server databases installed on the specified computer. You must include the SqlServerFqdn parameter when using the ConfiguredDatabases parameter. In addition, this parameter cannot be used in the same command as the CentralManagementDatabase or the DatabaseType parameters.

DatabaseType

Required

Microsoft.Rtc.Management.Deployment.DatabaseNameType

Type of database to be validated. Allowed values are:

Valid values for DatabaseType are:

Application

Archiving

CentralAdmin

CentralMgmt

Edge

Lyss

Monitoring

PersistentChat

PersistentChatCompliance

Provision

Registrar

User

LocalService

Required

System.Management.Automation.SwitchParameter

Validates all the databases used by any of the Lync Server services that are installed on the local computer. This includes not only locally-installed databases but also databases installed on remote computers, provided those databases are used by one or more local services.

SqlServerFqdn

Required

Microsoft.Rtc.Management.Deploy.Fqdn

Fully qualified domain name of the computer whether the databases to be validated are installed.

Confirm

Optional

System.Management.Automation.SwitchParameter

Prompts you for confirmation before executing the command.

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

SqlInstanceName

Optional

System.String

SQL Server instance where the databases to be validated are installed. For example:

-SqlInstanceName "rtc"

WhatIf

Optional

System.Management.Automation.SwitchParameter

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

None. The Test-CsDatabase cmdlet does not accept pipelined input.

The Test-CsDatabase cmdlet returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft