Error: Database could not be contacted

Error: Database could not be contacted

book

Article ID: CTX137560

calendar_today

Updated On:

Description

Attempting to create new Desktop Group gives the following error:

“Database could not be contacted.”

Create Desktop Group

Resolution

To confirm if there is a new version for the database, run the following command lines in PowerShell started from Desktop Studio:

# Get-brokerinstalledDBversion –Upgrade

Two revisions will be visible, as displayed in the following screen shot: 

User-added image

Complete one of the following procedures to generate a new script using PowerShell:

  1. Start PowerShell from Desktop Studio PowerShell tab and use the example listed as a guideline:

    $schema = Get-BrokerDBVersionChangeScript -databasename XenDesktopDb -targetversion 5.6.0.2

    Note: The dollar sign ($) schema can be any variable name. The -databasename value represents the actual database name in the environment.

    $schema.script >c:\schema.sql

    Note: Schema.sql can be any name given to the sql script.

  1. Back up the database before running.

  1. Open SQL database and select XenDesktop Database.

  1. Go to SQL command mode and copy the contents of the SQL script created using instructions in Step 1 into Query Analyzer window and execute.

    Note: If successful, the message window of the query analyzer tool shows that the schema update was completed successfully.

  1. After the database update completes successfully, restart Desktop Studio to confirm that there is no longer any issues contacting the database.



Problem Cause

After implementing Hotfixes Update 4 or 5 for XenDesktop 5.6, the option for upgrading the database does not appear in Desktop Studio:

CTX138695 - Hotfixes Update 7 - For Citrix XenDesktop 5.6 Controller x64 - English

 

Issue/Introduction

This article provides resolution to fix the error: “Database could not be contacted.” that occurs when attempting to create new Desktop Group.

Additional Information

CTX128008 - How to Configure a XenDesktop 5 Site to Use an Existing SQL Database

CTX128748 - Best Practice for Upgrading XenDesktop 5.x Site

CTX138695 - Hotfixes Update 7 - For Citrix XenDesktop 5.6 Controller x64 - English

CTX138687 - Hotfixes Update 7 - For Citrix XenDesktop 5.6 Controller x86 - English