-
-
Cloud Connector Standalone Citrix Secure Ticketing Authority (STA) service
-
-
-
Upgrade the database and site
-
-
-
-
-
This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
Upgrade the database and site
You upgrade the database and the site after you upgrade the Delivery Controllers. For the high-level overview, see Step 8: Upgrade database and site.
Check Verify your permissions for the permissions required to update the schema of the SQL Server databases. Choose an upgrade method based on your database permissions:
- Automatic upgrade. If you have permission to update the SQL Server database schema, run an automatic upgrade. See Upgrade the database and site automatically.
-
Manual upgrade. If you do not have those permissions, run a manual upgrade that uses scripts. Work with your database administrator, who has the required permissions. See Upgrade the database and site manually.
In a manual upgrade, tasks are split between two roles:
- The Site Manager user generates the scripts. The user then runs the scripts that enable and disable services.
- The database administrator runs the scripts that update the database schema. The administrator uses the SQLCMD utility or SQL Server Management Studio in SQLCMD mode.
Note:
In a multi-zone deployment, run the automatic dbschema upgrade in the same zone that hosts the site’s SQL Server databases. Otherwise, the automatic upgrade might fail.
Before you upgrade, back up the database. See CTX135207. During a database upgrade, product services are disabled. During the disabled period, Controllers cannot broker new connections for the site, so plan carefully.
Review database schema upgrades
When you update your deployment, several database schemas can be upgraded. The following table lists the schemas that are upgraded:

