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 All All
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 'TESTDB'> attachSource DelphixEngine database 'TESTDB' attachSource *> set attachData.type=OracleAttachData DelphixEngine database 'TESTDB' attachSource *> set attachData.config=TESTDB DelphixEngine database 'TESTDB' attachSource *> set attachData.environmentUser=test_server/oracle DelphixEngine database 'TESTDB' attachSource *> set attachData.force=true
Notes:
attachData.config
is the name of the database as shown on the Environment pageattachData.environmentUser
can be selected by using <tab> and then selecting the correct environment & user (location of Source database)
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