How to force an Oracle Database re-link/attach after ID change (KBA9007)
KBA
KBA# 9007
Issue
When attempting to re-link/attach an Oracle Database the attachSource fails stating the Database ID is different.
Example of error message:
Error Cannot attach database "MyDatabase" to container. Validation failed: The current database ID 3285330902 does not match the original database ID 4596545885. Error Code exception.oracle.dsource.attach.failed.database Suggested Action Attach is not possible for databases with a different database ID unless FORCE option is selected. Verify that the correct database is being attached. Otherwise link the database instead of attach
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0 5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
Resolution
The force linking can be set in the CLI with the following option:
set attachData.force=true
Using the ls command helps show the full list. The force option lives under attachData.
myLab 'newname' attachSource *> ls Properties type: AttachSourceParameters attachData: type: OracleAttachData (*) backupLevelEnabled: (unset) bandwidthLimit: (unset) checkLogical: (unset) compressedLinkingEnabled: (unset) config: (required) doubleSync: (unset) encryptedLinkingEnabled: (unset) environmentUser: (required) externalFilePath: (unset) filesPerSet: (unset) force: (unset) <------------------------- linkNow: (unset) numberOfConnections: (unset) operations: (unset) oracleFallbackCredentials: (unset) oracleFallbackUser: (unset) rmanChannels: (unset)
Example:
DelphixEngine database 'dSource'> attachSource DelphixEngine database 'dSource' attachSource *> set attachData.type=OracleAttachData DelphixEngine database 'dSource' attachSource *> set attachData.config=ABCDEF DelphixEngine database 'dSource' attachSource *> set attachData.environmentUser=dSource/delphix DelphixEngine database 'dSource' attachSource *> set attachData.oracleFallbackUser=delphix_db DelphixEngine database 'dSource' attachSource *> set attachData.force=true
Related Articles
The following articles may provide more information or related information to this article:
- Detaching and Re-Attaching Oracle dSources - https://docs.delphix.com/docs/datase...racle-dsources