Pluggable Database (PDB) Management
This section covers the management of Pluggable Databases (PDBs) within a container database (CDB). It includes commands for creating (dbaascli pdb create), deleting (dbaascli pdb delete), and cloning PDBs (dbaascli pdb localClone, dbaascli pdb remoteClone). You can manage PDB states with commands to open, close, or bounce PDBs, and retrieve connection details (dbaascli pdb getConnectString). Additional commands support backup, recovery, and relocating PDBs, ensuring comprehensive control over PDB lifecycle and operations.
- dbaascli pdb backup
- dbaascli pdb bounce
- dbaascli pdb close
- dbaascli pdb create
- dbaascli pdb delete
- dbaascli pdb getConnectString
- dbaascli pdb getDetails
- dbaascli pdb list
- dbaascli pdb localClone
- dbaascli pdb open
- dbaascli pdb recover
- dbaascli pdb refresh
- dbaascli pdb remoteClone
- dbaascli pdb relocate
dbaascli pdb backup
To backup a pluggable database (PDB), query PDB backups, and delete a PDB backup, use the dbaascli pdb backup command.
Prerequisites:
- Run the command as the
rootuser.
Syntax:
dbaascli pdb backup --pdbName <value> --dbname <value>
{
--start
{
[--level1]
| [--archival --tag <value>]
}
| --delete --backupTag <value>
| --status --uuid <value>
| --getBackupReport --json <value> --tag <value>
| --list [--json <value>]
}
Parameters:
| Parameter | Attributes | Description |
|---|---|---|
--pdbName |
- | PDB name. |
--dbname |
- | Oracle AI Database name. |
--start | --delete | --status | --getBackupReport | --list |
- | - |
--start |
- | Begins PDB backup. |
--start |
--level1 | --archival |
- |
--start |
--level1 |
Creates a Level-1 (incremental) backup. |
--start |
--archival |
Creates an archival full backup. |
--start |
--archival → --tag |
Specify backup tag. |
--delete |
- | Deletes archival backup. |
--delete |
--backupTag |
Specify backup tag to delete. |
--status |
- | - |
--status |
--uuid <value> |
- |
--getBackupReport |
- | Returns backup report. |
--getBackupReport |
--json |
Specify the file name for JSON output. |
--getBackupReport |
--tag |
Specify backup tag. |
--list |
- | Returns PDB backup information. |
--list |
--json |
Specify the file name for JSON output. |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb backup command?
A: The dbaascli pdb backup command is used to create backups for a pluggable database (PDB), query backup status, generate backup reports, and delete PDB backups in an Oracle Base Database Cloud@Customer environment.
Q: What is the prerequisite for using the dbaascli pdb backup command?
A: The command must be run as the root user, and you need to be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: How do I start a PDB backup using the dbaascli pdb backup command?
A: You can start a PDB backup using the --start option. For example:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --start
Q: What options can be used with the –start flag?
A: With the --start flag, you can specify:
--level1for a Level-1 incremental backup--archivalfor a full archival backup (which also requires a--tagto specify the backup tag)
Q: How do I create a Level-1 incremental PDB backup?
A: Use the --level1 flag with the --start option to create a Level-1 incremental backup:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --start --level1
Q: How do I create an archival PDB backup?
A: Use the --archival flag with the --start option and specify a backup tag using --tag:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --start --archival --tag <backup_tag>
Q: How do I delete a specific PDB backup?
A: To delete a specific backup, use the --delete flag and specify the backup tag using --backupTag:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --delete --backupTag <backup_tag>
Q: How can I check the status of a PDB backup?
A: Use the --status flag along with the backup --uuid to check the status of a specific backup:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --status --uuid <backup_uuid>
Q: How do I retrieve a PDB backup report in JSON format?
A: To get a backup report in JSON format, use the --getBackupReport option, specify the file name with --json, and provide the backup tag with --tag:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --getBackupReport --json <file_name> --tag <backup_tag>
Q: How can I list all PDB backups for a specific PDB?
A: Use the --list option to get a list of all backups for a given PDB:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --list
Optionally, you can output the list in JSON format using the --json flag:
dbaascli pdb backup --pdbName <PDB_Name> --dbname <DB_Name> --list --json <file_name>
Q: What does the –pdbName option do?
A: The --pdbName option specifies the name of the pluggable database (PDB) that you want to back up, query, or delete backups for.
Q: What is the purpose of the –dbname option?
A: The --dbname option specifies the name of the Oracle AI Database to which the PDB belongs.
Q: How do I specify a backup tag for a PDB backup?
A: You specify a backup tag using the --tag option when starting an archival backup or when retrieving a backup report:
--tag <backup_tag>
Q: Can I run PDB backups in JSON mode?
A: Yes, both the backup report (--getBackupReport) and backup listing (--list) options support output in JSON format. You specify a JSON file name using the --json option.
Examples:
-
To take level1 backup for a PDB
pdb1in a CDBmyTestDb:dbaascli pdb backup --dbname myTestDb --pdbName pdb1 --start --level1 -
To query the status of PDB backup request submitted with
uuideef16b26361411ecb13800163e8e4fac:dbaascli pdb backup --dbname myTestDb --pdbName pdb1 --status --uuid eef16b26361411ecb13800163e8e4fac
dbaascli pdb bounce
To bounce a pluggable database (PDB), use the dbaascli pdb bounce command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb bounce
{
--pdbName <value>
| --pdbUID <value>
}
--dbname <value> [--openMode <value>] [--startServices <value>] [--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--pdbName |
specifies the name of the PDB |
--pdbUID |
specifies the identifier of the PDB |
--dbname |
specifies the name of the container database that hosts the PDB |
--openMode |
specifies the target OPEN MODE of PDB |
--startServices |
specifies to start all or a list of all services corresponding to a PDB. Accepted values are all or a comma-delimited list of PDB services. |
--waitForCompletion |
specifies to run the operation in the foreground or background. Valid values: true or false. |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb bounce command?
A: The dbaascli pdb bounce command is used to bounce (restart) a pluggable database (PDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for using the dbaascli pdb bounce command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: How do I bounce a PDB by specifying its name?
A: To bounce a PDB by specifying its name, use the following syntax:
dbaascli pdb bounce --dbname <CDB_Name> --pdbName <PDB_Name>
Q: How do I bounce a PDB by using its unique identifier (UID)?
A: To bounce a PDB using its unique identifier (UID), use the following syntax:
dbaascli pdb bounce --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: What is the –dbname option used for?
A: The --dbname option specifies the name of the container database (CDB) that hosts the pluggable database (PDB) being bounced.
Q: What is the –pdbName option used for?
A: The --pdbName option specifies the name of the pluggable database (PDB) that you want to bounce.
Q: What is the –pdbUID option used for?
A: The --pdbUID option specifies the unique identifier (UID) of the pluggable database (PDB) that you want to bounce.
Q: How do I specify the target open mode for the PDB when bouncing it?
A: You can use the --openMode option to specify the desired open mode for the PDB after bouncing. The valid values are READ_WRITE and READ_ONLY. For example:
dbaascli pdb bounce --dbname <CDB_Name> --pdbName <PDB_Name> --openMode READ_WRITE
Q: Can I open the PDB in read-only mode after bouncing it?
A: Yes, you can use the --openMode READ_ONLY option to open the PDB in read-only mode after bouncing:
dbaascli pdb bounce --dbname <CDB_Name> --pdbName <PDB_Name> --openMode READ_ONLY
Q: What is the default open mode if –openMode is not specified?
A: If --openMode is not specified, the PDB will be opened in its default open mode, which is typically READ_WRITE.
Q: Can I use both –pdbName and –pdbUID in the same command?
A: No, you should specify either --pdbName or --pdbUID, but not both in the same command.
Q: How can I restart a PDB and ensure it opens in read-write mode?
A: To restart a PDB and ensure it opens in read-write mode, use the --openMode READ_WRITE option:
dbaascli pdb bounce --dbname <CDB_Name> --pdbName <PDB_Name> --openMode READ_WRITE
Q: Is it mandatory to specify the open mode when using the dbaascli pdb bounce command?
A: No, specifying the --openMode is optional. If not provided, the PDB will open in its default mode.
Q: What happens if I don’t specify the –openMode flag?
A: If the --openMode flag is not specified, the PDB will be opened in its default mode, which is typically READ_WRITE.
Example: dbaascli pdb bounce
dbaascli pdb bounce --dbname cdb_name --pdbName pdb name associated with the CDB
dbaascli pdb bounce --dbname cdb_name --pdbUID con_uid of that pdb
Optional:
-
--openMode READ_WRITE -
--openMode READ_ONLY
dbaascli pdb close
To close a pluggable database (PDB), use the dbaascli pdb close command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb close
{
--pdbName <value>
| --pdbUID <value>
}
--dbname <value> [--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--pdbname |
specifies the name of the PDB that you want to close. |
--pdbUID |
specifies the identifier of the PDB |
--dbname |
specifies the name of the container database that hosts the PDB. |
--waitForCompletion |
specifies to run the operation in the foreground or background. Valid values: true or false. |
Upon successful completion of running this command, the PDB is closed on all of the container database instances.
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb close command?
A: The dbaascli pdb close command is used to close a pluggable database (PDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for using the dbaascli pdb close command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: How do I close a PDB by specifying its name?
A: To close a PDB by specifying its name, use the following syntax:
dbaascli pdb close --dbname <CDB_Name> --pdbName <PDB_Name>
Q: How do I close a PDB by specifying its unique identifier (UID)?
A: To close a PDB by using its unique identifier (UID), use the following syntax:
dbaascli pdb close --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: What does the –dbname option do in the dbaascli pdb close command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the pluggable database (PDB) you want to close.
Q: What does the –pdbName option do in the dbaascli pdb close command?
A: The --pdbName option specifies the name of the pluggable database (PDB) that you want to close.
Q: What is the purpose of the –pdbUID option in the dbaascli pdb close command?
A: The --pdbUID option allows you to specify the unique identifier (UID) of the pluggable database (PDB) that you want to close.
Q: Can I close the PDB on a specific instance of the CDB?
A: No, upon successful completion, the PDB is closed on all instances of the container database (CDB).
Q: Is it possible to specify both –pdbName and –pdbUID in the same command?
A: No, you can specify either --pdbName or --pdbUID, but not both in the same command.
Q: What happens when the dbaascli pdb close command completes successfully?
A: When the command completes successfully, the pluggable database (PDB) is closed on all instances of the container database (CDB).
Q: How do I close a specific PDB within a CDB using its UID?
A: You can close a specific PDB using its UID by running:
dbaascli pdb close --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: What happens if I forget to specify either –pdbName or –pdbUID?
A: You must specify either --pdbName or --pdbUID in the command. If neither is provided, the command will not run.
Q: Can I use the dbaascli pdb close command for a CDB directly?
A: No, the command is designed to close a pluggable database (PDB) within a container database (CDB), not the CDB itself.
Example: dbaascli pdb close
dbaascli pdb close --dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb close --dbname cdb name --pdbUID con_uid of that pdb
dbaascli pdb create
To create a new pluggable database (PDB), use the dbaascli pdb create command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb create --pdbName <value> --dbName <value> [--maxCPU <value>] [--maxSize <value>] [--pdbAdminUserName <value>] [--lockPDBAdminAccount <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>]
{
[--blobLocation <value>]
| [--standbyBlobFromPrimary <value>]
}
[--pdbTdeKeyVersionOCID <value>]
Parameters:
| Parameter | Attributes | Description |
|---|---|---|
--pdbName |
- | specifies the name of the new PDB that you want to create |
--dbName |
- | specifies the name of the container database that hosts the new PDB |
--maxCPU |
- | optionally specifies the maximum number of CPUs that are available to the PDB. Setting this option is effectively the same as setting the CPU_COUNT parameter in the PDB |
--maxSize |
- | optionally specifies the maximum total size of data files and temporary files for tablespaces belonging to the PDB. Setting this option is effectively the same as setting the MAXSIZE PDB storage clause in the CREATE PLUGGABLE DATABASE SQL command. You can impose a limit by specifying an integer followed by a size unit (K, M, G, or T), or you can specify UNLIMITED to explicitly enforce no limit |
--pdbAdminUserName |
- | specifies the new PDB admin user name |
--lockPDBAdminAccount |
- | specifies true or false to lock the PDB admin user account. Default value is true. |
--resume |
- | resumes the previous run |
--resume |
--sessionID |
specifies to resume a specific session ID |
--executePrereqs |
- | specifies yes to run only the prereqs for this operation. Valid values: yes or no |
--waitForCompletion |
- | specifies false to run the operation in the background. Valid values: true or false |
--blobLocation |
- | custom directory location where the standby blob file will be generated in a DG environment. |
--standbyBlobFromPrimary |
- | specifies the location of the standby blob file, which is prepared from the primary database. This is required only for standby database PDB operations. Note that the parametersblobLocation and standbyBlobFromPrimary are mutually exclusive. |
--pdbTdeKeyVersionOCID |
- | The OCID of the TDE. |
During the PDB creation process, you are prompted to specify the administration password for the new PDB.
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb create command?
A: The dbaascli pdb create command is used to create a new pluggable database (PDB) in a container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for using the dbaascli pdb create command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: What does the –pdbName option do in the dbaascli pdb create command?
A: The --pdbName option specifies the name of the new pluggable database (PDB) you want to create.
Q: What does the –dbName option do in the dbaascli pdb create command?
A: The --dbName option specifies the name of the container database (CDB) that will host the new pluggable database (PDB).
Q: Can I limit the CPU resources for the new PDB?
A: Yes, you can use the --maxCPU option to specify the maximum number of CPUs that the PDB can use. This is equivalent to setting the CPU_COUNT parameter in the PDB.
Q: How can I limit the storage size of a PDB?
A: You can use the --maxSize option to specify the maximum total size of data files and temporary files for the PDB. You can either set a size limit (in K, M, G, or T) or specify UNLIMITED for no limit.
Q: What is the –pdbAdminUserName option used for?
A: The --pdbAdminUserName option specifies the name of the admin user for the new PDB. This user will have administrative privileges within the PDB.
Q: Is it possible to lock the admin user account during PDB creation?
A: Yes, you can use the --lockPDBAdminAccount option to specify whether the PDB admin account should be locked. The default value is true (locked).
Q: What does the –resume option do in the dbaascli pdb create command?
A: The --resume option allows you to resume a previously failed PDB creation process.
Q: How do I specify a session ID for resuming a previous run?
A: You can specify a session ID using the --sessionID option to resume a specific session of the PDB creation process.
Q: What is the purpose of the –executePrereqs option?
A: The --executePrereqs option specifies whether to run only the prerequisite checks for PDB creation. You can set this option to yes or no.
Q: Can I run the PDB creation process in the background?
A: Yes, you can use the --waitForCompletion option and set it to false to run the operation in the background.
Q: What is the –standbyBlobFromPrimary option used for?
A: The --standbyBlobFromPrimary option specifies the location of the standby blob file, which is prepared from the primary database. This is required for standby database PDB operations.
Q: How will I be prompted for the PDB admin password during the creation process?
A: During the PDB creation process, you will be prompted to specify the administration password for the new PDB.
Q: Can I create a standby PDB using the dbaascli pdb create command?
A: Yes, if you are creating a standby PDB, you can use the --standbyBlobFromPrimary option to specify the location of the standby blob file from the primary database.
Q: What happens if I don’t use the –maxSize option?
A: If you do not specify the --maxSize option, the PDB will not have a storage size limit unless otherwise defined by the CDB policies.
Q: What happens if I do not provide the –pdbAdminUserName option?
A: If you do not provide the --pdbAdminUserName option, the PDB will be created without a specified admin user, and you will need to manually configure the admin user after creation.
Q: Can I resume a failed PDB creation at any point in the process?
A: Yes, as long as the session has not been terminated, you can resume a failed PDB creation using the --resume and --sessionID options.
Example: dbaascli pdb create
To create a PDB from seed in a standard database in a non-Data Guard environment:
dbaascli pdb create --dbName db721 --pdbName new_pdb1 --maxsize 5G --maxcpu 2
To create PDB in Data Guard environment:
dbaascli pdb create --dbName db721 --pdbName new_pdb1
dbaascli pdb create --dbName db721 --pdbName new_pdb1 --standbyBlobFromPrimary /tmp/send_db
721.tar
dbaascli pdb delete
To delete a pluggable database (PDB) run the dbaascli pdb delete command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb delete --dbName <value>
{
--pdbName <value>
| --pdbUID <value>
}
[--executePrereqs] [--waitForCompletion <value>] [--resume [--sessionID <value>]] [--allStandbyPrepared] [--cleanupRelocatedPDB]
Parameters:
| Parameter | Description |
|---|---|
--dbName |
specifies the name of the container database that hosts the PDB |
--pdbName |
specifies the name of the PDB that you want to delete |
--pdbUID |
specifies the UID of the PDB that you want to delete |
--executePrereqs |
specifies yes to run only the prereqs for this operation. Valid values: yes or no |
--waitForCompletion |
specifies false to run the operation in the background. Valid values: true or false |
--resume |
specifies to resume the previous execution |
--sessionID |
specifies to resume a specific session ID |
--allStandbyPrepared |
specifies to confirm that the operation has been successfully run on all the standby databases |
--cleanupRelocatedPDB |
specify to cleanup source database after a PDB has been relocated |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb delete command?
A: The dbaascli pdb delete command is used to delete a pluggable database (PDB) from a container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for running the dbaascli pdb delete command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: What does the –dbName option specify in the dbaascli pdb delete command?
A: The --dbName option specifies the name of the container database (CDB) that hosts the PDB you want to delete.
Q: How can I specify which PDB to delete using the dbaascli pdb delete command?
A: You can specify the PDB to delete using either the --pdbName option (specifies the PDB name) or the --pdbUID option (specifies the PDB UID).
Q: Can I run the prerequisite checks without actually deleting the PDB?
A: Yes, you can use the --executePrereqs option and set it to yes to run only the prerequisite checks for the PDB deletion operation.
Q: How can I run the PDB deletion process in the background?
A: Use the --waitForCompletion option and set it to false to run the deletion process in the background.
Q: What does the –resume option do in the dbaascli pdb delete command?
A: The --resume option allows you to resume a previously failed PDB deletion process.
Q: How do I resume a specific session for a PDB deletion?
A: You can specify a session ID using the --sessionID option to resume a specific session for the PDB deletion process.
Q: What does the –allStandbyPrepared option do?
A: The --allStandbyPrepared option is used to confirm that the deletion operation has been successfully run on all standby databases before proceeding with the primary PDB deletion.
Q: What is the purpose of the –cleanupRelocatedPDB option?
A: The --cleanupRelocatedPDB option cleans up the source database after a PDB has been relocated, ensuring no residuals are left after the relocation.
Q: Can I delete a PDB that has already been relocated?
A: Yes, you can use the --cleanupRelocatedPDB option to delete a PDB that has already been relocated to a new CDB.
Q: How do I ensure that the delete operation runs successfully on standby databases?
A: Use the --allStandbyPrepared option to confirm that the operation has run successfully on all standby databases before proceeding.
Q: What happens if the delete process fails and needs to be resumed?
A: You can resume the delete process by using the --resume option, and if needed, specify the session ID with --sessionID.
Q: What does setting –waitForCompletion to false do?
A: Setting --waitForCompletion to false allows the delete process to run in the background, letting you continue working without waiting for the operation to finish.
Example: dbaascli pdb delete
To delete a PDB from a standard database in a non-Data Guard environment or from Standby database in Data Guard environment.
dbaascli pdb delete --dbName db721 --pdbName pdb1
To create PDB from Primary database in Data Guard environment:
dbaascli pdb create --dbName db721 --pdbName pdb1 --allStandbyPrepared
dbaascli pdb getConnectString
To display Oracle Net connect string information for a pluggable database (PDB) run the dbaascli pdb getConnectString command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb getConnectString --dbname <value>
{
--pdbName <value>
| --pdbUID <value>
}
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the name of the container database that hosts the PDB |
--pdbname |
specifies the name of the PDB for which you want to display connect string information |
--pdbUID |
specifies the identifier of the PDB |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb getConnectString command?
A: The dbaascli pdb getConnectString command is used to display the Oracle Net connect string information for a pluggable database (PDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for using the dbaascli pdb getConnectString command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: How do I retrieve the connect string of a PDB by specifying its name?
A: To retrieve the connect string by specifying the PDB name, use the following syntax:
dbaascli pdb getConnectString --dbname <CDB_Name> --pdbName <PDB_Name>
Q: How do I retrieve the connect string of a PDB by specifying its unique identifier (UID)?
A: To retrieve the connect string using the PDB’s unique identifier (UID), use the following syntax:
dbaascli pdb getConnectString --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: What does the –dbname option do in the dbaascli pdb getConnectString command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the pluggable database (PDB) for which you want to display the connect string information.
Q: What does the –pdbName option do in the dbaascli pdb getConnectString command?
A: The --pdbName option specifies the name of the pluggable database (PDB) for which you want to retrieve the Oracle Net connect string information.
Q: What is the purpose of the –pdbUID option in the dbaascli pdb getConnectString command?
A: The --pdbUID option allows you to specify the unique identifier (UID) of the pluggable database (PDB) for which you want to display the connect string.
Q: Can I use both –pdbName and –pdbUID in the same command?
A: No, you can use either --pdbName or --pdbUID, but not both in the same command.
Q: What type of information is returned by the dbaascli pdb getConnectString command?
A: The command returns the Oracle Net connect string information for the specified pluggable database (PDB).
Q: Can I retrieve the connect string for a PDB on a specific container database instance?
A: No, the connect string is for the PDB as a whole, not for a specific instance of the container database.
Q: How can I get the connect string information if I only know the PDB’s unique identifier (UID)?
A: You can retrieve the connect string using the PDB’s UID by running:
dbaascli pdb getConnectString --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: What happens if I don’t provide either –pdbName or –pdbUID?
A: You must specify either --pdbName or --pdbUID to retrieve the connect string. The command will not run without one of these options.
Q: Is the connect string information for the PDB always the same across all instances of the CDB?
A: Yes, the connect string information is consistent for the PDB across all instances of the container database (CDB).
Example: dbaascli pdb getConnectString
dbaascli pdb getConnectString --dbname dbname --pdbName pdbName
dbaascli pdb getDetails
To view details of a pluggable database (PDB), use the dbaascli pdb getDetails command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb getDetails --dbname <value>
{
--pdbName <value>
| --pdbUID <value>
}
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the name of the container database that hosts the PDB |
--pdbname |
specifies the name of the PDB that you want to delete |
--pdbUID |
specifies the identifier of the PDB |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb getDetails command?
A: The dbaascli pdb getDetails command is used to view details of a pluggable database (PDB) hosted in a container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for running the dbaascli pdb getDetails command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: What does the –dbname option specify in the dbaascli pdb getDetails command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the PDB for which you want to view details.
Q: How do you specify the PDB for which you want to view details?
A: You can specify the PDB using either the --pdbName option (to provide the PDB name) or the --pdbUID option (to provide the PDB UID).
Q: What is the difference between –pdbName and –pdbUID?
A: The --pdbName option uses the name of the PDB to fetch details, whereas the --pdbUID option uses the unique identifier (UID) of the PDB to fetch its details.
Q: Can I use both –pdbName and –pdbUID together in the dbaascli pdb getDetails command?
A: No, you can specify either the --pdbName or the --pdbUID option to get details of the PDB, but not both at the same time.
Q: What are some use cases for the dbaascli pdb getDetails command?
A: You can use the dbaascli pdb getDetails command to:
-
Retrieve details about a specific PDB in a CDB.
-
Verify the configuration of a PDB.
-
Check the status of a PDB within a CDB.
Q: How can I view details of a PDB based on its name?
A: To view details of a PDB based on its name, use the following syntax:
dbaascli pdb getDetails --dbname <CDB_Name> --pdbName <PDB_Name>
Q: How can I view details of a PDB based on its UID?
A: To view details of a PDB based on its UID, use the following syntax:
dbaascli pdb getDetails --dbname <CDB_Name> --pdbUID <PDB_UID>
Q: Can this command be used for multiple PDBs in one execution?
A: No, the command can be used to fetch details of one PDB at a time by specifying either its name or UID.
Example: dbaascli pdb getDetails
dbaascli pdb getDetails--dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb getDetails--dbname cdb name --pdbUID con_uid of that pdb
dbaascli pdb list
To view the list of pluggable databases (PDB) in a container database, use the dbaascli pdb list command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb list --dbname
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the name of the container database that hosts the PDB |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb list command?
A: The dbaascli pdb list command is used to view the list of pluggable databases (PDBs) in a specified container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for running the dbaascli pdb list command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine.
Q: What does the –dbname option specify in the dbaascli pdb list command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the pluggable databases (PDBs) for which you want to view the list.
Q: Can I view the list of PDBs from multiple container databases at once?
A: No, the dbaascli pdb list command allows you to list the PDBs from only one container database (CDB) at a time, specified by the --dbname option.
Q: How do I list the PDBs in a specific container database (CDB)?
A: You can list the PDBs in a specific CDB by using the following syntax:
dbaascli pdb list --dbname <CDB_Name>
Q: What information is displayed when using the dbaascli pdb list command?
A: The command returns a list of all pluggable databases (PDBs) within the specified container database (CDB). The list typically includes the names of the PDBs and possibly other details like their status.
Q: Can I filter the PDB list using additional options?
A: No, the dbaascli pdb list command does not support additional filtering options. It simply returns the complete list of PDBs within the specified CDB.
Q: What happens if the specified –dbname does not exist or is incorrect?
A: If the specified --dbname is incorrect or does not exist, the command will return an error, and no PDB list will be displayed.
Q: Can the dbaascli pdb list command be used for any Oracle AI Database environment?
A: No, the dbaascli pdb list command is specifically designed for use in Oracle Base Database Cloud@Customer environments.
Example: dbaascli pdb list
dbaascli pdb list --dbname cdb name
dbaascli pdb localClone
To create a new pluggable database (PDB) as a clone of an existing PDB in the same container database (CDB), use the dbaascli pdb localClone command.
Prerequisites:
Run the command as the oracle user.
Syntax:
dbaascli pdb localClone --pdbName <value> --dbName <value> [--targetPDBName <value>] [--powerLimit <value>] [--maxCPU <value>] [--maxSize <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>]
{
[--blobLocation <value>]
| [--standbyBlobFromPrimary <value>]
}
[--excludeUserTablespaces <value>] [--excludePDBData <value>] [--pdbAdminUserName <value>] [--lockPDBAdminAccount <value>] [--sourcePDBServiceConvertList <value>]
{
[--createFromSnapshot
{
--snapshotName <value>
| --snapshotUID <value>
}
[--copyDataFiles]]
| [--snapshot]
}
Parameters:
| Parameter | Attributes | Description |
|---|---|---|
--pdbName |
- | specifies the name of the new PDB that you want to clone |
--dbName |
- | specifies the name of the database |
--targetPDBName |
- | specifies the name for the target PDB (new cloned PDB) |
--powerLimit |
- | specifies the degree of parallelism to be used for the clone operation. Valid value is between 1 and 128 |
--maxCPU |
- | specifies the maximum number of CPUs to be allocated for the PDB |
--maxSize |
- | specifies the maximum storage size in GB for the new PDB |
--resume |
- | resumes the previous run |
--resume |
--sessionID |
specifies to resume a specific session ID |
--executePrereqs |
- | specifies yes to run only the prereqs for this operation. Valid values: yes or no |
--waitForCompletion |
- | specifies false to run the operation in the background. Valid values: true or false |
--blobLocation |
- | custom directory location where the standby blob file will be generated in a DG environment. |
--standbyBlobFromPrimary |
- | specifies the location of the standby blob file which is prepared from the primary database. This is required only for standby database PDB operations. Note that the parameters --blobLocation and --standbyBlobFromPrimary are mutually exclusive. |
--excludeUserTablespaces |
- | option to skip user table spaces, example t1,t2,t3. |
--excludePDBData |
- | specify true/yes to skip user data from source PDB. |
--pdbAdminUserName |
- | specify new PDB admin user name. |
--lockPDBAdminAccount |
- | specify true or false to lock the PDB admin user account. Default value is true. |
--sourcePDBServiceConvertList |
- | specify a comma-delimited list of source to target service names which need to be converted. Syntax is source_srv1:new_srv1,source_srv2:new_srv2. |
--createFromSnapshot | --snapshot |
- | - |
--createFromSnapshot |
- | specify to create PDB from PDB snapshot |
--createFromSnapshot |
--snapshotName | --snapshotUID |
- |
--createFromSnapshot |
--snapshotName |
specify the snapshot name to create PDB from PDB. |
--createFromSnapshot |
--snapshotUID |
specify the snapshot UID to create PDB from PDB. |
--createFromSnapshot |
--copyDataFiles |
specify this option to skip snapshot copy. |
--snapshot |
- | specify to create PDB with snapshot copy. |
The newly cloned PDB inherits administration passwords from the source PDB.
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb localClone command?
A: The dbaascli pdb localClone command is used to create a new pluggable database (PDB) as a clone of an existing PDB in the same container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: What are the prerequisites for running the dbaascli pdb localClone command?
A: The command must be run as the oracle user, and you must be connected to an Oracle Base Database Cloud@Customer virtual machine. Additionally, the source PDB must already exist in the specified CDB.
Q: What does the –dbName option specify in the dbaascli pdb localClone command?
A: The --dbName option specifies the name of the container database (CDB) that hosts the source PDB from which the new PDB will be cloned.
Q: What does the –pdbName option specify in the dbaascli pdb localClone command?
A: The --pdbName option specifies the name of the new PDB that you want to create as a clone of the existing PDB in the same CDB.
Q: Can I clone a PDB with a different name using the dbaascli pdb localClone command?
A: Yes, you can specify a different name for the cloned PDB using the --targetPDBName option. If this option is not provided, the cloned PDB will inherit the name of the source PDB.
Q: What does the –resume option do in the dbaascli pdb localClone command?
A: The --resume option allows you to resume a previously interrupted PDB cloning operation.
Q: How do I limit the CPU resources available to the cloned PDB?
A: You can limit the CPU resources for the cloned PDB using the --maxCPU option, which specifies the maximum number of CPUs that will be allocated to the new PDB.
Q: Can I run the PDB cloning operation in the background?
A: Yes, you can run the operation in the background by setting the --waitForCompletion option to false. If you set it to true, the operation will run in the foreground and wait for completion.
Q: What is the purpose of the –maxSize option in the dbaascli pdb localClone command?
A: The --maxSize option specifies the maximum storage size (in GB) for the newly cloned PDB. If no size is specified, the cloned PDB inherits the same storage limits as the source PDB.
Q: Can I control the parallelism of the PDB clone operation?
A: Yes, you can control the degree of parallelism for the cloning operation using the --powerLimit option. This option accepts values between 1 and 128 to define the degree of parallelism.
Q: What is the –primaryDBWalletTar option used for?
A: The --primaryDBWalletTar option specifies the location of the primary database wallet tar file. This option is only required if the cloning operation involves standby database PDB operations.
Q: Can I run only the prerequisite checks for the cloning operation?
A: Yes, you can run only the prerequisite checks by using the --executePrereqs option and setting it to yes. The valid values are yes and no.
Q: What happens if the PDB cloning operation fails or is interrupted?
A: If the cloning operation fails or is interrupted, you can resume it by using the --resume option to continue from where the operation stopped.
Example: dbaascli pdb localClone
dbaascli pdb localClone --dbName db35 --pdbName PDB35 --targetPDBName local_clone1 --maxCPU 2 --maxSize 15
dbaascli pdb open
To open a pluggable database (PDB), use the dbaascli pdb open command.
Run the command as the root or oracle user.
Syntax:
dbaascli pdb open
{
--pdbName <value>
| --pdbUID <value>
}
--dbname <value> [--openMode <value>] [--startServices <value>] [--waitForCompletion <value>] [--setPDBRefreshModeNone [--skipPDBRefresh] [--pdbAdminUserName <value>]] [--executePrereqs] [--resume [--sessionID <value>]] [--blobLocation <value>]
Parameters:
| Parameter | Description |
|---|---|
--pdbName |
specifies the name of the PDB that you want to open |
--pdbUID |
specifies the identifier of the PDB |
--dbname |
specifies the name of the container database that hosts the PDB. |
--openMode |
specifies the target OPEN MODE of PDB |
--startServices |
specifies to start all or list all services corresponding to a PDB. Accepted values are all or a comma-delimited list of PDB services. |
--waitForCompletion |
specify false to run the operation in the background. Valid values: true or false |
--setPDBRefreshModeNone |
specifies to convert a refreshable PDB to non-refreshable PDB |
--skipPDBRefresh |
specifies to skip refreshable PDB refresh |
--pdbAdminUserName |
specifies new PDB admin user name |
--executePrereqs |
specifies to run the prerequisite checks and report the results |
--resume |
resumes the previous operation |
--sessionID |
specifies to resume a specific session ID |
--blobLocation |
specifies the custom directory location where the standby blob file will be generated in a Data Guard environment |
Upon successful completion, the PDB is opened on all of the container database instances.
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb open command?
A: The dbaascli pdb open command is used to open a pluggable database (PDB) in an Oracle container database (CDB) in an Oracle Base Database Cloud@Customer environment.
Q: Who can run the dbaascli pdb open command?
A: The command can be run as either the root or oracle user.
Q: What does the –pdbName option specify in the dbaascli pdb open command?
A: The --pdbName option specifies the name of the PDB that you want to open.
Q: What does the –pdbUID option specify in the dbaascli pdb open command?
A: The --pdbUID option specifies the unique identifier (UID) of the PDB that you want to open.
Q: What does the –dbname option specify in the dbaascli pdb open command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the PDB.
Q: What is the purpose of the –openMode option?
A: The --openMode option specifies the mode in which the PDB will be opened. Valid values are READ_WRITE and READ_ONLY.
Q: Can I start services when opening the PDB?
A: Yes, you can use the --startServices option to either start all services associated with the PDB by specifying all or provide a comma-delimited list of specific services to start.
Q: What happens if I set the –waitForCompletion option to false?
A: If --waitForCompletion is set to false, the command will run in the background, and the user does not need to wait for the operation to complete. If set to true, the command will wait for completion before exiting.
Q: What does the –setPDBRefreshModeNone option do?
A: The --setPDBRefreshModeNone option converts a refreshable PDB (one that is regularly updated from a primary database) into a non-refreshable PDB.
Q: What is the function of the –skipPDBRefresh option?
A: The --skipPDBRefresh option allows you to skip the refresh operation when opening a refreshable PDB, preventing the PDB from syncing with the primary database at that time.
Q: What does the –pdbAdminUserName option do in the dbaascli pdb open command?
A: The --pdbAdminUserName option allows you to specify a new PDB admin username when opening the PDB.
Q: What happens if the dbaascli pdb open command is successful?
A: Upon successful completion, the specified PDB will be opened on all instances of the container database (CDB).
Q: Is it possible to run the dbaascli pdb open command for a refreshable PDB?
A: Yes, the command can be used for refreshable PDBs. The --setPDBRefreshModeNone option converts the PDB to non-refreshable, and the --skipPDBRefresh option skips the refresh operation during the opening process.
Q: What is the default open mode for a PDB if no –openMode is specified?
A: If no --openMode is specified, the PDB is typically opened in READ_WRITE mode by default.
Example: dbaascli pdb open
dbaascli pdb open --dbname cdb name --pdbName pdb name associated with the CDB
dbaascli pdb open --dbname cdb name --pdbUID con_uid of that pdb
Optional: --openMode READ_WRITE/READ_ONLY
dbaascli pdb recover
To recover a pluggable database (PDB), use the dbaascli pdb recover command.
Prerequisites:
-
Run the command as the
rootuser. -
Database must be configured with backup storage destination details where backups are stored.
Syntax:
dbaascli pdb recover --dbname <value> --pdbName <value>
{
--start
{
--untilTime <value> [--nonUTC]
| --untilSCN <value>
| --latest
| --tag <value>
}
| --status --uuid <value>
}
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the name of the container database that hosts the PDB |
--pdbName |
specifies the name of the PDB that you want to recover |
--start |
begins the recovery of a PDB. |
--untilTime |
recovers PDB until time. Input format: DD-MON-YYYY HH24:MI:SS |
--untilSCN |
recovers PDB until SCN |
--latest |
recovers PDB to the last known state |
--tag |
recovers PDB to archival tag |
--status |
displays the details about a PDB recovery job process |
--uuid |
unique identifier of the PDB recovery operation. Input format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb recover command?
A: The dbaascli pdb recover command is used to recover a pluggable database (PDB) to a previous state using backups stored in a configured backup storage destination.
Q: Who can run the dbaascli pdb recover command?
A: The command must be run as the root user.
Q: What is required before running the dbaascli pdb recover command?
A: Before running the command, the database must be configured with backup storage destination details where backups are stored.
Q: What does the –pdbName option specify in the dbaascli pdb recover command?
A: The --pdbName option specifies the name of the pluggable database (PDB) that you want to recover.
Q: What does the –dbname option specify in the dbaascli pdb recover command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the PDB.
Q: What are the possible options for starting a PDB recovery using the –start option?
A: You can recover the PDB using one of the following options:
-
--untilTime <value>: Recovers the PDB until a specified time (format:DD-MON-YYYY HH24:MI). -
--untilSCN <value>: Recovers the PDB until a specified System Change Number (SCN). -
--latest: Recovers the PDB to the latest known state. -
--tag <value>: Recovers the PDB to a specific archival tag.
Q: What is the format required for specifying the time in the –untilTime option?
A: The time must be in the format DD-MON-YYYY HH24:MI:SS.
Q: How can I recover a PDB to the latest state using dbaascli pdb recover?
A: To recover the PDB to the latest known state, use the --latest option:
dbaascli pdb recover --pdbName <value> --dbname <value> --start --latest
Q: How do I recover a PDB to a specific archival tag?
A: You can recover the PDB to a specific tag using the --tag option:
dbaascli pdb recover --pdbName <value> --dbname <value> --start --tag <tag_value>
Q: Can I recover a PDB using a specific SCN?
A: Yes, you can recover the PDB to a specific SCN using the --untilSCN option:
dbaascli pdb recover --pdbName <value> --dbname <value> --start --untilSCN <SCN_value>
Q: What does the –status option do in the dbaascli pdb recover command?
A: The --status option is used to check the status of a recovery operation. You must provide the --uuid to specify the recovery session.
Q: How can I check the status of a PDB recovery?
A: To check the status of a recovery operation, use the --status option with the --uuid of the recovery session:
dbaascli pdb recover --pdbName <value> --dbname <value> --status --uuid <uuid_value>
Q: What happens if I specify the –latest option in the recovery command?
A: If you specify the --latest option, the PDB will be recovered to the most recent state available in the backup.
Examples:
-
To recover a PDB
pdb1in a CDBmyTestDbto latest:dbaascli pdb recover --dbname myTestDb --pdbName pdb1 --start --latest -
To query the status of PDB recovery request submitted with
uuid81a17352362011ecbc3000163e8e4fac:dbaascli pdb recover --dbname myTestDb --pdbName pdb1 --status --uuid 81a17352362011ecbc3000163e8e4fac
dbaascli pdb refresh
To refresh a specified pluggable database (PDB), use the dbaascli pdb refresh command.
Run the command as the root or oracle user.
Syntax:
dbaascli pdb refresh --dbname <value>
{
--pdbName <value>
| --pdbUID <value>
}
[--waitForCompletion <value>]
Parameters:
| Parameter | Description |
|---|---|
--dbname |
specifies the name of the Oracle AI Database |
--pdbName |
specifies the name of the pluggable database |
--pdbUID |
specifies the identifier of the pluggable database |
--waitForCompletion |
specify false to run the operation in the background. Valid values: true or false |
Frequently Asked Questions:
Q: What is the purpose of the dbaascli pdb refresh command?
A: The dbaascli pdb refresh command is used to refresh a specified pluggable database (PDB) in a container database (CDB).
Q: Who can run the dbaascli pdb refresh command?
A: The command can be run by either the root or oracle user.
Q: What does the –dbname option specify in the dbaascli pdb refresh command?
A: The --dbname option specifies the name of the container database (CDB) that hosts the pluggable database (PDB) to be refreshed.
Q: What does the –pdbName option specify in the dbaascli pdb refresh command?
A: The --pdbName option specifies the name of the pluggable database (PDB) that you want to refresh.
Q: What does the –pdbUID option specify in the dbaascli pdb refresh command?
A: The --pdbUID option specifies the unique identifier (UID) of the pluggable database (PDB) that you want to refresh.
Q: What does the –waitForCompletion option do in the dbaascli pdb refresh command?
A: The --waitForCompletion option specifies whether the operation should be run in the foreground or background. If set to true, the operation will run in the foreground and wait for completion. If set to false, the operation will run in the background.
Q: How can I refresh a PDB and run the operation in the background?
A: To refresh a PDB and run the operation in the background, use the --waitForCompletion false option:
dbaascli pdb refresh --dbname <value> --pdbName <value> --waitForCompletion false
Q: How do I refresh a PDB using its unique identifier (UID)?
A: You can refresh the PDB using the --pdbUID option:
dbaascli pdb refresh --dbname <value> --pdbUID <value>
Q: Can I specify both –pdbName and –pdbUID together in the dbaascli pdb refresh command?
A: No, you must specify either --pdbName or --pdbUID, but not both, when refreshing a PDB.
Q: What happens if I don’t include the –waitForCompletion option in the command?
A: If you don’t specify the --waitForCompletion option, the default behavior will be to wait for the operation to complete before returning control to the user.
Q: Can I refresh a PDB while the database is running?
A: Yes, you can refresh a PDB while the database is running, as long as the command is executed by a user with appropriate privileges.
dbaascli pdb remoteClone
To create a new pluggable database (PDB) as a clone of an existing PDB in another container database (CDB), use the dbaascli pdb remoteClone command.
Run the command as the root or oracle user.
Syntax:
dbaascli pdb remoteClone --pdbName <value> --dbName <value> --sourceDBConnectionString <value> [--targetPDBName <value>] [--powerLimit <value>] [--maxCPU <value>] [--maxSize <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>] [--sourcePDBExportedTDEKeyFile <value>]
{
[--blobLocation <value>]
| [--standbyBlobFromPrimary <value>]
}
[--excludeUserTablespaces <value>] [--excludePDBData <value>] [--pdbAdminUserName <value>] [--lockPDBAdminAccount <value>] [--sourcePDBServiceConvertList <value>] [--upgradePDB]
{
[--createFromSnapshot --snapshotName <value> [--copyDataFiles]]
| [--snapshot]
}
[--refreshablePDB --refreshMode <value> [--refreshIntervalInMinutes <value>]] [--updateDBBlockCacheSize]
{
[--dblinkUsername <value> [--honorCaseSensitiveUserName]]
| [--dbLinkName <value>]
}
[--keepSourceDBServices <value>]
Parameters:
| Parameter | Attributes | Description |
|---|---|---|
--pdbName |
- | specifies the name of the source PDB that you want to clone |
--dbname |
- | specifies the name (DB_NAME) of the CDB that hosts the newly cloned PDB |
--sourceDBConnectionString |
- | specifies the source database connection string in the format scan_name:scan_port/database_service_name |
--targetPDBName |
- | specifies the name for the target PDB (new cloned PDB) |
--powerLimit |
- | specifies the degree of parallelism to be used for the clone operation. Valid value is between 1 and 128 |
--maxCPU |
- | specifies the maximum number of CPUs to be allocated for the PDB |
--maxSize |
- | specifies the maximum storage size in GB for the new PDB |
--resume |
- | resumes the previous run |
--resume |
--sessionID |
specifies to resume a specific session ID |
--executePrereqs |
- | specifies yes to run only the prereqs for this operation. Valid values: yes or no |
--waitForCompletion |
- | specifies false to run the operation in the background. Valid values: true or false |
--sourcePDBExportedTDEKeyFile |
- | specifies the source PDB exported key file. This variable is applicable to only 12.1 database. |
--blobLocation |
- | specifies the custom path where the standby blob file will be generated in a Data Guard environment |
--standbyBlobFromPrimary |
- | specify the location of the standby blob file, which is prepared from the primary database. This is required only for standby database PDB operations. Note that the parameters --blobLocation and --standbyBlobFromPrimary are mutually exclusive. |
--excludeUserTablespaces |
- | option to skip user table spaces, example t1,t2,t3. |
--excludePDBData |
- | specify true/yes to skip user data from source PDB. |
--pdbAdminUserName |
- | specifies new PDB admin user name |
--lockPDBAdminAccount |
- | specify true or false to lock the PDB admin user account. Default value is true. |
--sourcePDBServiceConvertList |
- | specify a comma-delimited list of source to target service names, which need to be converted. Syntax is source_srv1:new_srv1, source_srv2:new_srv2. |
--upgradePDB |
- | specify to upgrade the PDB as part of this operation |
--createFromSnapshot | --snapshot |
- | - |
--createFromSnapshot |
- | specify to create PDB from PDB snapshot |
--createFromSnapshot |
--snapshotName |
specify the snapshot name to create PDB from PDB. |
--createFromSnapshot |
--copyDataFiles |
specify this option to skip snapshot copy. |
--snapshot |
- | specify to create PDB with snapshot copy. |
--refreshablePDB |
- | specifies to create refreshable PDB |
--refreshablePDB |
--refreshMode |
specifies refresh mode for refreshable PDB. Valid values: AUTO or MANUAL |
--refreshablePDB |
--refreshMode → --refreshIntervalInMinutes |
specifies refresh interval for refreshablePDB in minutes |
--refreshablePDB |
--dblinkUsername |
specifies common user of a remote database used for database link to connect to the remote database |
--refreshablePDB |
--dblinkUsername → --honorCaseSensitiveUserName |
indicates specified username is case sensitive |
--dbLinkName |
- | specifies an existing database link name in the target database that points to the remote database |
When promoted, you must supply the SYS user password for the source PDB. The newly cloned PDB inherits administration passwords from the source PDB. The cloned PDB is named using the following format: dbname_sourcepdbname. This command is supported only for databases that are not in a Data Guard configuration and use Oracle AI Database version
12.2.0.1, or later.
Frequently Asked Questions:
Q: What is the dbaascli pdb remoteClone command used for?
A: The dbaascli pdb remoteClone command is used to create a new Pluggable Database (PDB) as a clone of an existing PDB in another container database (CDB).
Q: What user should execute the dbaascli pdb remoteClone command?
A: The command should be executed as either the root or oracle user.
Q: What is required when prompted during the dbaascli pdb remoteClone operation?
A: You must supply the SYS user password for the source PDB.
Q: What does the –pdbName parameter specify?
A: The --pdbName parameter specifies the name of the source PDB that you want to clone.
Q: What does the –dbName parameter represent?
A: The --dbName parameter represents the name (DB_NAME) of the CDB that will host the newly cloned PDB.
Q: How should the –sourceDBConnectionString be formatted?
A: The --sourceDBConnectionString should be formatted as <scan_name>:<scan_port>/<database_service_name>.
Q: What is the purpose of the –targetPDBName parameter?
A: The --targetPDBName parameter specifies the name for the newly cloned PDB.
Q: What does –powerLimit control?
A: The --powerLimit parameter controls the degree of parallelism used for the cloning operation. The valid value is between 1 and 128.
Q: What does the –maxCPU parameter define?
A: The --maxCPU parameter defines the maximum number of CPUs to be allocated for the PDB cloning process.
Q: What is the function of –maxSize?
A: The --maxSize parameter specifies the maximum storage size in GB for the new PDB.
Q: What does the –resume parameter do?
A: The --resume parameter resumes the previous cloning operation.
Q: What should you provide with the –resume option?
A: You can specify a --sessionID to resume a specific session if you are resuming a previous operation.
Q: What does –executePrereqs control?
A: The --executePrereqs parameter determines if only the prerequisites for the cloning operation should be run. Valid values are yes or no.
Q: How does –waitForCompletion affect the operation?
A: The --waitForCompletion parameter specifies whether to wait for the operation to complete or run it in the background. Valid values are true or false.
Q: What is specified by the –sourcePDBExportedTDEKeyFile parameter?
A: The --sourcePDBExportedTDEKeyFile parameter specifies the exported key file from the source PDB. This parameter is applicable only for Oracle Database version 12.1.
Q: What does the –blobLocation parameter define?
A: The --blobLocation parameter specifies the custom path where the standby BLOB file will be generated in a Data Guard environment.
Q: When is –standbyBlobFromPrimary used?
A: The --standbyBlobFromPrimary parameter specifies the location of the standby BLOB file prepared from the primary database. This is required only for standby database PDB operations.
Q: Can –blobLocation and –standbyBlobFromPrimary be used together?
A: No, --blobLocation and --standbyBlobFromPrimary are mutually exclusive and cannot be used together.
Q: What does the –excludeUserTablespaces option do?
A: The --excludeUserTablespaces option allows you to skip specific user tablespaces from being cloned. For example, t1,t2,t3.
Q: What is the effect of –excludePDBData?
A: The --excludePDBData option specifies whether to skip user data from the source PDB during cloning. Valid values are true or yes.
Q: What is specified by –pdbAdminUserName?
A: The --pdbAdminUserName parameter specifies the new admin user name for the cloned PDB.
Q: What does the –lockPDBAdminAccount option control?
A: The --lockPDBAdminAccount option specifies whether to lock the PDB admin user account. The default value is true.
Q: What does –sourcePDBServiceConvertList specify?
A: The --sourcePDBServiceConvertList parameter specifies a comma-delimited list of source to target service name conversions. For example, source_srv1:new_srv1,source_srv2:new_srv2.
Q: What is the purpose of –refreshablePDB?
A: The --refreshablePDB parameter specifies whether to create a refreshable PDB.
Q: What does –refreshMode control?
A: The --refreshMode parameter controls the refresh mode for a refreshable PDB. Valid values are AUTO or MANUAL.
Q: How does –refreshIntervalInMinutes work?
A: The --refreshIntervalInMinutes parameter specifies the interval in minutes for refreshing the refreshable PDB.
Q: What is –dblinkUsername used for?
A: The --dblinkUsername parameter specifies a common user of a remote database used for the database link to connect to the remote database.
Q: What does the –honorCaseSensitiveUserName option indicate?
A: The --honorCaseSensitiveUserName option indicates that the specified username is case-sensitive.
Q: What is the effect of –updateDBBlockCacheSize?
A: The --updateDBBlockCacheSize option enables the application to set the DB block cache size initialization parameters to support data copy with a different block size.
Q: What should I do if I encounter an error with the dbaascli pdb remoteClone command?
A: Review the error message for details, ensure all parameters are correctly specified, and verify that you have the necessary permissions and credentials. Additionally, check that the source and target databases meet all the requirements.
Q: What if I forget the SYS user password for the source PDB?
A: You will need to reset or recover the SYS user password for the source PDB. Without it, the cloning operation cannot be completed.
Example: dbaascli pdb remoteClone
dbaascli pdb remoteClone --sourceDBConnectionString test-can.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com:1521 --pdbName source_pdb1 --dbName db9944 --targetPDBName new_pdb1 --maxsize 5 --maxcpu 2
dbaascli pdb remoteClone --sourceDBConnectionString orcla.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com --pdbName source_pdb1 --dbName db9944 --targetPDBName new_pdb1 --maxsize 5 --maxcpu 2
dbaascli pdb relocate
To relocate the specified PDB from the remote database into local database, use the dbaascli pdb relocate command.
Prerequisites:
Run the command as the oracle user. When prompted, you must supply the SYS user password for the source database.
Syntax:
dbaascli pdb relocate --pdbName <value> --dbName <value> --sourceDBConnectionString <value> [--targetPDBName <value>] [--powerLimit <value>] [--maxCpu <value>] [--maxSize <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--sourcePDBServices <value>] [--sourcePDBReadOnlyServices <value>] [--relocateAvailabilityType <value>] [--waitForCompletion <value>]
{
[--blobLocation <value>]
| [--standbyBlobFromPrimary <value>]
}
[--upgradePDB] [--updateDBBlockCacheSize]
{
[--skipOpenPDB [--enableRefreshMode --refreshMode <value> [--refreshIntervalInMinutes <value>]]]
| [--completePDBRelocate]
}
{
[--dblinkUsername <value> [--honorCaseSensitiveUserName]]
| [--dbLinkName <value>]
}
Parameters:
| Parameter | Attributes | Description |
|---|---|---|
--pdbName |
- | specifies the source PDB name to relocate |
--dbName |
- | specifies the target database name |
--sourceDBConnectionString |
- | specifies the source database connection string in the format <scan_name>:<scan_port>/<database_service_name> |
--targetPDBName |
- | specifies a name for the target PDB (new relocated PDB) |
--powerLimit |
- | specifies the degree of parallelism to be used for the relocate operation |
--maxCpu |
- | specifies the maximum number of CPUs to be allocated for the PDB |
--maxSize |
- | specifies the maximum storage size in GB for the new PDB |
--resume |
- | specifies to resume the previous execution |
--resume |
--sessionID |
specifies to resume a specific session ID |
--executePrereqs |
- | specifies yes to run only the prereqs for this operation. Valid values: yes or no |
--sourcePDBServices |
- | specifies a list of comma-delimited source PDB services |
--sourcePDBReadOnlyServices |
- | specifies a comma-delimited list of source PDB read-only services |
--relocateAvailabilityType |
- | specifies MAX or NORMAL availability to enable the listener connection forwarding |
--waitForCompletion |
- | specifies false to run the operation in the background. Valid values: true or false |
--blobLocation |
- | specifies a custom directory location where the standby blob file will be generated in a DG environment. |
--standbyBlobFromPrimary |
- | specifies the location of the standby BLOB file, which is prepared from the primary database. This is required only for standby operations. |
--upgradePDB |
- | specify true specifies to upgrade the PDB as part of this operation. Valid values: true or false. |
--updateDBBlockCachesize |
- | specifies to enable application to set db block cache size initialization parameters to support data copy with different block size |
--skipOpenPDB |
- | specifies to indicate that the PDB should not be opened at the end of the current operation. |
--skipOpenPDB |
--enableRefreshMode |
specifies to enable PDB refresh support in PDB relocate step-one. |
--skipOpenPDB |
--enableRefreshMode → --refreshMode |
specifies to refresh mode for refreshable PDB. Valid values: AUTO or MANUAL |
--skipOpenPDB |
--enableRefreshMode → --refreshMode → --refreshIntervalInMinutes |
specifies to refresh interval for refreshablePDB in minutes |
--completePDBRelocate |
- | specifies to complete the PDB relocation if done as a two-step operation. |
Frequently Asked Questions:
Q: What is the dbaascli pdb relocate command used for?
A: The dbaascli pdb relocate command is used to relocate a Pluggable Database (PDB) from a remote database to a local database.
Q: What user should run the dbaascli pdb relocate command?
A: The command should be run as the Oracle user.
Q: What is required when prompted during the dbaascli pdb relocate operation?
A: You must supply the SYS user password for the source database.
Q: What does the –pdbName parameter specify?
A: The --pdbName parameter specifies the name of the source PDB to be relocated.
Q: What is the purpose of the –dbName parameter?
A: The --dbName parameter specifies the target database name where the PDB will be relocated.
Q: How should the –sourceDBConnectionString be formatted?
A: The --sourceDBConnectionString should be formatted as <scan_name>:<scan_port>/<database_service_name>.
Q: What does the –targetPDBName parameter do?
A: The --targetPDBName parameter specifies a new name for the relocated PDB.
Q: What is the use of –powerLimit?
A: The --powerLimit parameter specifies the degree of parallelism to be used during the relocate operation.
Q: How does –maxCpu affect the relocation process?
A: The --maxCpu parameter specifies the maximum number of CPUs to be allocated for the PDB relocation process.
Q: What does the –maxSize parameter define?
A: The --maxSize parameter defines the maximum storage size in GB for the new PDB.
Q: What is the function of –resume?
A: The --resume parameter indicates that the relocation operation should resume from where it left off.
Q: What should I provide with the –resume option?
A: You can specify a --sessionID to resume a specific session if you are resuming a previous operation.
Q: What does the –executePrereqs parameter do?
A: The --executePrereqs parameter determines if only the prerequisites for the operation should be run. Valid values are yes or no.
Q: What is specified by the –sourcePDBServices parameter?
A: The --sourcePDBServices parameter specifies a list of comma-delimited source PDB services.
Q: What does the –sourcePDBReadOnlyServices parameter list?
A: The --sourcePDBReadOnlyServices parameter lists a comma-delimited list of source PDB read-only services.
Q: What is the effect of –waitForCompletion?
A: The --waitForCompletion parameter specifies whether to run the operation in the background. Valid values are true or false.
Q: What does the –blobLocation parameter specify?
A: The --blobLocation parameter specifies the location of a custom directory where the standby BLOB file will be generated in a Data Guard environment.
Q: When should I use –standbyBlobFromPrimary?
A: Use --standbyBlobFromPrimary to specify the location of the standby BLOB file, which is prepared from the primary database. This is required only for standby operations.
Q: Can I use –blobLocation and –standbyBlobFromPrimary together?
A: No, the --blobLocation and --standbyBlobFromPrimary parameters are mutually exclusive and cannot be used together.
Q: What does –upgradePDB do?
A: The --upgradePDB parameter specifies whether to upgrade the PDB as part of the relocation operation. Valid values are true or false.
Q: What is the purpose of –updateDBBlockCacheSize?
A: The --updateDBBlockCacheSize option allows the application to set the DB block cache size initialization parameters to support data copy with a different block size.
Q: What does the –skipOpenPDB option do?
A: The --skipOpenPDB option indicates that the PDB should not be opened at the end of the relocation operation.
Q: When should I use –completePDBRelocate?
A: Use --completePDBRelocate to complete the PDB relocation if it is done as a two-step operation.
Q: What should I do if I encounter an error while using the dbaascli pdb relocate command?
A: Check the error message for details, ensure all parameters are correctly specified, and verify that you have the necessary permissions and credentials. You might also need to review the prerequisites and configurations.
Q: What if I forget the SYS user password for the source database?
A: You will need to reset or recover the SYS user password for the source database. Without it, you cannot complete the relocation operation.
Example: dbaascli pdb relocate
dbaascli pdb relocate --sourceDBConnectionString test-scan.dbaastoolslrgsu.dbaastoolslrgvc.oraclevcn.com:1521/source_cdb_service_name --pdbName source_pdb --dbName target_db