Skip to main content

Using custom .NET connection string parameters with the OutSystems Platform on SQL Server

OutSystems

Using custom .NET connection string parameters with the OutSystems Platform on SQL Server

 

Overview

OutSystems Platform uses .NET connection pooling to connect to SQL Server databases. This is done using System.Data.SqlClient.

By default, OutSystems only uses the parameters explicitly needed to connect (Data Source, Initial Catalog, and the clauses needed for authentication (either Integrated Security=true or a combination of User ID and Password). For everything else, OutSystems relies on defaults - and these work for almost all of the use cases. However, in certain scenarios, tuning may be needed in the form of customizing the connection string.

This article guides towards that customization. It explains where such customization can be made, and brings some alerts on what customization to avoid.

This article is not aimed at teaching how to fine-tune the connection strings. Unless advised for it by an expert on the matter, customers should leave the defaults provided by the platform.

Where and how to customize the connection string

The connection string is customized in the Configuration Tool.

Customization applies to all connection strings created by the platform (ADMIN, RUNTIME, LOG, SESSION and external database connections). You can choose, however, to customize between:

  • Runtime Applications: connection created by the platform in the context of an application. If you wish to customize the way your applications connect to the database, this is where to do it;
  • OutSystems Services: connections created by the services used by the platform (Deployment Controller, Deployment Service, Log Service, Scheduler Service, SMS Connector).

All connections use the same parameters in the connection string (except for the division above). It is not possible to specify different parameters for connection strings based on any other difference.
Specifically, different parameters by eSpace / Application or by front-end are not possible to configure with the Platform.

What customization can I use and what should I steer away from?

As a rule of thumb, any customization that is applied should be for the effect of performance tuning or changing the way the platform starts connections to the database.

Do not change the connection string in a way that affects the behavior of the connection - as it can break Platform behavior. For example, if you add a connection string parameters so that the connection becomes read-only, the platform will break as all connections of that type will become read-only, and the platform needs to write to the database in those profiles.

Final notes

As with any tuning or reconfiguration of a software system, changes to the connection string parameters should be correctly tested to ensure they produce the expected improvements without any unforeseen side effects. If in doubt, go back to the defaults.

Applies to

OutSystems Platform on-premises, version 9 and 9.1, .NET stack.