CLI cookbook: attaching or detaching a PDB
PDB CLI attach
Ensure the new source environment has been fully discovered by the Delphix Engine, including CDB discovery.
Login to the engine via SSH with a Delphix admin account.
Select the PDB dSource database to be attached.
CODEdvde.dcenter> database dvde.dcenter database> select "R268PDB1" dvde.dcenter database 'R268PDB1'>
Attach the PDB dSource to the correct source PDB in the new environment using the attachSource command; you will need to specify the environment user and login credentials for the PDBdSource.
CODEdvde.dcenter database 'R268PDB1'> attachSource dvde.dcenter database 'R268PDB1' attachSource *> set attachData.type=OraclePDBAttachData dvde.dcenter database 'R268PDB1' attachSource *> set attachData.config=R268PDB1 dvde.dcenter database 'R268PDB1' attachSource *> set attachData.environmentUser=ora12201 dvde.dcenter database 'R268PDB1' attachSource *> set attachData.dbUser=delphix dvde.dcenter database 'R268PDB1' attachSource *> set attachData.dbCredentials.password Enter attachData.dbCredentials.password: ******* dvde.dcenter database 'R268PDB1' attachSource *> commit R268PDB1 Dispatched job JOB-46 DB_ATTACH_SOURCE job started for "Untitled/R268PDB1". Obtaining information from source database "Untitled/R268PDB1". The dSource "R268PDB1" was successfully linked from source database "Untitled/R268PDB1".
PDB CLI detach
Login to the engine via SSH with a Delphix admin account.
Select the PDB dSource database to be detached.
CODEdvde.dcenter> database dvde.dcenter database> select "R268PDB1" dvde.dcenter database 'R268PDB1'>
Detach the PDB dSource using the detachSource command:
CODEdvde.dcenter database 'R268PDB1'> detachSource dvde.dcenter database 'R268PDB1' detachSource *> set source=R268PDB1 dvde.dcenter database 'R268PDB1' detachSource *> commit Dispatched job JOB-45 DB_DETACH_SOURCE job started for "Untitled/R268PDB1". DB_DETACH_SOURCE job for "Untitled/R268PDB1" completed successfully.