The table uses these terms:
- Site: The Site Datastore. The schema update is made to the Site Datastore.
- Monitor: The Monitor Datastore. The schema update is made to the Monitor Datastore.
- Config: The Configuration table. The Studio version, licensing information, or both are updated in the Configuration table.
- Logging: The Logging Datastore. The schema update is made to the Logging Datastore.
Upgrade the database and site automatically
You can upgrade the database and site automatically using Site Manager or the PowerShell SDK cmdlet.
Upgrade automatically using Site Manager
- Launch Site Manager on the upgraded Delivery Controllers.
- Indicate that you want to start the site upgrade automatically and confirm that you are ready.
Upgrade automatically using the PowerShell cmdlet
As an alternative to using Site Manager, use the PowerShell SDK cmdlet Update-XDSite to automatically upgrade the database and site. For more information, see Citrix Virtual Apps and Desktops SDK Guide.
- On the second Delivery Controller, open a PowerShell session.
- Run the
Update-XDSitecmdlet.
The cmdlet automatically detects all components that require upgrading and performs the following actions:
- Disconnects database connections, updates the necessary database tables, and reconnects services. If the database was already upgraded by other scripts or standalone tools, this step is skipped.
- Runs any additional upgrade steps required for the environment. Global-level upgrades that are already complete are skipped.
Upgrade the database and site manually
- Launch Site Manager on the upgraded Delivery Controllers.
- Indicate that you want to upgrade the site manually. The wizard checks for License Server compatibility and requests confirmation.
-
Confirm that you have backed up the database.
The wizard generates and displays the scripts and a checklist of upgrade steps. If a database’s schema has not changed since the product version being upgraded, that script is not generated. For example, if the logging database schema does not change, the
UpgradeLoggingDatabase.sqlscript is not generated. -
Run the following scripts in the order shown.
-
DisableServices.ps1: The Site Manager user runs this PowerShell script on a Controller to disable product services. -
UpgradeSiteDatabase.sql: The database administrator runs this SQL script on the server containing the Site database -
UpgradeMonitorDatabase.sql: The database administrator runs this SQL script on the server containing the Monitor database. -
UpgradeLoggingDatabase.sql: The database administrator runs this SQL script on the server containing the Configuration Logging database. Run this script only if this database changes (for example, after applying a hotfix). -
EnableServices.ps1: The Site Manager user runs this PowerShell script on a Controller to enable product services.
After the database upgrade completes and product services are enabled, Site Manager automatically tests the environment and configuration, and then generates an HTML report. If problems are identified, you can restore the database backup. After resolving issues, you can upgrade the database again.
-
- After completing the checklist tasks, click Finish upgrade.
Replace SQL Server Express LocalDB
Microsoft SQL Server Express LocalDB is a feature of SQL Server Express that Local Host Cache uses on a standalone basis. Local Host Cache does not require any components of SQL Server Express other than SQL Server Express LocalDB.
When upgrading Delivery Controllers to Citrix Virtual Apps and Desktops version 2203 LTSR or later versions, the supported version is SQL Server Express LocalDB 2019 or SQL Server Express LocalDB 2022.
There are two ways of updating SQL Server Express LocalDB:
Automatic update
When you upgrade Delivery Controllers, the metainstaller automatically installs the latest compatible version of the SQL Server Express LocalDB. The metainstaller does not uninstall the old LocalDB version. You must manually uninstall the old version after you confirm the new version works correctly.
Verify new SQL Server Express LocalDB installation
Before uninstalling the old version, verify that the new SQL Server Express LocalDB installation is working correctly:
-
Use Command Prompt to navigate to the SqlLocalDB instance:
- For SQL LocalDB 2014:
cd C:\Program Files\Microsoft SQL Server\120\Tools\Binn - For SQL LocalDB 2017:
cd C:\Program Files\Microsoft SQL Server\140\Tools\Binn - For SQL LocalDB 2019:
cd C:\Program Files\Microsoft SQL Server\150\Tools\Binn - For SQL LocalDB 2022:
cd C:\Program Files\Microsoft SQL Server\160\Tools\Binn
- For SQL LocalDB 2014:
-
Run
SqlLocalDB i.You must see two files: CitrixHA and MSSQLLocalDB.
Manual update
Prerequisites
- The Citrix Virtual Apps and Desktops installation media.
- The PsExec tool from the Windows Sysinternals toolbox.
Procedure
- Complete the upgrade of your Citrix Virtual Apps and Desktops components, databases, and site. (Those database upgrades affect the site, monitoring, and configuration logging databases. They do not affect the Local Host Cache database that uses SQL Server Express LocalDB.)
- Log on to the Delivery Controller, where you would like to update SQL Server Express LocalDB.
- Download PsExec from Microsoft and place it in an easily accessible location on that Delivery Controller, such as C:\Temp.
- Stop the Citrix High Availability Service on the Delivery Controller from the Windows System Services.
-
Open the Command Prompt on the Delivery Controller, navigate to the location with PsExec (example,
C:\Temp), and then run the following command to elevate the command prompt with the Network Service account:psexec -i -u "NT AUTHORITY\NETWORKSERVICE" cmd <!--NeedCopy--> - Run
whoamito confirm that the command prompt is running as the Network Service account. You must get the following output:nt authority\networkservice. -
Use the command prompt to navigate to the SQL LocalDB instance:
-
If upgrading from SQL LocalDB 2014:
cd "C:\Program Files\Microsoft SQL Server\120\Tools\Binn" <!--NeedCopy--> -
If upgrading from SQL LocalDB 2017:
cd "C:\Program Files\Microsoft SQL Server\140\Tools\Binn" <!--NeedCopy--> -
If upgrading from SQL LocalDB 2019:
cd "C:\Program Files\Microsoft SQL Server\150\Tools\Binn" <!--NeedCopy-->
-
-
Stop and delete the SQL LocalDB instance:
CitrixHA.SqlLocalDB stop CitrixHA SqlLocalDB delete CitrixHA <!--NeedCopy--> -
Remove the following files from the Delivery Controller:
C:\Windows\ServiceProfiles\NetworkService\HADatabaseName.* C:\Windows\ServiceProfiles\NetworkService\HADatabaseName_log.* C:\Windows\ServiceProfiles\NetworkService\HAImportDatabaseName.* (if exists) C:\Windows\ServiceProfiles\NetworkService\HAImportDatabaseName_log.* (if exists) <!--NeedCopy--> - Uninstall your existing SQL LocalDB SQL Server Express from the Delivery Controller using the native Windows feature for removing programs.
- Reboot the Delivery Controller after the uninstallation is complete.
- Stop the Citrix High Availability Service on the Delivery Controller from the Windows System Services.
- Mount the Citrix Virtual Apps and Desktops installation media to your Delivery Controller.
-
Install SQL Server Express LocalDB 2022 as an administrator on the Delivery Controller.
- Use the
sqllocaldb.msifile in theSupport > SQLLocalDBfolder of the Citrix Virtual Apps and Desktops installation media. For example, if the installation media is mounted to theE driveletter, the file can be found atE:\Support\SQLLocalDB\sqllocaldb.msi. A restart is required to complete the installation. - The new SQL LocalDB must be in
C:\Program Files\Microsoft SQL Server\160\Tools\Binn.
- Use the
- Start the Citrix High Availability Service on the Delivery Controller from the Windows System Services.
-
In the Command Prompt of the Delivery Controller, navigate to
C:\Program Files\Microsoft SQL Server\160\Tools\Binnand runSqlLocalDB ito confirm that the CitrixHA instance was created. TheCitrixHAmust be included in the list of instances returned.Note:
It can take up to 15 minutes for the CitrixHA database to be created after starting the Citrix High Availability Service.
-
Ensure that the Local Host Cache database files are created to confirm that the High Availability Service (secondary broker) can take over if needed.
- On the Delivery Controller, browse to
C:\Windows\ServiceProfiles\NetworkService. - Verify that
HaDatabaseName.mdfandHaDatabaseName_log.ldfare created.
- On the Delivery Controller, browse to
- Repeat the steps on the remaining Delivery Controllers.
Share
Share
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.