Prerequisites
This section describes the prerequisites that you must complete before adding a SQL Server destination connector in . It outlines the supported SQL Server versions and the recommended approach for creating a dedicated user account to support secure and reliable data replication.Version Support
supports connections to SQL Server 2008 (major version 10) and later.Creating a User
You can connect to SQL Server by using any SQL user account that has sufficient permissions. However, as a best practice, CData recommends that you create a dedicated SQL Server user specifically for data replication from the application. You can submit the following commands in SQL Server Management Studio to create a new SQL Server login and an associated database user named sync_user:Authenticate to SQL Server
After you add the connector, you need to set the required properties.- Server: Enter the host name or IP address of the server that hosts the SQL Server database. The default server is localhost.
- Port: Enter the port number for SQL Server. The default port value is 1433.
- Database: Enter the default database to which you want to connect when you connect to SQL Server.
- User: Enter the username that you use to authenticate to SQL Server.
- Password: Enter the password that you use to authenticate to SQL Server.
Complete Your Connection
To complete your connection:- For Trust Server Certificate, select whether you want to trust the server certificate. By default, the Enable checkbox is selected.
- Define advanced connection settings on the Advanced tab. (In most cases, though, you should not need these settings.)
- Click Create & Test to create your connection.
Data-Type Mapping
uses the following data-type conversions when it loads data into your SQL Server database:| CData Type | SQL Server Type | Notes |
|---|---|---|
| bigint | bigint | |
| binary | varbinary(<ColumnSize>) | If ColumnSize > 4000, ColumnSize = MAX |
| boolean | bit | |
| date | date | |
| decimal | decimal | |
| double | float | |
| float | float | |
| integer | int | |
| localdatetime | datetime2 | |
| smallint | smallint | |
| time | time | |
| timestamp | datetimeoffset | |
| varchar | nvarchar(<ColumnSize>) | If ColumnSize > 4000, ColumnSize = MAX |
Advanced Job Options
The following table lists advanced job options that are most frequently used with SQL Server destination connections. For a complete list of available job options, see Advanced Job Options.| Option Name | Default Value | Description |
|---|---|---|
| Command Timeout | 300 | Controls the timeout, in seconds, for destination connections. |
| Convert Date-Time Values to GMT | Not enabled | Converts all local date and time values to GMT before inserting them into the destination database. |
Always Encrypted Support
connects to SQL Server destinations by using the CData JDBC driver. The JDBC driver supportsAlways Encrypted columns, which enables to securely read and write data that is protected by client-side encryption.
When writes to Always Encrypted columns, the JDBC driver performs the required client-side encryption before the data is sent to the destination. This behavior allows encrypted columns to be included in replication workflows without causing write failures.
Common SQL Server Issues
When you connect to SQL Server destinations, you might occasionally encounter errors. Common errors and issues fall into the following categories:- timeout errors
- additional errors and issues