This topic describes how to upgrade an ApsaraDB RDS for SQL Server instance with local SSDs from SQL Server 2008 R2 to SQL Server 2012 or SQL Server 2016. During the upgrade, you can also migrate the RDS instance across zones.
Alibaba Cloud has stopped providing security updates for ApsaraDB RDS instances that run SQL Server 2008 R2 and are purchased on and after July 9, 2019. For more information, see [Notice] Supplementary service terms for ApsaraDB RDS instances that run SQL Server 2008 R2. We recommend that you upgrade the major engine version of your RDS instance at the earliest opportunity.
For more information about the features that are provided by different SQL Server versions on each RDS edition, see Features of ApsaraDB RDS instances that run different SQL Server versions and RDS editions.
Prerequisites
Your RDS instance runs SQL Server 2008 R2 with local SSDs.
The storage capacity of your RDS instance is no less than 20 GB.
Transparent Data Encryption (TDE) is disabled for your RDS instance. For more information, see Configure TDE for an ApsaraDB RDS for SQL Server instance.
Usage notes
After the upgrade is complete, your RDS instance cannot be rolled back to an earlier major engine version.
WarningBefore you start the upgrade, we recommend that you create a temporary RDS instance that runs the required SQL Server version and use the temporary RDS instance to test the compatibility with your workloads. For more information, see Create a temporary RDS instance that runs the required SQL Server version.
You can upgrade your RDS instance with local SSDs from SQL Server 2008 R2 to the following versions:
SQL Server 2012 EE
SQL Server 2016 SE
SQL Server 2016 EE
NoteIf you upgrade your RDS instance to SQL Server 2012 EE or SQL Server 2016 EE, the TDE feature remains available. If you upgrade your RDS instance to SQL Server 2016 SE, the TDE feature becomes unavailable.
After the upgrade is complete, you must switch over your workloads. The downtime caused by the switchover varies based on the data volume of your RDS instance. In most cases, the switchover requires approximately 20 minutes. We recommend that you switch over your workloads during the specified maintenance window. Make sure that your application is configured to automatically reconnect to your RDS instance.
Do not use the default virtual private cloud (VPC) or vSwitch for the upgrade. We recommend that you configure a VPC and a vSwitch based on your business requirements.
Impacts
- If you start an upgrade task on your RDS instance, you cannot cancel the upgrade task.
- The settings of your RDS instance, such as the instance name, port, tags, and database accounts, remain unchanged after the upgrade.
- The period of time that is required to complete the upgrade varies based on the data volume of your RDS instance. In most cases, the upgrade requires approximately 20 minutes to complete. If a large number of operations are performed during the upgrade, the period of time to complete the upgrade is prolonged. We recommend that you upgrade your RDS instance during an appropriate period of time.
- The upgrade may cause your RDS instance to be unavailable for a short period of time. Make sure that your application is configured to automatically reconnect to your RDS instance.
- The upgrade changes the virtual IP address (VIP) of your RDS instance. We recommend that you use the endpoint of the RDS instance instead of the IP address to connect your application to the instance.
- After the upgrade, you must immediately delete the cached DNS records from the database client. If the database client runs on a Java virtual machine (JVM), we recommend that you set the time-to-live (TTL) in the JVM configuration to 60 seconds or less. This way, if the VIP that is bound to the in-use endpoint of your RDS instance changes, your application can query the related DNS records again to obtain the new VIP. Then, your application can connect to the new VIP. Note The following TTL-setting methods are provided for reference:
- For all JVM-based applications: Set the networkaddress.cache.ttl parameter in the $JAVA_HOME/jre/lib/security/java.security file to 60.
- For local applications: Configure the
networkaddress.cache.ttl java.security.Security.setProperty("networkaddress.cache.ttl" , "60");
setting in the initialization code of local applications. The configuration must be completed before you call theInetAddress.getByName()
function for the first time to establish a network connection.
- If your RDS instance is attached to a PolarDB-X instance, the change in VIPs temporarily affects the availability of the PolarDB-X instance. We recommend that you refresh the page to view the connection information in the PolarDB-X console at the earliest opportunity.
- If your RDS instance has an ongoing Data Transmission Service (DTS) task, you must restart the DTS task after the upgrade is complete. For more information, see What is DTS?
Billing rules
For more information about the upgrade fees, see Specification changes.
Procedure
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
On the Basic Information page, click Upgrade Version. In the message that appears, click OK.
On the Upgrade Engine Version page, configure the following parameters.
Parameter
Description
Upgrade To
Select the destination SQL Server version. Valid values of the Edition, Storage Type, and Instance Type parameters vary based on the selected destination SQL Server version.
Edition
High-availability: The database system consists of a primary RDS instance and a secondary RDS instance. These instances work in high availability mode to achieve balanced performance in all aspects.
Storage Type
Standard SSD: A standard SSD is an elastic block storage device that is developed based on the distributed storage architecture. You can store data on standard SSDs to separate computing from storage.
Enhanced SSD: An enhanced SSD (ESSD) is an ultra-high performance disk that is designed by Alibaba Cloud based on the next-generation distributed block storage architecture. ESSDs deliver ultra-high storage performance. ESSDs are integrated with 25 Gigabit Ethernet and remote direct memory access (RDMA) technologies. ESSDs can help you reduce one-way latencies and process up to 1 million read and write requests at random per second.
Zone
Select the destination zone. Multi-zone Deployment is supported.
NoteIf your database system consists of primary and secondary RDS instances, we recommend that you select Multi-zone Deployment to implement cross-zone disaster recovery.
If you select Multi-zone Deployment, you must manually select a secondary zone instead of retaining the default secondary zone.
Instance Type
Select the instance type. Each instance type supports a specific number of CPU cores, memory capacity, maximum number of connections, and maximum IOPS. For more information, see Primary ApsaraDB RDS instance types.
Network Type
Classic Network is unavailable. You must specify the VPC information.
If your RDS instance is connected over the classic network before the upgrade, you can change its network type to VPC and configure a vSwitch.
If your RDS instance is connected over a VPC or over both the classic network and a VPC before the upgrade, you cannot change its VPC. However, you can change its vSwitch. The available vSwitches vary based on the values of the Zone and VPC parameters.
VPC
Select the destination VPC.
NoteDo not use the default VPC. We recommend that you manually select a VPC based on your business requirements.
vSwitch
Select the destination vSwitch. If you select multiple zones for your RDS instance, you must select multiple destination vSwitches.
NoteDo not use the default vSwitch. We recommend that you manually select a vSwitch based on your business requirements.
Switching Time
Switch Immediately After Data Migration: Data is migrated and workloads are switched over immediately.
Switch Within Maintenance Window: Data is migrated immediately, and workloads are switched over during the specified maintenance window.
- Read and select Terms of Service and click Pay Now.
- In the message that appears, click OK. The status of the original RDS instance changes to. If the status of the original RDS instance changes to Running, the upgrade is complete. The time that is required to complete the upgrade varies based on the amount of data.
Change the endpoints of your RDS instance
After the upgrade, your RDS instance resides in a VPC. The following table describes how to change the endpoints of your RDS instance after the upgrade based on the original network type of your RDS instance.
Original network type | Change rule |
Classic network | After the upgrade, your RDS instance is connected over both the classic network and a VPC:
|
VPC | A VPC endpoint is generated for your RDS instance based on the specified VPC. This endpoint replaces the original VPC endpoint of your RDS instance. |
Classic network and VPC | After the upgrade, your RDS instance is connected over both the classic network and a VPC. The original classic network endpoint and the original VPC endpoint remain available. The expiration time of the classic network endpoint remains unchanged. |
Create a temporary RDS instance that runs the required SQL Server version
Before you start the upgrade, we recommend that you create a temporary RDS instance that runs the required SQL Server version and use the temporary RDS instance to test the compatibility with your workloads.
You can create a temporary RDS instance only for an RDS instance that runs SQL Server 2008 R2 with TDE and SSL disabled. For more information, see Configure TDE for an ApsaraDB RDS for SQL Server instance and Configure SSL encryption for an ApsaraDB RDS for SQL Server instance.
- Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
In the left-side navigation pane, click Backup and Restoration.
On the Temporary Instance tab, specify the point in time at which you want to clone data and click Create Temporary Instance of Higher Version.
Configure the following parameters.
Parameter
Description
Availability Zone
Select the zone in which you want to create the temporary RDS instance.
Upgrade To
Select the SQL Server version that the temporary RDS instance runs. Valid values:
2016 SE
2016 EE
2012 EE
VPC
Select the VPC to which the temporary RDS instance belongs. You must select the VPC of the ECS instance to which you want to connect. Otherwise, the temporary RDS instance cannot communicate with the ECS instance over the internal network.
vSwitch
Select a vSwitch from the specified VPC.
NoteApsaraDB RDS provides a default instance type and storage type for the temporary RDS instance. The temporary RDS instance is available for seven days. After the seven-day validity period elapses, ApsaraDB RDS releases the temporary RDS instance.
Click OK.