Topic Last Modified: 2014-02-21
Tests the configuration of the Lync Server 2013 databases. This cmdlet was introduced in Lync Server 2013.
Syntax
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 | Lyss | Registrar | Edge |
PersistentChat | PersistentChatCompliance | CentralMgmt |
SigninTelemetry | ActiveMonitoring> -SqlServerFqdn <Fqdn>
[-SqlInstanceName <String>] <COMMON PARAMETERS>
|
COMMON PARAMETERS: [-Confirm [<SwitchParameter>]]
[-Report <String>] [-WhatIf [<SwitchParameter>]]
|
Examples
Example 1
The command shown in Example 1 verifies the configuration of the Central Management database.
Copy Code | |
---|---|
Test-CsDatabase -CentralManagementDatabase |
Example 2
Example 2 verifies all the Lync Server databases installed on the computer atl-sql-001.litwareinc.com.
Copy Code | |
---|---|
Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn "atl-sql-001.litwareinc.com" |
Example 3
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.
Copy Code | |
---|---|
Test-CsDatabase -DatabaseType "Archiving" -SqlServerFqdn "atl-sql-001.litwareinc.com" -SqlInstanceName "archinst" |
Example 4
The command shown in Example 4 verifies the databases installed on the local computer.
Copy Code | |
---|---|
Test-CsDatabase -LocalService |
Detailed Description
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.
Parameters
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: ActiveMonitoring Application Archiving Edge Lyss Monitoring PersistentChat PersistentChatCompliance Provision Registrar SigninTelemetry 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. |
Input Types
None. The Test-CsDatabase cmdlet does not accept pipelined input.
Return Types
The Test-CsDatabase cmdlet returns an instance of the Microsoft.Rtc.SyntheticTransactions.TaskOutput object.