- Newest
- Most votes
- Most comments
Hi,
To find the PDB (tenant databases) in a snapshot, you can use the CLI command describe-db-snapshot-tenant-databases. This command only applies to RDS for Oracle DB instances in the multi-tenant configuration.You can use this command to inspect the tenant databases within a snapshot before restoring it.
https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_DescribeDBSnapshotTenantDatabases.html
On your second question on whether it is possible to restore a single PDB from the DB snapshot, you can't directly interact with the tenant databases in a CDB snapshot that uses the multi-tenant architecture configuration. If you restore the DB snapshot, you restore all its tenant databases. You can find more details on these in the below link as well.
Hope it helps and if it does, I would appreciate if answer can be accepted so that community can benefit for clarity when searching for similar enquirers in Repost, thank you.
Hi, To identify the PDBs within a DB snapshot and restore a single PDB, you can utilize the following methods:
- Using the Oracle Database Console:
List PDBs in a Snapshot: Log in to the Oracle Database Console. Navigate to the "Database" tab. Select the desired DB snapshot. Click on the "Open" button. The list of PDBs contained within the snapshot will be displayed. Restore a Single PDB: Right-click on the desired PDB. Select the "Restore" option. Follow the on-screen instructions to complete the restore process. 2. Using SQL Plus:
List PDBs in a Snapshot: Connect to the DB snapshot using SQL Plus: SQL SQLPLUS / AS SYSDBA
Execute the following query: SQL SELECT PDB_NAME FROM V$PDB;
Restore a Single PDB: Use the ALTER DATABASE OPEN RESETLOGS RENAME PDB <old_pdb_name> TO <new_pdb_name> command to create a new PDB with the same structure as the original PDB in the snapshot. Use the ALTER PLUGGABLE DATABASE <new_pdb_name> PLUGIN FROM <snapshot_name> command to plug in the PDB from the snapshot into the newly created PDB. 3. Using Oracle RMAN:
List PDBs in a Snapshot: Connect to RMAN: SQL RMAN TARGET / AS SYSDBA
Execute the following command: SQL LIST BACKUP OF DATABASE;
Look for the snapshot in the output and identify the PDBs using the PDB_NAME column. Restore a Single PDB: Use the RESTORE DATABASE FROM BACKUP SET <backup_set_name> PDB_NAME <pdb_name> command to restore the specific PDB from the snapshot. Note:
Ensure that you have the necessary permissions to perform these operations. It's recommended to create a backup of the target database before restoring a PDB to avoid data loss in case of issues.
Relevant content
- asked 3 years ago
- asked a month ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago