Converting a DB System from OCPU to ECPU

You can convert a DB system created with an OCPU shape to use an ECPU shape.

A DB system can have different setups. It can be a standalone or high availability DB system. It may have an attached HeatWave cluster and it may have one or more read replicas. These have to be taken into consideration when converting the DB system from OCPU to ECPU shape.

There are 3 major steps to convert a DB system from OCPU to ECPU shape.
  • Step 1: If the DB system has an attached HeatWave cluster that uses a HeatWave node based shape such as MySQL.HeatWave.VM.Standard, you need to convert the HeatWave cluster shape to a HeatWave capacity shape such as HeatWave.32GB or HeatWave.512GB.
  • Step 2: If the DB system has an OCPU shape, you need to convert the DB system to use an ECPU shape. When you change the shape, you also need to change the configuration to a configuration that matches the shape. If the DB system uses a custom configuration, you should create a new custom configuration for the ECPU shape and copied the customized variables to the new configuration. See Creating a Custom Configuration for standalone DB system and Copying a Configuration for high availability DB system.
  • Step 3: If the DB system has any read replica with OCPU shapes, you need to convert each of them to ECPU shape. You also need to change the configuration to a configuration that matches the shape.

Alternatively, you can use the backup and restore method to create a new DB system with ECPU shape. If you have a custom configuration in the DB system or read replicas, you need to create a new custom configuration for the ECPU shape that you want to use. See Creating a Custom Configuration for standalone DB system and Copying a Configuration for high availability DB system.

You can convert a DB system created with an OCPU shape to use an ECPU shape with one of the following method:

Using the Console

Use the Console to convert a DB system from OCPU to ECPU.

This task requires the following:
  • If you have a custom configuration for the OCPU shape, you should create a custom configuration for the ECPU shape with similar variable settings. See Creating a Custom Configuration for standalone DB system and Copying a Configuration for high availability DB system.
Do the following steps:
  1. Open the navigation menu, and select Databases. Under HeatWave MySQL, click DB systems.
  2. Choose your compartment from the List scope.
  3. In the list of DB systems, find the DB system you want to convert and do one of the following:
    • Click the name of the DB system.
    • Click the Actions menu present on the same line as your DB system and select View details.
    The DB system details page is displayed.
  4. Skip this step if the DB system does not have a HeatWave cluster attached to it.
    1. Do either of the following:
      • In the DB system information tab, under HeatWave cluster, besides the HeatWave cluster field, click Edit.
      • Under Resources, click HeatWave cluster, and then click Edit in the HeatWave cluster information frame.
    2. In the Edit HeatWave cluster panel, under Configure HeatWave cluster, do the following:
      • Select a shape: Click Change shape.
      • Select the shape of the HeatWave cluster, and click Select a shape.
        Note

        You must select a HeatWave capacity shape: either HeatWave.32GB or HeatWave.512GB. The MySQL.HeatWave.VM.Standard shape is equivalent to HeatWave.512GB.
    3. Click Save changes.
    The HeatWave cluster enters the Updating state. Wait until the update completes and the state of the HeatWave cluster becomes Active before continuing with the next step.
  5. At the top of the DB system details page, click Edit.
    The Edit DB system is displayed.
  6. In the Edit DB system panel, do the following:
    1. In Select a shape, click Change shape to change the shape of the DB system.
    2. Select an ECPU shape for the DB system, and click Select a shape.
      Note

      You should choose an ECPU shape that has similar resources as the current OCPU shape.
    3. In Select a configuration, click Change configuration to change the configuration of the DB system.
    4. Select a configuration for the DB system, and click Select a configuration.
      Note

      If the DB system has high availability enabled, you must select a high availability compatible configuration. The default high availability configuration has a suffix HA.
    5. Check the differences in the current and newly selected configuration in the Compare configurations frame.
      Note

      If there are big differences, you can create a new custom configuration with the new ECPU shape to match the values of the variables in the current configuration.
    6. Click Save changes.
    The DB system enters the Updating state. Wait until the update completes and the state of the DB system will become Active.
    Note

    Any read replica that inherits the shape from the DB system will also have the shape converted. The read replicas, if any are first converted in sequence before the DB system is converted. For high availability DB system, a rolling update is performed to reduce downtime.
  7. Skip this step if the DB system does not have any read replica. Do the following for each read replica:
    1. Under Resources in the DB system details page, click Read replicas.
    2. Click the name of the read replica to open the Read replica details page.
    3. If the read replica has an OCPU shape, do the following:
      • Click Edit.
      • In Shape details, click Change shape to change the shape of the read replica.
      • Select an ECPU shape for the DB system, and click Select a shape.
      • Click Show advanced options.
      • Click the Configuration tab.
      • In Select a configuration, click Select configuration to change the configuration of the read replica.
      • Select a configuration for the read replica, and click Select a configuration.
      • Click Save changes.
      The read replica enters the Updating state. Wait until the update completes and the state of the read replica will become Active.
    4. Click DB system details on the breadcrumb at the top of the page to view the DB system details page. Repeat the steps for the next read replica, if any.
The shape of the DB system and its read replicas has been converted from OCPU to ECPU.

Using the CLI

