dg_reinstate

Reinstates a former primary database as a physical standby database after a failover operation. The database being reinstated must be the primary database before the failover and must be eligible for reinstatement, such as when Flashback Database is enabled or sufficient logs are available.

Format

emcli dg_reinstate
      -primary_target_name="<primary database target name>"
      -primary_target_type="oracle_database|rac_database"
      -standby_target_name="<former primary database 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="<former primary database credential name>"]
      [-standby_host_creds_name="<former primary database host credential name>"]
      [-tde_wallet_creds_name="<transparent data encryption wallet credentials of the former 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 a single instance database, or rac_database for a cluster database.

  • standby_target_name

    Former primary database Enterprise Manager target name. Can be either a single instance database or a cluster database.

  • standby_target_type

    Former primary 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 credentials.

  • 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 credentials.

  • standby_db_creds_name

    Former primary database named credential for a user with SYSDBA or SYSDG role. Default is to use preferred credentials.

  • standby_host_creds_name

    Former primary database host named credential for an operating system user who can access the standby database Oracle home. Default is to use preferred credentials.

  • tde_wallet_creds_name

    Transparent Data Encryption wallet credentials for the former primary database. Required only for a password protected wallet. 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:<Former Primary Database TDE Wallet Password>"

Examples

Example 1

The following example reinstates a former primary single instance database named "db1" as a standby database for the new primary single instance database named "db2" using the specified credentials.

emcli dg_reinstate
   -primary_target_name="db2"
   -primary_target_type="oracle_database"
   -standby_target_name="db1"
   -standby_target_type="oracle_database"
   -primary_db_creds_name="dbCredsPrimary"
   -primary_host_creds_name="dbHostCredsPrimary"
   -standby_db_creds_name="dbCredsFormerPrimary"
   -standby_host_creds_name="dbHostCredsFormerPrimary"

Example 2

The following example reinstates a former primary cluster database named "old_primary_rac" as a standby database for the new primary cluster database named "new_primary_rac" using the specified credentials.

emcli dg_reinstate
   -primary_target_name="new_primary_rac"
   -primary_target_type="rac_database"
   -standby_target_name="old_primary_rac"
   -standby_target_type="rac_database"
   -primary_db_creds_name="racCredsPrimary"
   -primary_host_creds_name="racHostCredsPrimary"
   -standby_db_creds_name="racCredsFormerPrimary"
   -standby_host_creds_name="racHostCredsFormerPrimary"