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.
Streaming fails in Provisioning Services (PVS) and the following error is reported in Event logs of PVS server:
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
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
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.
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.
In the Windows firewall, enable incoming port TCP 1433.
In SQL Server Configuration Manager, enable TCP/IP protocol for port 1433, as displayed in the following screen shot.
Set TCP port =1433, TCP dynamic port = 0 for All IPs and IPv4.
Start Task Manager.
Under the Processes tab, check the PID of sqlservice.exe.
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).
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.