Use the command-line interface to convert a DB system from OCPU to ECPU.

This task requires the following:
  • A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.
  • The DB system Oracle Cloud Identifier (OCID).
  • The configuration OCID of the ECPU shape.
Do the following steps:
  1. If the DB system has a HeatWave cluster with a HeatWave node shape (such as MySQL.HeatWave.VM.Standard) attached to it, run the following to change the HeatWave cluster shape to a HeatWave capacity shape:
    oci mysql db-system heatwave-cluster update  
     --db-system-id <DBSystemOCID>
     --shape-name <ShapeName> 
     
    • db-system-id: Specify the OCID of the DB system.
    • shape-name: Specify a HeatWave cluster capacity shape.
      Note

      You must select a HeatWave capacity shape: either HeatWave.32GB or HeatWave.512GB. The MySQL.HeatWave.VM.Standard shape is equivalent to HeatWave.512GB.
    You will get a response with the OCID of the work request when the operation has started.
    {
      "opc-work-request-id": "ocid1.mysqlworkrequest.<alphaNumericString>"
    }
    You need to wait until the process has completed before continuing with the following step. It takes about 15 minutes to complete, only the HeatWave cluster is not available, the DB system is still online. You can run the following to check the status of the operation:
    oci mysql work-request get --work-request-id <WorkRequestOCID> |jq .data.status
    When it returns "SUCCEEDED", the operation has completed and you can continue with the following step.
  2. Run the following to change the shape of the DB system to use ECPU shape:
    Note

    Any read replica that inherits the DB system shape will be converted at the same time.
    oci mysql db-system update  
     --db-system-id <DBSystemOCID>
     --shape-name <ShapeName>
     --configuration-id <ConfigurationOCID>
     
    • db-system-id: Specify the OCID of the DB system.
    • shape-name: Specify an ECPU shape name. See ECPU Shapes.
    • configuration-id: Specify the OCID of a valid configuration of the shape.
      Note

      Ensure that the configuration matches the shape. If the DB system has high availability enabled, you must specify a high availability compatible configuration. The name of the default high availability configuration has a suffix HA.
    You will get a response with the OCID of the work request when the operation has started.
    {
      "opc-work-request-id": "ocid1.mysqlworkrequest.<alphaNumericString>"
    }
    You need to wait until the process has completed before continuing with the following step. For Standalone DB system, it takes about 15 to 30 minutes to complete, the DB system is not available for the whole duration. For High availability DB system, it takes about 60-80 minutes to complete, the DB system incur a short downtime of less than 1 minute around 2/3 into the process. Each read replica that inherits the DB system shape will required additional 15 minutes. You can run the following to check the status of the operation:
    oci mysql work-request get --work-request-id <WorkRequestOCID> |jq .data.status
    When it returns "SUCCEEDED", the operation has completed and you can continue with the following step.
  3. If the DB system has any read replica with overridden shape, run the following on each read replica that has an OCPU shape:
    oci mysql replica update  
     --replica-id <ReadReplicaOCID>
     --replica-overrides '{"shapeName": "<ShapeName>", "configurationId": "<ConfigurationOCID>"}' 
     
    • replica-id: Specify the OCID of the read replica.
    • replica-overrides: Specify a JSON object containing the following key-value pairs:
      • shapeName: Specify an ECPU shape name.
      • configurationId: Specify the OCID of the configuration.
        Note

        Ensure that the configuration matches the shape.
    You will get a response with the OCID of the work request when the operation has started.
    {
      "opc-work-request-id": "ocid1.mysqlworkrequest.<alphaNumericString>"
    }
    It takes about 15 minutes to complete, the read replica that is being updated is not available, the DB system and other read replicas, if any are online. You can run the following to check the status of the operation:
    oci mysql work-request get --work-request-id <WorkRequestOCID> |jq .data.status
    When it returns "SUCCEEDED", the operation has completed

    You can do this on one read replica at a time so that other read replicas remain available to serve read operations. Repeat this step on the next read replica that has an OCPU shape.

Using Backup and Restore Method

Use the backup and restore method to convert a DB system from OCPU to ECPU.

Note

The method cannot retain the IP addresses of the DB system and read replicas endpoints.
Note

If you have a custom configuration for the OCPU shape, you should create a custom configuration for the ECPU shape with similar variable settings. See Creating a Custom Configuration for standalone DB system and Copying a Configuration for high availability DB system.
  1. (Optional) Stop the DB system to prevent and data updates. See Starting, Stopping, or Restarting a DB System.
  2. Take a manual backup of the DB system. See Creating a Manual Backup.
  3. Restore the backup to a new DB system. See Restoring From a Backup.
    Note

    Select an ECPU shape and a corresponding configuration for the new DB system. If the DB system has a HeatWave cluster, select a HeatWave capacity shape (HeatWave.32GB or HeatWave.512GB) for the HeatWave cluster.
  4. (Optional) Add read replicas as required. See Creating a Read Replica.
    Note

    The read replica can inherit the ECPU shape from the DB system or override the DB system shape with another ECPU shape.
After verifying that the restored DB system contains all the data and works properly, you can switchover all applications to the new DB system. You can delete the old DB system if it is no longer required.