Microsoft SQL Server

Source and Destination Databases

Before you begin

Before you begin, gather this connection information:

  • Name of the server that hosts the database you want to connect to and port number

  • User name and password

  • Are you connecting to an SSL server?

  • Do you want to set the database isolation level to read uncommitted data?

Connect and set up the workspace

Launch Syntho and select Connect to a database, or under Create workspace, select SQL Server. For a complete list of data connections, select More under From database. Then do the following:

  1. Enter the name of the server you want to connect to.

  2. Enter the database name to connect to the contained database.

  3. If the server is password protected, you must enter the user name and password.

    Select the Require SSL check box when connecting to an SSL server.

  4. Select Create workspace. If Syntho can't make the connection, verify that your credentials are correct. If you still can't connect, your computer is having trouble locating the server. Contact your network administrator or database administrator.

Considerations & Limitations

  • Handling Sensitive Data in Encoded Images: The VARBINARY data type may be used to store encoded images, which can potentially include sensitive information. Due to the complexity of replicating synthetic twins of such images, our product, Syntho, replaces values stored in VARBINARY columns with a dummy character to ensure data privacy and integrity. This approach prevents the accidental leakage of sensitive data.

  • Identity Columns in Table Names with Dots: Table names with dots in their names are not supported when such tables contain identity columns. This limitation is due to the way the driver interprets table names with dots. These tables will have to be completely excluded from processing.

  • SQL Variant Data Type: Database columns with the data typesql_variant cannot use the key generation method "Duplicate". This is due to the way the used driver converts values. More details on the sql_variant data type can be found in the Microsoft Documentation.

  • JSON and XML types: For JSON and XML columns, it is recommended to disable any format validation in the destination database.

  • Timestamp Column Restrictions:

    • Foreign Key Constraints: Columns of the TIMESTAMP data type cannot be used as the target of foreign key (FK) constraints. This restriction stems from the nature of TIMESTAMP as a data type primarily used for version-stamping rows rather than linking rows across tables.

    • Primary Key Constraints: A TIMESTAMP column cannot be used as the sole primary key (PK) in a table. If a TIMESTAMP column is included in a primary key, it must be combined with one or more other columns.

    • For TIMESTAMPcolumns, the user should be aware that timestamps reflect the moment of writing to the destination database with values of the current system time.

Fast Execute Many

fast_executemany is an option in Microsoft ODBC drivers that allows for faster data writing to SQL Server databases by optimizing the execution of multiple insert statements. While it can significantly improve performance, it comes with some limitations, particularly around robust datatype handling.

This feature can be enabled via the workspace default settings. Hold CTRL + SHIFT + ALT + 0 to open the Workspace Default Settings and enable fast_executemany for SQL Server databases by setting its value to true.

"default_fast_executemany": true

Dropping and Recreating Indexes

Coming Soon

Tables with many indexes may experience blocking or halting during data writing without any error messages. In such cases, considering dropping indexes for that table can resolve the issue. Syntho has a feature called default_drop_indexes that introduces logic for dropping indexes before writing data to SQL Server tables and recreating them afterward. This process is managed on a per-table basis and is controlled by a new engine attribute. default_drop_indexes: A boolean attribute that determines whether indexes should be dropped before writing and recreated afterward. Default value is false and currently, only the MSSQL connector supports this feature.

Enabling Index Dropping

To enable this feature, hold CTRL + SHIFT + ALT + 0 to open the Workspace Default Settings menu. There, set the value to true for the default_drop_indexes.

default_drop_indexes = true

Permissions Required

To execute the DROP INDEX command, the following permissions are required:

  • ALTER Permission: At a minimum, ALTER permission on the table or view is required.

    • This permission is granted by default to the sysadmin fixed server role and the db_ddladmin and db_owner fixed database roles.

Limitations

  • Less Robust Datatype Handling: When enabled, fast_executemany may have less robust handling of certain datatypes, which can lead to issues. Due to these limitations and thorough testing to ensure compatibility with the data is advised.

Recommendations

  • Performance Testing: Before enabling this feature in a production environment, perform extensive testing to ensure that it does not adversely affect data integrity or application performance.

Supported data types

The below table indicates what's supported per generator type, and if any additional processing is performed by Syntho to successfully generate and write the data.

TypeAI-powered generationDuplicate / MaskProcessing

BIT

☑️

☑️

-

TINYINT

☑️

☑️

-

SMALLINT

☑️

☑️

-

INT

☑️

☑️

-

BIGINT

☑️

☑️

-

NUMERIC

☑️

☑️

-

DECIMAL

☑️

☑️

-

FLOAT

☑️

☑️

-

REAL

☑️

☑️

-

DATE

☑️

☑️

-

TIME

☑️

☑️

-

DATETIME

☑️

☑️

-

DATETIME2

☑️

☑️

-

SMALLDATETIME

☑️

☑️

-

DATETIMEOFFSET

☑️

☑️

-

CHAR

☑️

☑️

-

NCHAR

☑️

☑️

-

VARCHAR

☑️

☑️

-

NVARCHAR

☑️

☑️

-

TEXT

☑️

☑️

-

NTEXT

☑️

☑️

-

BINARY

☐️

☑️

-

VARBINARY

☐️

☑️

-

IMAGE

☐️

☑️

-

MONEY

☑️

☑️

-

SMALLMONEY

☑️

☑️

-

UNIQUEIDENTIFIER

`☐️

☑️

-

ROWVERSION

☐️

☐️

Completely excluded from writing

TIMESTAMP

☐️

☐️

Completely excluded from writing

XML

☐️

☐️

XMLs are written as \<blank>blank\</blank>

SQL_VARIANT

☐️

☑️

-

HIERARCHYID

☐️

☑️

-

GEOMETRY

☐️

☑️

-

GEOGRAPHY

☐️

☑️

-

Last updated