Migrate database(s)

Migrate database(s) from the source VM cluster to the target VM cluster.

Note:

  • If the migration is between ExaDB-C@C and ExaDB-D models, this utility does not support database migration. In such cases, alternative methods such as Zero Downtime Migration (ZDM) or dbaascli commands are recommended.
  • If the wallet file (ewallet.p12) is generated using the Database wallet operations step, ensure that it is copied to the client machine, for example, to /home/opc, for database migration operations.

The migrate_database command supports the following options:

Syntax

exacloudmigration migrate_database [-hV] [command]

Table 2-24 exacloudmigration migrate_database Options

Option Description
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Table 2-25 exacloudmigration migrate_database Commands

Command Description
dgassociation Enables Data Guard association between source and target databases.
switchover Enables Data Guard association between source and target databases.

Makes standby database as primary database and old primary database becomes standby database

failover Enables Data Guard association between source and target databases.

Makes standby database as primary database and old primary database becomes disabled standby.

Note:

During database migration, if the source database has automatic backups enabled, the same setting will be applied to the target database.

Enable Data Guard association between source and target databases

Ensure that the target VM cluster(s) is in an available state, and that the input template for database has been generated and modified according to the target platform requirements.

Ensure that both source and target database servers are having the same dbaastools and dbcs-agent versions.

The migrate_database dgassociation command supports the following options:

Syntax

exacloudmigration migrate_database dgassociation [-ahV] -i <inputFile> [-w <walletFile>] [-a|-l <dbNames>] [-p <patchesFile>] [--dry-run]

Table 2-26 exacloudmigration migrate_database dgassociation Commands

Command Description
-a, --all Creates Data Guard association for all source databases.
-i, --inputFile Specifies the database inputs file name with complete path.
-l, --dbNames Specifies a comma-delimited list of databases to create Data Guard associations.

Examples:

  • To create Data Guard association for a database: -l dbname1
  • To create Data Guard association for multiple databases: -l dbname1,dbname2,dbname3
-w, --walletFile Specifies the wallet file name with the path.
-p, --patchesFile Specifies the one-off patches file with the complete path. This file is generated by the ecmasshutility and is applicable only when the source is ExaDB-C@C.

Use the nopatch option to create all target database home images with the source home base RU. For example, -p nopatch.

--dry-run Performs dry run without creating Data Guard associations.
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Examples:

  • To validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database dgassociation -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 --dry-run

    Specify the password for reading the wallet file.

  • To validate a comma-delimited list of dbnames of database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database dgassociation -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 --dry-run

    Specify the password for reading the wallet file.

  • To create Data Guard association for all ExaDB-D source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database dgassociation -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12

    Specify the password for reading the wallet file.

  • To create Data Guard association(s) using a comma-delimited list of ExaDB-D source database(s) provided, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database dgassociation -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2

    Specify the password for reading the wallet file.

  • To create Data Guard association for all ExaDB-C@C source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database dgassociation -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

  • To create Data Guard association(s) using the comma-delimited list of ExaDB-C@C source database(s) provided, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database dgassociation -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

Note:

  • If the database wallet file is not used, the utility will prompt for the SYS and TDE passwords for each database.
  • If the database wallet file is used but a password entry for any database is missing, the utility execution will stop and display an error indicating that the password does not exist in the wallet.
  • In a source VM cluster where multiple databases share the same dbHome, enabling a Data Guard association between the source and target databases will occur sequentially for those databases.

Migrate database switchover

Enables the Data Guard association and performs a role transition, making the standby database the primary database, while the old primary database becomes the standby.

Ensure that the database input file has been generated and modified according to the target platform requirements.

The migrate_database switchover command supports the following options:

Syntax

exacloudmigration migrate_database switchover [-ahV] -i <inputFile> [-w <walletFile>] [-a|-l <dbNames>] [-p <patchesFile>] [--dry-run]

Table 2-27 exacloudmigration migrate_database switchover Commands

Command Description
-a, --all Performs migrate switchover for all source databases.
-i, --inputFile Specifies the database input file name with complete path.
-l, --dbNames Specifies a comma-delimited list of databases to perform migrate switchover.

Examples:

  • To perform migrate switchover for a database: -l dbname1
  • To perform migrate switchover for multiple databases: -l dbname1,dbname2,dbname3
-w, --walletFile Specifies the wallet file name with the path.
-p, --patchesFile Specifies the one-off patches file with the complete path. This file is generated by the ecmasshutility and is applicable only when the source is ExaDB-C@C.

Use the nopatch option to create all target database home images with the source home base RU. For example, -p nopatch.

--dry-run Performs dry run without creating the Data Guard associations.
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Examples:

  • To validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database switchover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 --dry-run

    Specify the password for reading the wallet file.

  • To validate a comma-delimited list of dbnames of database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database switchover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 --dry-run

    Specify the password for reading the wallet file.

  • To perform migrate switchover for all ExaDB-D source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database switchover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12

    Specify the password for reading the wallet file.

  • To perform migrate switchover using the comma-delimited list of ExaDB-D source databases provided, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database switchover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2

    Specify the password for reading the wallet file.

  • To perform migrate switchover for all ExaDB-C@C source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database switchover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

  • To perform migrate switchover using the comma-delimited list of ExaDB-C@C source database(s), following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database switchover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

Note:

  • If the database wallet file is not used, the command prompts for the SYS and TDE passwords for each database.
  • If the database wallet file is used but an entry for any database is missing, the utility stops execution and displays an error indicating that the password does not exist in the wallet.

Migrate database failover

Enables the Data Guard association and performs a role transition, making the standby database the primary database, while the old primary database becomes the disabled standby.

Ensure that the database input file has been generated and modified according to the target platform requirements.

