腾讯云 CDB for SQL Server Tutorial 产品文档
版权声明 2015-2016 腾讯云版权所有 本文档著作权归腾讯云单独所有, 未经腾讯云事先书面许可, 任何主体不得以任何形式复制 修改 抄袭 传 播全部或部分本文档内容 商标声明 及其它腾讯云服务相关的商标均为腾讯云计算 ( 北京 ) 有限责任公司及其关联公司所有 本文档涉及的第三方 主体的商标, 依法由权利人所有 服务声明 本文档意在向客户介绍腾讯云全部或部分产品 服务的当时的整体概况, 部分产品 服务的内容可能有所调整 您所购买的腾讯云产品 服务的种类 服务标准等应由您与腾讯云之间的商业合同约定, 除非双方另有约定, 否则, 腾讯云对本文档内容不做任何明示或模式的承诺或保证 第 2 页共 13 页
文档目录 文档声明... 2 Windows Client Upload Tool... 4 Use SQL Server Management Studio... 7 Data Migration... 11 第 3 页共 13 页
Windows Client Upload Tool How to Use the Tool 1. Download the "Windows Client Upload Tool" to the local computer, and decompress it to any folder. Note: The folder path should not include Chinese. After the decompression, the file directory structure is as follows: 2. To ensure your data seucrity, you need to edit the configuration file etc\conf.json and enter your API key (secretid and secretkey) before uploading the backup. Be sure to keep your API key well to avoid leakage. To ensure a reliable transmission, this tool can resume upload from the breakpoint. Note: Store the conf.json file in "UTF-8 without BOM" format. In Windows, it is recommended to use notepad++ to convert encoding) 1. Enter the Windows command line ("Start" ->"Search programs and files" > Enter "cmd") 第 4 页共 13 页
1. In the Windows command line, enter the directory of the decompressed "Windows Client Upload Tool", and then call the upload-tool.exe under the bin directory to complete the upload. upload-tool.exe has two parameters: -r and -p. -p indicates the absolute path of the backup file in the local computer, and -r indicates the region where the transit storage is located (select the region where your Tencent Cloud Database resides in) Region Mapping Region -r Parameter 第 5 页共 13 页
Region Guangzhou Shanghai Hong Kong Shanghai Finance Beijing Shenzhen Finance -r Parameter gz sh hk shjr bj szjr Note: The parameter is case sensitive 第 6 页共 13 页
Use SQL Server Management Studio Use SQL Server Management Studio in CVM CDB for SQL Server does not come with SQL Server Management Studio (SSMS). If you need one, you can directly install the SSMS supporting SQL Server 2008 R2 in the CVM. Recommended installation environment: Windows Server 2012 R2 Standard Edition, 64-bit Recommended configuration: 1 core CPU, 2GB memory Official download address: https: //download.microsoft.com/download/3/1/d/31d734e0-bfe8-4c33- A9DE-2392808ADEE6/SSMS-Setup-CHS.exe Official instructions: Microsoft official documents https://msdn.microsoft.com/zh-cn/library/ms174173(v=sql.105).aspx Use SQL Server Management Studio locally For data security, public IP has not been enabled for CDB for SQL Server, but you can use SSH2 port mapping to connect, configure and manage instances in public network by following the steps below: 1. Prepare a Linux CVM with a public IP 2. Use an SSH tool (such as SecureCRT or Putty) to configure port mapping, start a service port locally, and then connect the SSH tool to the Linux CVM. By doing so, you can connect to local service port with SSMS. 第 7 页共 13 页
Take SecureCRT as an example: 1. Enter "Session Attributes" and click "Add" 2. Enter the "Session Attributes" configuration page and configure the parameters 第 8 页共 13 页
3. Log in to the Linux CVM and establish a connection 4. Connect to SQL Server instance with SSMS 第 9 页共 13 页
第 10 页共 13 页
Data Migration Data Migration Note: 1. Before the migration, ensure the SQL Server version of the source instance is same as that of destination instance 2. Ensure that each bak file to be migrated contains only one database 3. The database to be migrated cannot have the same name as the CDB for SQL Server To improve migration efficiency, you can use offline migration and online hot migration to migrate large volume data from your existing network. Offline migration can migrate 99% of the data to the private network of Tencent Cloud quickly and securely. In addition, for the sake of security, cloud database servers are not directly open to public network usually (there is a speed limit even if the public IP is enabled). In this way, you need to use offline migration and online hot migration. Preparations Before Migration 1. Go to "Console" -> "Cloud Database" -> "SQL Server", create a database to import, and grant "read/write" permission to the account. 2. Download "Windows Client Upload Tool". 3. Prepare the data backup files to be migrated to Tencent Cloud offline. Migration Steps 1. Using "Windows Client Upload Tool", upload the prepared data backup files to the free transit storage provided by Tencent Cloud (How to Use the Upload Tool). 第 11 页共 13 页
2. In the navigation bar on the left of the database instance page, select "SQL Server"-> "Data Transfer" > "Create Task". 3. Create a new offline migration task Customize a task name. For the source instance type, select "SQL Server Backup Restore", and for source database region, select the region specified when you upload the backup files using "Windows Client Upload Tool" (it is usually same as the destination database region). The destination database type and destination database region are automatically generated by the system based on the configuration of the source database. Finally, select the instance to be migrated in the instance ID drop-down list. 第 12 页共 13 页
Powered by TCPDF (www.tcpdf.org) Tutorial 产品文档 4. After the task is created, you'll go to the task list page. Select and then start the task. 5. Check the synchronization status. When the status becomes "Synchronization Successful", the offline migration of data is completed successfully. If the status becomes "Synchronization Failed", check the failure information, fix the failure, and then restart the migration. 第 13 页共 13 页