This topic describes how to attach a dSource to a different data source.
Prerequisites
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
Select the dSource.
delphix> database "dexample"
Run the detachSource
command, 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
Run the attachSource
command.
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:
delphix database "dexample" attachSource *> set source.name=name-of-new-src-DB-server
delphix database "dexample" attachSource *> set source.config=name-of-dSource-as-shown-in-environment
delphix database "dexample" attachSource *> set environmentUser=myuser
delphix database "dexample" attachSource *> set dbUser=orauser
delphix database "dexample" attachSource *> set dbCredentials.password=orauserpwd
delphix database "dexample" attachSource *> ls
operations: type: LinkedSourceOperations
postSync: (required)
preSync: (required)
delphix database "dexample" attachSource *> edit source.operations.preSync*> back
delphix database "dexample" attachSource *> edit source.operations.postSync
delphix database "dexample" attachSource *> back
delphix database "dexample" attachSource *> ls
operations:
type: LinkedSourceOperations
postSync: (empty) (*)
preSync: (empty) (*)
rmanChannels: (unset)
The source.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