Tests a database connection for the AdIdentity Service.
Syntax
Test-AcctDBConnection [-DBConnection] <String> [-LoggingId <Guid>] [-AdminAddress <String>] [<CommonParameters>]
Detailed Description
Tests a connection to the database in which the AdIdentity Service can store its state. The service will attempt to connect to the database without affecting the current connection to the database.
You do not have to clear the connection to use this command.
Parameters
-DBConnection<String>
Specifies the database connection string to be tested by the AdIdentity Service.
Required? |
true |
Default Value |
|
Accept Pipeline Input? |
false |
-LoggingId<Guid>
Specifies the identifier of the high-level operation this cmdlet call forms a part of. Citrix Studio and Director typically create high-level operations. PowerShell scripts can also wrap a series of cmdlet calls in a high-level operation by way of the Start-LogHighLevelOperation and Stop-LogHighLevelOperation cmdlets.
Required? |
false |
Default Value |
|
Accept Pipeline Input? |
false |
-AdminAddress<String>
Specifies the address of a XenDesktop controller the PowerShell snap-in connects to. You can provide this as a host name or an IP address.
Required? |
false |
Default Value |
Localhost. Once a value is provided by any cmdlet, this value becomes the default. |
Accept Pipeline Input? |
false |
Return Values
Citrix.Fma.Sdk.Utilities.Service.ServiceStatusInfo
The Test-AcctDBConnection command returns an object containing the status of the AdIdentity Service if the connection string of the specified data store were to be set to the string being tested, together with extra diagnostics information for the specified connection string.
DBRejectedConnection
The database rejected the logon attempt from the AdIdentity Service. This may be because the service attempted to log on with invalid credentials or because a database has not been installed in the specified location.
InvalidDBConfigured
The expected stored procedures are missing from the database. This may be because the AdIdentity Service schema has not been added to the database.
DBNotFound
The specified database could not be located with the configured connection string.
DBNewerVersionThanService
The version of the AdIdentity Service currently in use is incompatible with the version of the AdIdentity Service schema on the database. Upgrade the AdIdentity Service to a more recent version.
DBOlderVersionThanService
The version of the AdIdentity Service schema on the database is incompatible with the version of the AdIdentity Service currently in use. Upgrade the database schema to a more recent version.
DBVersionChangeInProgress
A database schema upgrade is currently in progress.
OK
The Set-AcctDBConnection command would succeed if it were executed with the supplied connection string.
Failed
The AdIdentity Service has failed.
Unknown
The status of the AdIdentity Service cannot be determined.
Notes
If the command fails, the following errors can be returned.
Error Codes
-----------
InvalidDBConnectionString
The database connection string has an invalid format.
PermissionDenied
You do not have permission to execute this command.
AuthorizationError
There was a problem communicating with the Citrix Delegated Administration Service.
ConfigurationLoggingError
The operation could not be performed because of a configuration logging error.
CommunicationError
There was a problem communicating with the remote service.
ExceptionThrown
An unexpected error occurred. For more details, see the Windows event logs on the controller or the XenDesktop logs.
Examples
-------------------------- EXAMPLE 1 --------------------------
c:\PS>Test-AcctDBConnection -DBConnection "Server=serverName\SQLEXPRESS;Initial Catalog = databaseName; Integrated Security = True"
OK
Tests a database connection string for the AdIdentity Service.
-------------------------- EXAMPLE 2 --------------------------
c:\PS>Test-AcctDBConnection -DBConnection "Invalid Connection String"
Invalid database connection string format.
Tests an invalid database connection string for the AdIdentity Service.