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 command line tool.

You can also use the /reset argument to reset the setting's values in all scopes and scope targets such as servers.

2. View the help page

On the server where Dundas BI is installed, open a command prompt or terminal and navigate to the tools folder containing the dt tool. For details, see Using the dt command line tool.

In the command prompt window, dt help setConfigValue (or ./dt.sh help setConfigValue on Linux) to get the help page for this command.

c:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1\tools>dt help setConfigValue
Dundas BI Tools version 8.0.2.1001-20210416211709
Copyright (c) 2021 Dundas Data Visualization, Inc. All rights reserved.

Sets the global value or resets all scope and target values of a configuration setting.

Syntax:
dt.exe setConfigValue [/appcs:<application database connection string>] [/appStorage:<application database server type>]
                      [/settingId:]<setting identifier> [/value:<new value>] [/reset]

  <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.
  <application database server type> - The application database server type. 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. Valid values: "SqlServer", "Postgres".
  <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. Specifying the argument name is optional.
  <new value> - The new value of the setting. Mandatory except when /reset argument is specified. The argument is optional.
  /reset - If specified, resets the setting to the default value in all its scopes and scope targets.

Basic Example:
dt.exe setConfigValue c6e739e5-a58a-49af-be1b-92b1f0fa62a2

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

c:\Program Files\Dundas Data Visualization Inc\Dundas BI\Instances\Instance1\tools>

3. 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.

3.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.

3.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.

4. 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';User ID=DundasUser;Password=********"

5. See also

Dundas Data Visualization, Inc.
400-15 Gervais Drive
Toronto, ON, Canada
M3C 1Y8

North America: 1.800.463.1492
International: 1.416.467.5100

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