Create the DB connection profile

In the PowerServer project painter > Database page > Advanced tab, you can create various DB connection profiles which include database connections to be used in different environments, for example, database connections for the development environment, testing environment, production environment, etc.

Each DB connection profile will have a corresponding Applications.[DBConnectionProfile].json created in the PowerServer C# solution > ServerAPIs project > AppConfig for storing its settings such as database connection cache(s), transaction-to-cache mapping(s) etc. For example, the default Applications.json stores the settings of the "Default" connection profile, Applications.Test.json stores the settings of the "Test" connection profile, Applications.Production.json stores the settings of the "Production" connection profile.

You can then decide which connection profile to be used in the application by selecting the profile and clicking the Set as Current button. The name of the current profile will be stored to the "POWERSERVER_ENVIRONMENTTYPE" setting in the ServerAPIs project > AppConfig > AppConfig.json.

To create a new DB connection profile:

  1. Click New in the DB connection profile group.

  2. In the New DB connection profile dialog box, specify a name for the DB connection profile, for example, production.

    It is more efficient to create the new profile based on the settings of an existing one. You can select the clone option below and then select an existing profile to clone from.


    You can then decide which profile to be used in the application by selecting the DB connection profile and clicking the Set as Current button.