Database Replacements

Database replacement lets you change database connections for your labels, solutions, and Automation configurations when switching between multiple database servers.
Database replacements enable you to configure solutions in development environments and run those solutions in production environments without any database configuration changes inside the solutions.
Note
To configure database replacements, you must log on to Control Center as an Administrator.
Database connection string replacements let you configure solutions where parts of database connection strings change while solutions run with connected databases. After running database connection string replacements, your solution still uses the unchanged database configuration, but with a connection to a different database server.
You can use the database replacement option with all types of databases:
SQL
Oracle
MariaDB / MySQL
Access
Excel
CSV and other text files
Note
Database replacement is possible with solutions and configurations that run in Loftware Print, Loftware Web Client, and Automation.
Configuring database replacements define your "from-to" replacement pairs. Each replacement pair contains
To add new database replacements, open Control Center and go to
Administration >Database Replacements .Click
Add+ . TheDatabase replacements page opens.Type the
Replacement name . Make the name descriptive so you can easily find the replacement later.The
Find text field lets you search for the existingFrom
element of the replacement pair. This is the database connection string you are replacing.Type
Replace with . This is the<To>
element of the replacement pair. This is your final database connection string.Click
Save . Your new replacement is active and listed on theData replacement page.
Note
After you click
Example
Your action in Automation connects to mySQLServer
and myDatabase
. You want to update your database connection string to use the database NEW_myDatabase
on the server NEW_mySQLServer
.
You must define two replacements – the first changes the server name, and the second changes the database name.
1. Add the first replacement and name it
2. Type in the Data Source=mySQLServer
3. Type in the Data Source=NEW_mySQLServer
4. Add the second replacement and name it
5. Type in the Initial Catalog=myDatabase
6. Type in the Initial Catalog=NEW_myDatabase
Note
All database replacements are encrypted in the Control Center database. This ensures the secure replacement of sensitive data, such as user names, passwords, and network addresses.
Database replacement ensures that your solutions and configurations connect to the right databases both in a test environment and in production.