[en] Database Connection String Replacement

Official translation unavailable. Translate this page with Google:

[en] Configuration file for Automation Service can include database connection string replacement commands.

[en] You can configure the service to replace certain parts of a connection string while the trigger is running. This enables a single instance of Automation to run the same configuration, but actually use a different database server for database related functionality. This allows the user to configure triggers in development environments and run them in production environment without any changes in the configuration.

[en] Connection string replacement logic is defined in the DatabaseConnections.Config file that is located in the Automation system folder.

%PROGRAMDATA%\NiceLabel\NiceLabel 10

[en] Configuration file defines from-to pairs using its XML structure. The <Replacement> element contains one <From> and one <To> element. During trigger execution, the "from" string is replaced with the "to" string. You can define as many <Replacement> elements as necessary.

[en] Configuration file is not installed along with Automation. You can add it yourself using structure from the example below. The same search & replace rules are applied to all triggers running in the Automation Service on this machine.

[en] To enable connection string replacement, you must also edit your product.config file that is located in %PROGRAMDATA%\NiceLabel\NiceLabel 10. Add the element /Common/General/UseLocalReplacementStrings and assign value True:

<?xml version="1.0" encoding="utf-8"?>


[en] Make sure you restart both Automation services after adding or editing the config files.