Database Connection Issues in XenDesktop and Provisioning Services

Database Connection Issues in XenDesktop and Provisioning Services

book

Article ID: CTX200088

calendar_today

Updated On:

Description

When adding a Delivery Controller to a site, the following error appears in the XenDesktop studio:

“The services could not connect to the database.

Possible reason for message:

The database server may not be allowing remote connections. Ensure the database server is setup correctly and that the firewall is not blocking connections.

User-added image

Streaming fails in Provisioning Services (PVS) and the following error is reported in Event logs of PVS server:

User-added image

User-added image

Stream Process Logs

2014-01-31 22:54:18,067         [0x00000d8c]    INFO    Database initialization complete, connection pools are established
2014-01-31 22:54:18,067         [0x00000d8c]    INFO    Database has been ONLINE but last attempt to get a connection failed and pool is being invalidated.  Database will now be OFFLINE
2014-01-31 22:54:18,067         [0x00000d8c]    ERROR   CSSProtocolModule::DoTraceEvent DbAccess error: <The connection to the database failed. Network connection may be down.> <-31758> (in ServerGetByNameFromDb() called from .\SSProtocolModule.cpp:265)
2014-01-31 22:54:18,067         [0x00000d8c]    ERROR   CSSProtocolModule::DoTraceEvent StreamProcess is terminating because it cannot locate server record for TULSRVCTXPVS03.
2014-01-31 22:54:18,110         [0x00000d8c]    INFO    Process ID 4716
2014-01-31 22:54:18,110         [0x00000d8c]    INFO    Terminating (ExitInstance) StreamProcess 6.1.18.1236

Resolution

To resolve this issue, either change the PVS SQL port in the configuration wizard, or reconfigure the SQL server to the default port. To change the port in PVS, simply run the configuration wizard and on the SQL configuration page, change the port as shown below

User-added image

Alternatively, it is possible to reconfigure the SQL port on the SQL server.

Note: By default, the TCP communication with the SQL service is on Port 1433. However, in case the SQL service is running on a dynamic port, then this issue is observed.

  1. Check if Telnet is working on port 1433. If it fails, then configure sqlservice.exe to use port 1433 and switch on the Windows service known as SQL Server Browser and start the service.

  2. In the Windows firewall, enable incoming port TCP 1433.

  3. In SQL Server Configuration Manager, enable TCP/IP protocol for port 1433, as displayed in the following screen shot.

    User-added image

  1. Set TCP port =1433, TCP dynamic port = 0 for All IPs and IPv4.

  2. Start Task Manager.

  3. Under the Processes tab, check the PID of sqlservice.exe.

  4. Corresponding to the PID, check the TCP port being used by using cmd netstat -o on the cmd prompt.

    Confirm that sqlservice.exe is running on the correct port (1433).

     


Problem Cause

A previously working connection with the DB is no longer successful. The database server is responding to pings and the normal SQL health checks on the database server pass. The account trying to connect to the DB has DBowner permissions and is not locked out but still connection to the DB fails.  This can be caused by the SQL port being changed unexpectedly.

Issue/Introduction

This article provides a resolution to the Database Connection Issues in XenDesktop and Provisioning Services (PVS).

Additional Information

CTX129434 - Desktop Deployment Fails during Database Selection