This topic describes how to attach a dSource to a different data source.
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
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.
Select the dSource.
delphix> database "dexample"
detachSourcecommand, specifying the currently active source. This step can be skipped if the dSource has already been detached through the GUI.
delphix database "dexample"> detachSource delphix database "dexample" detachSource *> set source=name-of-old-src-DB-server delphix database "dexample" detachSource *> commit
delphix database "dexample"> attachSource
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)
delphix database "dexample" attachSource *> set attachData.type=OracleAttachData delphix database "dexample" attachSource *> set attachData.config=name-of-dSource-as-shown-in-environment delphix database "dexample" attachSource *> set attachData.environmentUser=myuser delphix database "dexample" attachSource *> set attachData.dbUser=orauser delphix database "dexample" attachSource *> set attachData.dbCredentials.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.
Commit the operation.
delphix database "dexample" attachSource *> commit