How to Enable Database Offline in Provisioning Services Farm

How to Enable Database Offline in Provisioning Services Farm

book

Article ID: CTX129173

calendar_today

Updated On:

Description

This article describes how to enable database offline support on a Provisioning Services farm.

Background

Database offline support allows Provisioning Services to cope with brief outages of the database server without affecting the currently running targets. It is not a substitute for a mirrored database setup and provides some resiliency.


Instructions

Complete the following steps to enable DBOffline support on a Provisioning Services farm:

  1. Using the Provisioning Services console, connect to the Provisioning Services farm. Right-click the farm and select Properties.

    User-added image

  2. Select the Options tab, and select Enable offline database support.

    User-added image

  3. Click OK. A new dialog box appears with the following message:
    "You will need to restart the Provisioning Services Stream Service on each server for offline database support change to take effect."

    User-added image

  4. Click OK.


    To enable DBoffline mode using PoSH you can use Set-PVSFarm, please refer: Cmdlets - Citrix Provisioning Services 2003 PowerShell with Objects Programmer’s Guide for complete options. 

     

Issue/Introduction

This article describes how to enable DBOffline support on a Provisioning Services farm and answers some FAQ's Regarding DBOffline Mode.

Additional Information

The following are some of the FAQs on DBOffline mode in Provisioning Services Farm:

​Q. How is DB offline mode triggered? 

A) When offline database support is enabled on the farm, a snapshot of the database gets created and initialized at server startup. Post which the Stream Process keeps on updating this copy of the database continuously. If the database becomes unavailable, the Stream Process uses this snapshot to get information about the Provisioning Server and the target devices available to the server because of which the provisioning Servers and target devices to remain operational. 

Q: How long can targets stay booted in DBOffline mode?

A: It is a best practice to restore the database connection as soon as possible. The DBOffline mode is meant to deal with interruptions and not to be run without a database. You should be able to reboot the target when the PVS server is in DBOffline mode. The only feature that will not work is the PVS console and any interfaces, this is by design, you cannot modify the database if you cannot communicate with it.

Q: Is there a connection between write cache and DBOffline mode?

A: The write cache fill up has nothing to do with DBOffline mode. In fact depending on the workload, applications and system setup will determine the uptime of the target and if you allow the write cache to fill up, this would occur with or without DBOffline. The write cache never fills up, only the local hard drive that contains the write cache file fills up and only if it is not sized properly for the workload. This is why it is very hard to determine what the correct size of the local cache drive should be because every workload and usage of the applications in the workload is different.   

Q: Is DBOffline state a viable method for dealing with WAN congestion, or is it strictly just to get around the database going down?

A: The DBOffline state is not a viable option for handling WAN congestion. The PVS relies on a network for its core functionality. The network should have the appropriate capacity to handle the traffic on it. There is a heavy dependency on the database, and repeated disconnections from the database will lead to errant behaviors (like hanging stream process). The DBOffline is a state to be avoided, and is really there as a last ditch, emergency effort.


Q. What features do not work when in DBoffline mode? 

A) The following features, options, and processes remain unavailable when the database connection is lost, regardless if the Offline Database Support option is enabled: 

  • AutoAdd target devices 
  • vDisk updates 
  • vDisk creation 
  • Active Directory password changes 
  • Stream Process startup 
  • Image Update service 
  • Management functions; PowerShell, MCLI, SoapServer and the Console 

 

Q. If network connectivity is up, but SQL is unresponsive, is this a scenario for "offline"? 

A) Yes , if your SQL is not responsive, it will be considered as offline. Any situational factor which could break the communication between the PVS servers and the Database would be considered as offline. Even if the MSSQLSERVER service is in stopped state on your db server, it would mark this as a offline to the PVS environment. 


Q. How does PVS Server come to know that it has lost the connectivity with the Database? 

A) DB Offline was designed so that targets already created and/or streamed can stay active or be booted when DB connectivity has been interrupted. The streamprocess is the only process that uses the DB Offline capability and it keeps a snapshot of the database in memory of all the necessary information to keep targets streamed and boot. If the streamprocess is restarted it loses all the information unless it can contact the DB. When offline the console and all other features of PVS will not function, offline mode is just to keep targets up and running it knows about. 
 

Q) Who does the heartbeat check to SQL server and what is the time interval between these checks with the database?

A) Streamprocess reports to the Database Server every 4 seconds and updates the internal data about every 60 seconds if anything has changed. 


Reference Articles:

https://docs.citrix.com/en-us/provisioning/current-release/advanced-concepts/managing-high-availability/ha-offline-db-config.html

https://support.citrix.com/article/CTX221364