Skip to main content
Skip table of contents

CLI cookbook: detaching and attaching an Oracle dSource

This topic describes how to attach a dSource to a different data source.

Prerequisites

Before detaching an Oracle dSource, you must capture the following RMAN configuration:

  • Level or SCN based backups

  • Data load channel settings: number of channels and files per channel

The above RMAN configuration will be removed once the dSource is unlinked.

A dSource can only be attached to a new data source once it has been unlinked.

When attaching an Oracle dSource to a new data source, the new data source must be the same logical database satisfying the following constraints:

  • Same dbid

  • Same dbname

  • Same creation time

  • Same resetlogs SCN

  • Same resetlogs time

  • Same redo stream, where a log must exist with

    • Same sequence

    • Same thread

    • Same end SCN

For Oracle dSources, this procedure can be used to initially link from a standby server that is faster or less disruptive, unlink the dSource, and then attach it to the production server for subsequent incremental SnapSync operations. When you perform the attach operation, you will need the source config name of an unlinked database.

Procedure

  1. Select dSource.

    CODE
    delphix> database "dexample"
  2. Run the detachSourcecommand, specifying the currently active source. This step can be skipped if the dSource has already been detached through the GUI.

    CODE
    delphix database "dexample"> detachSourcedelphix database "dexample" detachSource *> set source=name-of-old-src-DB-serverdelphix database "dexample" detachSource *> commit
  3. Run the attachSource command.

    CODE
    delphix database "dexample"> attachSource
  4. Set the config to point to an unlinked source. The following is an example to attach to an Oracle data source: (Hint: use <TAB> to complete variable names and known values)

    CODE
    delphix database "dexample" attachSource *> set attachData.type=OracleAttachDatadelphix database "dexample" attachSource *> set attachData.config=name-of-dSource-as-shown-in-environmentdelphix database "dexample" attachSource *> set attachData.environmentUser=myuserdelphix database "dexample" attachSource *> set attachData.oracleFallbackUser=orauserdelphix database "dexample" attachSource *> edit attachData.oracleFallbackCredentialsdelphix database "dexample" attachSource *> set set type=PasswordCredentialdelphix database "dexample" attachSource *> set password=orauserpwd

    The attachData.config listing can be observed in the administration GUI, under Manage (pull-down at the top) --> Environments --> choose your dSource --> select Databases (upper right). 
    The dSources shown on the new source DB server may acquire odd names eg. "P02:UNKNOWN:vwxyz". These are a side-effect of having multiple instances of the same container name (possible in DR); Delphix needs to disambiguate. If these do show, they indicate containers in the new environment. Successfully attaching to these and deleting the old environment will re-establish the original names.

  5. CODE
    delphix database "dexample" attachSource *> commit
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.