dg_switchover
Performs a Data Guard switchover between a primary database and a standby database.
Format
emcli dg_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]
      [-tde_wallet_creds_name="<transparent data encryption wallet credentials of the primary database>"]  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. 
- 
                        tde_wallet_creds_name Transparent Data Encryption wallet credentials for the primary database. Use create_named_credential verb to create these credentials as shown below:emcli create_named_credential -cred_name=WC1 -cred_type=GenericPassword -auth_target_type='<system>' -attributes="GENERIC_PASSWORD:<Primary Database TDE Wallet Password>" 
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 dg_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 "database" and a standby single-instance database named "database1". The scheduled jobs and the monitoring settings on "database" will be moved to "database1" after the switchover is complete.
emcli dg_switchover 
      -primary_target_name="database"
      -primary_target_type="rac_database"
      -standby_target_name="database1"
      -standby_target_type="rac_database"
      -swap_jobs
      -swap_thresholds