switchover (deprecated)
Note:
Since switchover is deprecated, use dg_switchover instead.Format
emcli switchover -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" -standby_target_name="<standby target name>" -standby_target_type="oracle_database|rac_database" [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"] [-standby_db_creds_name="<standby database credential name>"] [-standby_host_creds_name="<standby database host credential name>"] [-swap_jobs] [-swap_thresholds]
Options
-
primary_target_name
Primary database Enterprise Manager target name. Can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. Specify oracle_database for single instance, or rac_database for cluster.
-
standby_target_name
Standby database Enterprise Manager target name. Can be either a single-instance database or a cluster database.
-
standby_target_type
Standby database target type. Specify oracle_database for single instance, or rac_database for cluster.
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Default is to use preferred credential.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle Home. Default is to use preferred credential.
-
standby_db_creds_name
Standby database named credential for a user with SYSDBA or SYSDG role. Default is to use preferred credential.
-
standby_host_creds_name
Standby database host named credential for an operating system user who can access the standby database Oracle Home. Default is to use preferred credential.
-
swap_jobs
Specifies that scheduled jobs on either the primary or standby database that are of a transferable type (Backup, RMAN Script, and SQL Script) will be moved to the other database after Enterprise Manager detects a fast-start failover. Default is not enabled.
-
swap_thresholds
Specifies that monitoring settings will be swapped between the primary and standby databases after Enterprise Manager detects a fast-start failover. Default is not enabled.
Examples
Example 1
The following command performs a switchover between a primary single-instance database named "database" and a standby single-instance database named "database1".
emcli switchover -primary_target_name="database" -primary_target_type="oracle_database" -standby_target_name="database1" -standby_target_type="oracle_database"
Example 2
The following command performs a switchover between a primary single-instance database named "primary" and a standby single-instance database named "standby". The scheduled jobs and the monitoring settings on "primary" will be moved to "standby" after the switchover is complete.
emcli switchover -primary_target_name="primary" -primary_target_type="rac_database" -standby_target_name="standby" -standby_target_type="rac_database" -swap_jobs -swap_thresholds