SQL Server as Destination
1. Applicable Scenarios
This document applies to scenarios where you migrate a DTS-supported data source to an SQL Server destination using Baidu AI Cloud’s Data Transmission Service DTS.
2 Restrictions on Using SQL Server Database as destination
- Data migration is only available at SQL Server as the source end
3 Prerequisites for SQL Server Database as DTS destination
3.1 Environment Requirements
DTS allows you to apply SQL Server 2012-2019 version of the self-built database as a destination.
3.2 Requirements for Privilege of Database Account
destination:
Database | Structure Migration, Total Migration, and Increment Migration |
---|---|
Self-built SQL Server Database | At least db_owner (read-write) privilege |
4 Application of SQL Server Database as a DTS destination
For the operation processes, including task creation, task configuration, pre-check, task start, task pause, and task termination during the use of the SQL Server database a destination, see Best Practice Documentation. It is slightly different from other data sources in the task configuration parameters and object mapping parts.
4.1 Task Configuration Parameters
As shown in the figure above, you can build an SQL Server instance via the public network at the destination of DTS. The instructions for configuration parameters at the SQL Server destination are as follows:
- Access Type: The self-built SQL Server instance that supports Public Network/BCC/BBC/DCC
- **Data Type:** Regularly choose the SQL Server
- IP/Port: The access IP and service port of a self-built SQL Server database
- Database: The database name to be migrated in the self-built SQL Server database
- Account: The account of the self-built SQL Server database
- Password: The password corresponding to the database account
4.2 Object Mapping
SQL Server is a three-level schema. When you migrate data from the source end of the two-level schema to SQL Server, you need to map the database name at the source end as the schema name at the destination via DTS. DTS provides a database table name mapping feature for you to choose. As shown in the following figure, the selected migration objects may appear in the selected objects' list on the right side. DTS supports the upstream and downstream database table name mapping, the column filtering of blacklist/whitelist, and other features. You can click “Edit” to configure the mapping and filtration rules for each migration object.
After you finish the mapping configuration of the objects, click Save and Pre-check to start the Pre-check of the task.
5 SQL Server destination Data Types Supported by DTS
The following table lists the default mapping between the DTS-supported data types and the SQL Server destination data types.
For any information on how to view the data types mapped at the source end, see the Data Type Mapping of Source-end Data Sources.
DTS Field Type | SQL Server Data Type |
---|---|
DTS_TYPE_INT1 | smallint |
DTS_TYPE_INT2 | smallint |
DTS_TYPE_INT4 | int |
DTS_TYPE_INT8 | bigint |
DTS_TYPE_NUMBER | decimal |
DTS_TYPE_FLOAT | real |
DTS_TYPE_DOUBLE | float |
DTS_TYPE_BYTES | varbinary |
DTS_TYPE_DATE | date |
DTS_TYPE_TIME | If the number of decimal digits is =>0 and <=7, use the time; if not, use the nvarchar |
DTS_TYPE_DATETIME | If the number of decimal digits is =>0 and <=7, use the datetime2; if not, use the nvarchar. |
DTS_TYPE_STRING | nvarchar |
DTS_TYPE_BOOLEAN | bit |