Configuring databases

The IFS OData Connector can use sqlite (default) Sql Server or Postgres as database for its internal data. It can (but does not have to) use a separate database for it's communication logs.

This is controlled via the appsettings.xml file with on-premises hosting and typically via app service configuration when hosting in Azure. If any of these values are changed, the service must be restarted for them to have an effect.

DbKind controls what kind of database to use for everything except communication logs, allowed values: sqlite,sqlserver,postgres

DbKindCommLog controls controls what kind of database to use for http communication logs.

ConnectionStrings, LocalDb and CommLogDb respectively must be a valid connection string to selected database.

If DbKindCommLog and CommLogDb connection strings are not defined, the DbKind and LocalDb database settings will be used for communication logs as well as other data.

Example with communication log stored in sql server and other data in sqlite. Other parts of appsettings.xml omitted for clarity.

 <DbKind>sqlite</DbKind>
 <DbKindCommLog>sqlserver</DbKindCommLog>
	
 <ConnectionStrings>
     <LocalDb>Data Source=db.db</LocalDb>
     <CommLogDb>Server=databaserServerX;Database=commlog;User Id=dbuser;Password=secret;Encrypt=False</CommLogDb>
 </ConnectionStrings>

Last updated