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 Create workspace. Then select Microsoft SQL Server from Type under The connection details. For a complete list of data connections, click Type under The connection details. Then do the following:

  1. Enter the name of the server that hosts the database that you want to connect to.

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

  3. Enter the port number.

  4. Enter user name and password.

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

  5. Select Next. 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 type sql_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 TIMESTAMP columns, 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.

Data Type
AI-powered Generation
Mockers
Mask
Calculated Columns
Other

BIT

False

False

False

-

DATE

False

-

TIME

False

-

DATETIME

False

-

DATETIME2

False

-

SMALLDATETIME

False

-

DATETIMEOFFSET

True*

True*

True*

True*

-

BINARY

False

False

False

False

-

VARBINARY

False

False

False

False

-

IMAGE

False

False

False

False

-

SMALLMONEY

-

UNIQUEIDENTIFIER

False

False

-

ROWVERSION

False

False

False

False

Completely excluded from writing

TIMESTAMP

False

False

False

False

Completely excluded from writing

XML

False

False

False

False

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

SQL_VARIANT

False

True*

True*

True*

-

HIERARCHYID

False

True*

True*

True*

-

GEOMETRY

False

False

False

-

GEOGRAPHY

False

False

False

-

*Some data types are not actively supported; however, certain generators such as AI synthesize, mask, mockers, or calculated columns may still show 'True' for these fields. This means the generators can be applied, even though the types are not actively supported. Duplication is fully supported for these data types.

Last updated

Was this helpful?