Set a configuration value from the command line

Contents[Hide]

1. Overview

This article shows you how to set the value of a configuration setting in the Global scope using the dt.exe command line tool.

You can also use dt to perform other useful tasks such as resetting the admin password or running a health check on the application.

2. View the help page

On the server where Dundas BI is installed, open a Command Prompt window and navigate to the tools folder. By default, this folder location is:

C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\{InstanceName}\tools

In the command prompt window, type dt help setConfigValue to get the help page for the setConfigValue command.

C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1>dt help setConfigValue
Dundas BI Tools version 4.0.0.1
Copyright (c) 2017 Dundas Data Visualization Inc. All rights reserved.

Sets the global value of a configuration setting.

Syntax:
dt setConfigValue [/appcs:<application database connection string>] /settingId:<setting identifier>
                  /value:<new value>

  <application database connection string> - The application database connection string. If not specified, the value will be taken from the dbi.config file located in the App_Data folder specified in the dt.exe.config file. The argument is optional.
  <setting identifier> - A string identifying the configuration setting. This may be the setting ID (in the case of core or extension settings), or for other settings in the format "moduleId:settingName". The argument is mandatory.
  <new value> - The new value of the setting. The argument is mandatory.

Example:
dt setConfigValue /appcs:"Data Source=localhost; Initial Catalog=DundasApp; Integrated Security=True" /settingId:c6e739e5-a58a-49af-be1b-92b1f0fa62a2 /value:"abc"

3. Get the connection string

Determine the SQL database connection string that your instance of Dundas BI is configured with. You can find this information from the dundasBIConnection.config file, which is located here by default:

C:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\{InstanceName}\www\BIWebsite\App_Data

If the connection string is encrypted, use the following command in the Command Prompt to decrypt it:

dt connectionConfig decrypt

4. Get the setting identifier

You can specify the setting identifier in two ways:

  1. As the ID of the setting.
  2. As a string in the form of moduleID:settingName.

4.1. Setting ID

Each configuration setting has a unique ID (GUID string). For example, the ID of the Data Warehouse Connection String setting is 5C42F315-99B5-4AEE-ADDF-3783E0841571.

You can find the IDs of other Core configuration settings by looking at the remarks of the members from the CoreConfigSettingIds Class.

4.2. Module ID

Some settings are loaded via a module and require the module ID to be identified (for example, settings defined in a hosting application such as DBI Web App).

The possible modules are Core, Web, or an extension. You can find the module ID of each extension using the API.

5. Run dt

At the command prompt, enter the following:

dt setConfigValue /appcs:"your connection string" /settingId:ID of config setting /value:"new config value"

Example showing how to set the Data Warehouse Connection String setting using dt:

dt setConfigValue /appcs:"Data Source=SERVER1\;Initial Catalog='DundasBI_AppDB';Integrated Security=True" /settingId:5C42F315-99B5-4AEE-ADDF-3783E0841571 /value:"Data Source=SERVER1\;Initial Catalog='DundasBI_WarehouseDB';Integrated Security=True"

6. See also

Dundas Data Visualization, Inc.
500-250 Ferrand Drive
Toronto, ON, Canada
M3C 3G8

North America: 1.800.463.1492
International: 1.416.467.5100

Dundas Support Hours: 7am-6pm, ET, Mon-Fri