Steps to Restoring and Recovering Files Over the Network: Primary DB = chicago, its net service name is chicago Standby DB = boston, its net service name is boston You want to restore lost data files, control files, or tablespaces on a primary database using the corresponding files on the physical standby database. You can […]
oracle 12c
How to get datafile information when PDB is Mounted/Read-Write/Restricted Mode
Question: How to get PDB Datafile information when PDB in different Mode? Case 1 – PDB in mounted Mode PDB Status: SQL> select pdb_id, pdb_name, con_uid,status from dba_pdbs; PDB_ID PDB_NAME CON_UID STATUS ———- ————– ———- ————- 3 [PDB12C] 515133920 NORMAL 2 PDB$SEED 4105546291 NORMAL SQL> select con_id, name, open_mode, restricted from v$pdbs; CON_ID NAME OPEN_MODE […]
How to Audit Alter Tablespace in Oracle 12c database
A tablespace can be Audited in 12c by creating the audit policy for the tablespace action. 1. Create audit policy: SQL> create audit policy pol2 actions create tablespace, drop tablespace, alter tablespace; 2. Enable audit policy for SYSTEM user: SQL> audit policy pol2 by SYSTEM; 3. Connect to the database and run few alter statements. […]
Oracle Data Guard 12c New Feature: Far Sync Standby
A Far Sync Standby Database is a cascading Standby Database that acts as a Redo Log Repository for a Terminal Database. It does not contain any datafiles. Only Log Transport Services are active on a Far Sync Standby Database. The Advantage of a Far Sync Standby Database is that it can be a local ArchiveLog […]
How to rename a Pluggable Database, along with the respective directories, in Oracle 12c
Please go through the following steps to change the name of a PDB, along with the respective directories, in 12c. 1. Connect to the CDB and check the information about the PDB first: sql> select name, open_mode, restricted from v$pdbs; sql> select name, con_id, dbid,con_uid,guid from v$containers order by con_id; sql> select service_id,name,network_name,creation_date,pdb,con_id from cdb_services; […]
ORA-65208: Lockdown profile P1 does not exist
The Problem The following error is generated when creating a lockdown profile in application container of a PDB database. ORA-65208: Lockdown profile P1 does not exist. The Solution When pdb_lockdown parameter is set in an application container using a CDB common user(e.g SYS), we look up lockdown profile defined in the CDB ROOT. In this […]
How to Offline a PDB Datafile in NOARCHIVELOG mode CDB which is not Open in Read Write
For the purposes of this post, the following environment is used as an example to describe the procedure: Container Database Name: CDB1 Pluggable Database Names: PDB1 Datafile Name: /tmp/STATSPACK.dbf If you try to attempt to offline a datafile, it results in error when the database is running in NOARCHIVELOG mode and is not open in […]
Oracle Multitenant: How to Create CDB and PDB
Creating a CDB The steps required to create a new CDB, using either DBCA or SQL*Plus, are the same. The first step, as for any database, non-CDB or CDB, consists of configuring an instance with an init.ora parameter file and then starting the instance. The second step is the creation of the CDB using the […]
How to Clone a Pluggable Database from an RMAN Container Database Backup
The following steps will show you how to perform a backup of a container database (CDB), including only the pieces required to migrate a subset of pluggable databases (PDB) with no disruption of application activity to the source PDBs. The backup and all datafiles contained in it will be consistent to a single point in […]
Oracle 12c: Unplug/Plug PDB to new CDB using RMAN Active Database Duplication
This method takes advantage of a new feature of RMAN in 12c allowing you to clone database files and apply incrementals to those files from an active database without requiring staging areas. In addition, the source PDB application activity can continue while the cloning and incremental applies are being performed. To get the datafiles in […]