How to configure Multiple Environments

This guide will give you an overview of the setup, configuration, and use of the Multiple Environments functionality in Discovery Hub. 

For a more detailed guide, you can download the MULTIPLE ENVIRONMENT SETUP GUIDE in PDF format Here


This guide is divided into 4 Steps:

  1. Initial Server Setup
  2. Configure the Environments
  3. Create Additional Intermediate Environments
  4. Configure Global Databases
  5. Multiple Environment Transfer


Initial Server Setup

In order to implement multiple environments, you must first configure a few things:

Create a Repository Database for each Environment

You must create a new project repository database for each Environment. It can be helpful to follow a naming convention to clearly identify each database such as projectRepository_Dev | projectRepository_Test |projectRepository_Prod. These databases should reside on the associated environment server. To create another repository database:

    1. In Discovery Hub Tools Menu > Options > Project repository Tab
    2. Indicate the correct server name.

  1. Type the desired database name for this new repository.
  2. Click Create.


Create a Service User for Each Environment

Each Environment (except for Development) needs an individual "Log-on As" user. This is typically the same "service" user used to run the Scheduler service. This user will be initiating the deployment and execution operations triggered through other environments, therefore, needs to have DbCreator security permissions on all associated databases for that environment. (e.g. projectRepository, ODX, DSA, and MDW).

Configure the Server Service for each Environment

Each environment (except for Development) needs to have an instance of the Discovery Hub Server Service. You'll need to modify the service to use the "Log-on As" service created in the previous step. (Please note: you will be unable to start the service until you 1. Assign the service user to the associated environment's project repository[step below] and create the associated environment(s) in Discovery Hub. [step covered in the first video below])

One instance of the Discovery Hub Scheduler Service and Discovery Hub Server service are installed when installing the Server version (as opposed to "client") of Discover Hub, so you may not need to create a new service. However, if you are running two (non-dev) environments on the same machine, you will need to create another instance of the server service. To create an additional service:

  1. Discovery Hub Tools Menu > Windows Service Setup
  2. Options > Create Service
  3. Provide the necessary info for the service & click create. (You may need to complete the following step first.)

Assign Each Service User to the Associated Environment's Project Repository

When you start the Server service, the "Log-on As" user opens an instance of the TimeXtender.exe process (Discovery Hub without the UI) in the background. This process needs to know what repository to connect to. This can be done in 2 ways:

  1. Log onto the server as that service user, open Discovery Hub, and switch to the associated project repository.
  2. OR Modify the config file for that user to use the associated project repository database.
    1. In order to get this file to appear, you will need to start the service. It will fail but will create the file referenced below.
    2. Browse to C:\Users\username[service user for the associated environment]\AppData\Roaming\Discovery Hub Server\Discovery Hub server\[version number]\
      1. NOTE: If this path does not yet exist, Start the Server Service mentioned above. You will get a message saying "the service started then stopped unexpectedly." This is OK. Now the file path should be created. 
    3. Open Config.xml and note the settings in the ProjectConnectionString element.
    4. Change the "Data Source" and "Initial Catalog" properties to point to the project repository for that environment.
    5. Save and Close the file.

Once you have completed the initial setup, you should now be able to create the Environments in Discovery Hub, which we will cover in the following video. Please note, you will be unable to start the service until we create the environments.

Configure the Firewall

If configuring multiple environments across multiple servers it will be necessary to open the proper ports to allow Discovery Hub to communicate across the servers. This will depend on the ports you define for each environment. The below diagram is an example of a Development-Production configuration with the outbound and inbound firewall rules illustrated by orange arrows. 


Notice the Production Environment is specified in the Development server as a "remote" environment and in the Production server as a "local" environment. So when communicating across environments, Discovery Hub uses the "local port" of the "remote" environment for outgoing communication and the port of the "local" environment for incoming communication. 


Configure the Environments

Watch the following video to configure your environments in Discovery Hub.


  1. Create the Local Production Environment in the Production Repository
    1. Log into the Production Server
    2. Open Discovery Hub & switch to the Production Repository
    3. Open Environment Properties
    4. Create the "local" production environment.
  2. Start the Production Server Service (using the Production Service user)
  3. Create the Local Development Environment in the Development Repository.
    1. Log into the Development Server
    2. Open Discovery Hub & switch to the Development Repository
    3. Open Environment Properties
    4. Create the "local" development environment
  4. Create the Remote Production Environment in the Development Repository.
    1. In Environment properties, in the development repository & server.
    2. Create the "remote" Production Environment. 

The completed configuration of Development and Production should look something like this:



Create Additional Intermediate Environments

If you wish to create additional intermediate environments, you can do so by slightly modifying the previous instructions. For example, if you were to create a Test Environment you would follow these steps.

  1. Be sure to complete initial setup steps for this Environment.
  2. Create the Test Environment in the Test Repository (on the test server, if a separate server is being used).
  3. Create the Remote Production Environment in the Test Repository
  4. Start the Test Service (using the Test Service User)
  5. Create the Remote Test Environment from the Development Repository
  6. Adjust the Environment Sequence numbers by click in the environment name in the environment properties dialog.



Configure Global Databases

When using Multiple environments it's important to identify a separate set of databases (Data Sources, ODX, DSA, MDW etc.) for each environment. Discovery Hub uses Global databases as a way to define dynamic database connections that are configured on a "per-environment" basis. 

Watch the following video to learn how to configure global databases. 

  1. Review all the databases that exist in your project and note the desired SQL server names and database names to be used in each environment. (e.g. ODX/DSA/MDW)
  2. Create the Global Database in Environment Properties in the Development Environment.
  3. Define the Server & Database Name for Development.
  4. Define the Server & Database Name for Production.
  5. Create new databases as necessary by right-clicking on "settings" in the desired cell.
  6. Click OK to exit the Environment Properties Dialog
  7. Right click on the desired database in your project and click Edit Database
    1. Click: Use Global Database
    2. Select the created global database from the drop-down.
    3. 2018-08-17_12h09_45.png
  8. Repeat these steps for any databases or data sources that are environment specific.


Multiple Environment Transfer

Now that you have configured multiple environments you may want to promote your project to the next environment.

Initial Steps Prior to Environment Transfer

  1. Deploy & Execute your entire project in the previous environment. 
    1. This can identify any potentially unresolved bugs. 
  2. Prepare an Execution Package to run after the transfer. 
    1. If you have made changes to any Incremental tables, be sure to select those tables for full-load in this package. 
    2. Be sure you name the package so you and others know it's for a one-time use. 
  3. Stop the scheduler service in the destination environment. 
    1. This will ensure no scheduled executions begin during the transfer. 
  4. Ensure no execution packages are running in the destination environment. 

Watch the following video to see how to transfer a project to the next environment. 


  1. In the Development Environment, open Multiple Environment Transfer
  2. Click Transfer
  3. Deploy, Managed & Differential
  4. Run the desired Execution Package.


Was this article helpful?
1 out of 1 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.