The migrate_database failover command supports the following options:

Syntax

exacloudmigration migrate_database failover [-ahV] -i <inputFile> [-w <walletFile>] [-a|-l <dbNames>] [-p <patchesFile>] [--dry-run]

Table 2-28 exacloudmigration migrate_database failover Commands

Command Description
-a, --all Performs migrate failover for all source databases.
-i, --inputFile Specifies the database input file name with complete path.
-l, --dbNames Specifies a comma-delimited list of databases to perform migrate failover.

Examples:

  • To perform migrate failover for a database: -l dbname1
  • To perform migrate failover for multiple databases: -l dbname1,dbname2,dbname3
-w, --walletFile Specifies the wallet file name with the path.
-p, --patchesFile Specifies the one-off patches file with the complete path. This file is generated by the ecmasshutility and is applicable only when the source is ExaDB-C@C.

Use the nopatch option to create all target database home images with the source home base RU. For example, -p nopatch.

--dry-run Performs dry run without creating the Data Guard associations.
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Examples:

  • To validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database failover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 --dry-run

    Specify the password for reading the wallet file.

  • To validate a comma-delimited list of dbnames of database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration migrate_database failover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 --dry-run

    Specify the password for reading the wallet file.

  • To perform migrate failover for all ExaDB-D source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database failover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12

    Specify the password for reading the wallet file.

  • To perform migrate failover using the comma-delimited list of ExaDB source database(s) provided, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database failover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2

    Specify the password for reading the wallet file.

  • To perform migrate failover for all ExaDB-C@C source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database failover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

  • To perform migrate failover using the comma-delimited list of ExaDB-C@C source database(s) provided, following successful validation and dry run:
    /home/opc>./exacloudmigration migrate_database failover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 -p /home/opc/patches_file

    Generate the patches_file using the Generate patches file step and copy it to the client machine.

    Specify the password for reading the wallet file.

Note:

  • If the database wallet file is not used, the command prompts for the SYS and TDE passwords for each database.
  • If the database wallet file is used, but a password entry for any database is missing, the utility stops execution and displays an error indicating that the password does not exist in the wallet.

Database switchover

Makes the standby database the primary database, and the old primary database the standby database.

Ensure that the Data Guard association is enabled between source and target database.

Ensure that the database input file has been generated and modified according to the target platform requirements.

The switchover command supports the following options:

Syntax

exacloudmigration switchover [-ahV] -i <inputFile> [-w <walletFile>] [-a|-l <dbNames>] [--dry-run]

Table 2-29 exacloudmigration switchover Commands

Command Description
-a, --all Performs switchover for all databases in the source VM cluster.
-i, --inputFile Specifies the database input file name with complete path.
-l, --dbNames Specifies a comma-delimited list of databases to perform switchover.

Examples:

  • To perform switchover for a database: -l dbname1
  • To perform switchover for multiple databases: -l dbname1,dbname2,dbname3
-w, --walletFile Specifies the wallet file name with the path.
--dry-run Performs dry run without switchover of Data Guard associations.
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Examples:

  • To validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration switchover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 --dry-run

    Specify the password for reading the wallet file.

  • To validate a comma-delimited list of dbnames to validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration switchover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 --dry-run

    Specify the password for reading the wallet file.

  • To perform switchover for all source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration switchover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12

    Specify the password for reading the wallet file.

  • To perform switchover using the comma-delimited list of source database(s), following successful validation and dry run:
    /home/opc>./exacloudmigration switchover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2

    Specify the password for reading the wallet file.

Note:

  • If the database wallet file is not used, the command prompts for the SYS password for each database.
  • If the database wallet file is used, but a password entry for any database is missing, the utility stops execution and displays an error indicating that the password does not exist in the wallet.

Database failover

Makes the standby database the primary database, and the old primary database becomes disabled standby database.

Ensure that the Data Guard association is enabled between source and target database.

Ensure that the database input file has been generated and modified according to the target platform requirements.

The failover command supports the following options:

Syntax

exacloudmigration failover [-ahV] -i <inputFile> [-w <walletFile>] [-a|-l <dbNames>] [--dry-run]

Table 2-30 exacloudmigration failover Commands

Command Description
-a, --all Performs failover for all databases in the source VM cluster.
-i, --inputFile Specifies the database input file name with complete path.
-l, --dbNames Specifies a comma-delimited list of databases to perform failover.

Examples:

  • To perform failover for a database: -l dbname1
  • To perform failover for multiple databases: -l dbname1,dbname2,dbname3
-w, --walletFile Specifies the wallet file name with the path.
--dry-run Performs dry run without failover of Data Guard associations.
-h, --help Displays help information about the command and its options.
-V, --version Displays the version of the utility.

Examples:

  • To validate the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration failover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 --dry-run

    Specify the password for reading the wallet file.

  • To validate a comma-delimited list of dbnames to verify the database input template file and perform a --dry-run:
    /home/opc>./exacloudmigration failover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2 --dry-run

    Specify the password for reading the wallet file.

  • To perform failover for all source databases, following successful validation and dry run:
    /home/opc>./exacloudmigration failover -a -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12

    Specify the password for reading the wallet file.

  • To perform failover using the comma-delimited list of source database(s) provided, following successful validation and dry run:
    /home/opc>./exacloudmigration failover -i inputs/infra_phxref/vmcluster_vmcluster1/database_inputs -w ewallet.p12 -l dbname1,dbname2

    Specify the password for reading the wallet file.

Note:

  • If the database wallet file is not used, the command prompts for the SYS password for each database.
  • If the database wallet file is used, but a password entry for any database is missing, the utility stops execution and displays an error indicating that the password does not exist in the wallet.