Skip to main content
Skip table of contents

CLI cookbook: attaching or detaching a PDB

This topic describes how to attach or detach a PDB using the command-line interface.

PDB CLI attach

  1. Ensure the new source environment has been fully discovered by the Delphix Engine, including CDB discovery.

  2. Login to the engine via SSH with a Delphix admin account.

  3. Select the PDB dSource database to be attached.

    CODE
    delphix> database
    delphix database> select "R268PDB1"
    delphix database 'R268PDB1'>
  4. 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 PDB dSource.

    CODE
    delphix database 'R268PDB1'> attachSource
    delphix database 'R268PDB1' attachSource *> set attachData.type=OraclePDBAttachData
    delphix database 'R268PDB1' attachSource *> set attachData.config=R268PDB1
    delphix database 'R268PDB1' attachSource *> set attachData.environmentUser=ora12201
    delphix database 'R268PDB1' attachSource *> commit
        R268PDB1
        Dispatched job JOB-46
        DB_ATTACH_SOURCE job started for "Untitled/R268PDB1".
        Starting validation of attach parameters for database "Untitled/R268PDB1".
        Validation finished for database "Untitled/R268PDB1"
        Obtaining information from source database "Untitled/R268PDB1".
        The dSource "R268PDB1" was successfully linked from source database "Untitled/R268PDB1".
        DB_ATTACH_SOURCE job for "Untitled/R268PDB1" completed successfully.

PDB CLI detach

  1. Login to the engine via SSH with a Delphix admin account.

  2. Select the PDB dSource database to be detached.

    CODE
    delphix> database
    delphix database> select "R268PDB1"
    delphix database 'R268PDB1'>
  3. Detach the PDB dSource using the detachSource command:

    CODE
    delphix database 'R268PDB1'> detachSource
    delphix database 'R268PDB1' detachSource *> set source=R268PDB1
    delphix 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.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.