Microsoft SQL Server Setup

This article is for general guidance. Always work with your DBA when setting up a production database. If you have any questions, contact Senzing Support . Support is 100% FREE!
When upgrading from Senzing v3 to Senzing v4, there are changes made to the entity repository database schema. See Upgrading the Senzing Repository Schema To V4

Prerequisites

Add the Senzing schema

If applicable, the DBA should set up the database schema. If you have any questions, contact Senzing Support . Support is 100% FREE!
sqlcmd -U g2user -S 127.0.0.1 -d G2 -i <senzing_project_path>/resources/schema/szcore-schema-mssql-create.sql
<senzing_project_path> refers to the path specified with the /opt/senzing/er/bin/sz_create_project command when creating a project.

Configure odbc.ini

Edit the /etc/odbc.ini file and add the following entry:

[MSSQL]
Driver = ODBC Driver 18 for SQL Server
Database = <database>
Server = <hostname>, 1433
1433 is the default SQL Server port number. Change this if the port value differs.

Configure the CONNECTION string

Edit the SENZING_ENGINE_CONFIGURATION_JSON environment variable or sz_engine_config.ini file :

Edit the new CONNECTION mssql://<username>:<password>@<server>:<port>:<database>/?driver=mssqldriver entry where:

Parameter Description
<username> SQL Server username
<password> Password for the above username
<server> IP address or hostname of the SQL Server
<port> Port number of the SQL Server
<database> Actual database name (not the DSN)
/?driver=mssqldriver Remove unless using custom driver
Azure SQL requires <port> also after <server>: mssql://<username>:<password>@<server>,<port>:<port>:<database>/?driver=mssqldriver

Update database with the Senzing ER configuration

A Senzing instance is configured with a Senzing Entity Resolution configuration. On a fresh installation this configuration needs to be registered in the Senzing database.

See Updating Database with Senzing ER Configuration

If you have any questions, contact Senzing Support. Support is 100% FREE!