tencent cloud

Feedback

Migration Operation Guide

Last updated: 2024-09-25 14:34:56

    Operation scenarios

    This document provides operation guidance for migrating data from SQL Server to TencentDB for SQL Server using the DTS data migration feature.

    Preparations

    1. Please carefully read the Usage Instructions to understand the feature constraints and precautions.
    2. In advance, ensure the access path between DTS and the database is established according to the access type you need. For details, refer to Network Preparation Work.
    IDC self-built database: You can choose "Public Network/Direct Connect/VPN Access/Cloud Connect Network (CCN)" as the access type.
    Self-built databases on cloud virtual machine (CVM): Choose "Self-Built on CVM" as the access type.
    TencentDB instances: Select "TencentDB" as the access type.
    3. The service where the source database is located must have the file-sharing port 445 enabled.
    4. The source database must be set to "Full Recovery Mode", and it is recommended to make a full backup before migration.
    5. The local disk space of the source database must be large enough to accommodate the size of the database to be migrated.
    6. When the source instance is a non-TencentDB for SQL Server instance (self-built instance on Public Network/CVM) or a TencentDB for SQL Server Basic Edition instance, the target end must use an account with sysadmin permissions for migration and be able to run the xp_cmdshell stored procedure. When the source instance is a TencentDB for SQL Server High Availability Edition or Cluster Edition instance, there are no permission restrictions on the target end account.
    7. The SQL service startup account on the migration source needs to be changed to the built-in account Local System. There are no restrictions on the account of the source database to be migrated, but it must have sysadmin permissions.
    
    As shown in the figure, start the SQL service on the migration source. In the startup configuration, select Log on as, select Built-in account, and change it to Local System startup.
    Note:
    After modifying the account, you need to restart the SQL server service.

    Environment Requirements

    Note:
    The following environment requirements will be automatically checked by the system before starting the migration task. The system will report an error for requirements not met. If users can identify the issue, they can refer to Verification Item Check Requirements to make necessary modifications by themselves. If not, wait for the system check to complete and then follow the error prompts to make the necessary modifications.
    Type
    Environmental Requirements
    Source Database Requirements
    The service where the source instance is located needs to have the file-sharing port 445 enabled.
    The source and target databases' networks must be interconnected.
    The server where the source database is located must have sufficient outbound bandwidth; otherwise, the migration rate will be affected.
    Target Database Requirements
    Only migration from Basic Edition to High Availability Edition (including Dual-Server High Availability Edition and Cluster Edition) is supported, and the version number of the target instance must be later than that of the source instance.
    The target database cannot have databases with the same name as those in the source database.
    The disk space of the target database must be larger than the size of the source database, specifically 1.5 times the size of the source database.
    The target database cannot have access requests or active businesses; otherwise, the migration will fail.

    Migration Operation

    1. Log in to DTS console, select Data Migration on the left navigation bar, and click Create Migration Task to enter the Create Migration Task page.
    2. On the Create Migration Task page, select the source instance type and region, the target instance type, region, specification, etc., and then click Buy Now.
    Configuration Item
    Description
    Source instance type
    Please select according to your source database type. Once purchased, it cannot be modified. For this scenario, select "SQL Server".
    Source instance region
    Select the source database region. If the source database is a self-built one, select a region nearest to it.
    Target instance type
    Please select according to your target database type. Once purchased, it cannot be modified. For this scenario, select "SQL Server".
    Target instance region
    Select the target database region.
    Specification
    Currently, only the fixed specification Medium is supported.
    3. On the Set Source and Target Database page, complete task settings, source database settings, and target database settings. Once the connectivity test between the source and target databases is passed, click Create.
    Note:
    If the connectivity test fails, troubleshoot and fix the issues as prompted in the Repair Guidance, then try again.
    Settings Type
    Configuration Item
    Description
    Task configuration
    Task name
    Set a business-significant name for easy task identification.
    Running node
    Execute immediately: Starts the task immediately after task validation is passed.
    Scheduled execution: A task execution time must be configured, and the task will start when the time is reached.
    Tag
    Tags are used to manage resources by category from different dimensions. If the existing tags do not meet your requirements, please go to the Console to manage tags.
    Source database settings
    Source database type
    The source database type selected at the time of purchase. It cannot be modified.
    Region
    The source database region selected at the time of purchase. It cannot be modified.
    Access type
    Please choose according to your scenario. This scenarios takes "TencentDB" as an example. For preparation work of different access types, please refer to Preparation Overview.
    Public network: The source database can be accessed via a public network IP.
    Self-Built on CVM: The source database is deployed on Tencent CVM.
    Direct connect: The source database can be connected to Tencent Cloud Virtual Private Cloud (VPC) via direct connect.
    VPN access: The source database can be connected to Tencent Cloud VPC via VPN connections.
    TencentDB: The source database is a TencentDB instance.
    CCN: The source database can be connected to Tencent Cloud VPC via Cloud Connect Network.
    Cross-account/intra-account
    This Account: The source database instance and the target database instance belong to the same Tencent Cloud root account.
    Cross-account: The source database instance and the target database instance belong to different Tencent Cloud root accounts. The following takes intra-account migration as an example. For cross-account operations, please refer to TencentDB Cross-Account Migration Guide.
    Database instance
    Select the instance ID of the source database.
    Account
    The account of the source SQL Server database. The account must have the required permissions.
    Password
    The password of the source SQL Server database account.
    Target database settings
    Target database type
    The target database type selected at the time of purchase. It cannot be modified.
    Region
    The target database region selected at the time of purchase. It cannot be modified.
    Access Type
    Select according to your scenario. For this scenario, select "TencentDB".
    Database instance
    Select the instance ID of the target database.
    Account
    The database account of the target database. It must have the required permissions.
    Password
    The password of the target database account.
    4. On the Set migration options and select migration objects page, configure the migration type and object, and click Save.
    
    Configuration Item
    Description
    Migration type
    Please choose according to your scenario.
    Full migration: The entire database is migrated. The data to be migrated includes only the existing content of the source database at the time of task initiation and does not include the incremental data written to the source database after the task initiation.
    Full + incremental migration: The data to be migrated include the existing content of the source database when the task is initiated as well as the incremental data written to the source database after the task is initiated. If there are data writes to the source database during migration, and you want to smoothly migrate the data in a non-stop manner, select this option.
    Migration object
    Only database-level migration is supported, meaning that all objects in the specified database need to be migrated together. Select the database to be migrated from the source database objects, then move it to the Selected Object box.
    5. On the Verify task page, verify the task. After the task verification is passed, click Start Task. If the task verification fails, refer to Pre-Verification Failure Handling, fix the issue, and reinitiate the verification task.
    Failed: Indicates that the verification items failed the check, the task is blocked, and you need to fix the problem and run the verification task again.
    Alarm: Indicates that the verification items do not fully meet the requirements. You can continue with the task, but it may have some impact on the business. Users need to evaluate based on the prompts whether to ignore the warning or fix the issues before continuing.
    
    6. Return to the data migration task list. The task enters the ready-to-run state. After 1 to 2 minutes, the data migration task will officially start.
    If you need to view the task, delete the task, or perform other operations, please click the corresponding task and perform operations in the Operation column. For details, refer to Task Management.
    If there is an error in the task, please refer to Error Handling.
    7. Assess whether to end the task.
    Select Full migration: Once the task is completed, it will end automatically; no manual action is required.
    Select Full + incremental migration: After full migration is completed, it will automatically enter the incremental data synchronization stage. Incremental data synchronization will not end automatically; you need to verify the migration results and manually click Complete to end incremental data synchronization. If business switching is needed, refer to Cutover Instructions.

    Post-migration Operations

    After completing the migration using DTS, it is recommended to perform the following checks on the target database:
    Permission completeness. Permissions will affect operations performed on the database. The migration only restores data. To restore other service-level permissions, such as database users and login user names, you need to recreate them and associate them with database accounts.
    Indexes: Reindexing is recommended. As the physical environment of the data files changes, database index statistics may not be updated in a timely manner. It is advised to perform reindexing; otherwise, database performance may degrade.
    Instance-level objects. After the migration is completed, users need to re-create these by themselves.

    Related APIs

    For DTS-related APIs, please refer to: Viewing Related APIs.
    

    

    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support