Why a connection string
The ODM engine needs a connection string to:
- locate the database server
- use correct database
- use appropriate credentials to perform operations in ODM tables.
Why storing the connection string
Since the ODM synchronization engine (internal to DataHub) processes entity change events, it is mandatory to permanentely store the ODM connection, making it available to the synchronization engine any time.
Note
Remember that the storage is per DataHub account
Every connection string is encrypted in the DataHub storage to enforce security.
How to store the connection string
The ODM API provides the necessary endpoints to manage the connection string storage
Typical ODM database configuration
One of the most ODM database configuration consists of a single SqlServer database, one login/user/schema per account reuiring ODM synchronization.
Let's take an example with account 123 needing ODM synchronization:
- Create database [DataHub-ODM]
- Create database login in [master] database
use [master]
CREATE LOGIN [ODM-123-LOGIN] WITH PASSWORD='password', DEFAULT_DATABASE=[DataHub-ODM], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
use [DataHub-ODM]
CREATE SCHEMA [ODM-123-SCHEMA]
CREATE USER [ODM-123-USER] FOR LOGIN [ODM-123-LOGIN] WITH DEFAULT_SCHEMA = [ODM-123-SCHEMA]
ALTER AUTHORIZATION ON SCHEMA::[ODM-123-SCHEMA] TO [ODM-123-USER]
CREATE TABLE [ODM-123-SCHEMA].[DataHubFeedback] (
Date DateTime,
Level char,
TableName varchar(50),
Message nvarchar(2000)
)
The ODM synchronization engine will insert rows in DataHubFeedback table to give feedback to the customer about the synchronization operations