http://dbaparadise.com/2021/01/what-is-local-undo-mode/
==============
Four Ways to Startup or Shutdown Your 19c Database:
There you have the 4 tools: SQLPLUS, RMAN, Cloud Control, SRVCTL!
=================
What Is Local Undo Mode:
12c database (release 1)>>shared undo mode>>undo tablespace was shared by all the PDBs within the same CDB, meaning there was only one UNDO tablespace for the instances.
with 12cR2, the local undo mode was introduced>>each PDB has their own UNDO tablespaces.This is required by a few Oracle features, ie. hot cloning.
Here are some of features that I came across, that require local undo mode: PDB hot cloning, creating refreshable PDBs, near zero downtime PDB relocation, proxy PDBs.
If the database (the CDB) is created with DBCA, then local undo mode is the default mode. If the database (the CDB) is created with the CREATE DATABASE statement, then shared undo mode is the default.
In the latter case, you need to use the undo_mode_clause and specify LOCAL UNDO ON explicitly, if you want to create a database with local undo mode.
How to determine what undo mode the database is in? The answer is in the database_properties view
col property_name for A20
col property_value for A20
select property_name, property_value from database_properties where property_name like '%UNDO%';
Another method:
select con_id, tablespace_name from cdb_tablespaces where contents like '%UNDO%' order by 1;
How to switch to local undo mode?
it requires an outage.
sqlplus / as sysdba
shutdown immediate;
startup upgrade
alter database local undo on;
shutdown immediate;
startup;
To switch to shared undo mode
sqlplus / as sysdba
shutdown immediate;
startup upgrade;
alter database local undo off;
shutdown immediate;
startup;
Note that the local undo tablespace inside the PDBs will not be dropped by Oracle and it will not be used either. For clarity purposes it is recommended to drop them manually after you switch the database to shared undo mode.
======================
MAX_PDBS parameter:
Introduced in 12cR2.
To limit the number of pluggable databases (PDBs) one can create in a CDB or in an application root container.
the PDB$SEED, Application Seed and Application Root are ignored from the count.
By default this parameter’s value is 4098
Why would you want to limit the number of PDBs a user can create in the CDB?
One of the reasons is licensing!
In 12c version you can have 1 user created PDB, without paying for the Multitenant option. In 19c you can have up to 3 user created PDBs in a CDB, without paying for the Multitenant option.
Once the parameter is set, if you will try to create another PDB, by accident, you will receive an error: ORA-65010: maximum number of pluggable databases created.
alter system set MAX_PDBS=3 scope=both;
==================
How To Use Datapump Between Different Database Releases:
What if the source database is 12.2 and the target database version is 11.2?>> Use Vesion version=12.1
What if the versions are the same, but the compatible parameter of the target database is lower?
Once you find out the target version/compatible parameter, running a datapump export job with the appropriate version will be easy, as Oracle is providing you with an export datapump parameter called VERSION to facilitate this process.
An export datapump dumpfile created by a lower version of Oracle will always be compatible with a higher version of Oracle.
======================
active duplicate :
Duplicating from an active database doesn’t require any RMAN backup to be taken from the source database. Actually, it reads all database structure from the source database that needs to be mounted or opened during the duplication.Although this method seems easy as we don’t need to backup source database or make it accessible for auxiliary instance anymore, it has its own disadvantages as well.
Two big disadvantages of the ACTIVE database duplication method are:
Negative performance impact on the source database. This impact applies to the whole duplication time.
High network traffic on the connection between the source and target databases.
RMAN>run{
DUPLICATE TARGET DATABASE TO HRPRD
FROM ACTIVE DATABASE;
}
1- Prepare auxiliary instance HRPRD1 on prd-db-01:
2- Enable status registration for HRPRD1 to run LISTENER:
3- Add following TNS entries to BOTH auxiliary and target tnsnames.ora file:
4- Ceate a password file for auxiliary instance HRPRD1 on prd-db-01:
5- Test connectivity to auxiliary and target instances from BOTH hosts using TNS:
6- On the auxiliary host, start RMAN and run the DUPLICATE command:
7- When step 6 finishes successfully, start HRPRD database using srvctl. You need to enable the second thread as well:
==============================
pdb restricted mode.
Here we use OPEN FORCE to leave restricted mode and go back to normal READ WRITE.
alter pluggable database ORCLPDB open force;
https://dbalifeeasy.com/category/oracle/cdbpdb/
Under the guidance of Oracle Support for specific purpose, the following instructions can be followed to open seed database “PDB$SEED” in “READ WRITE” mode.
Set hidden parameter “_oracle_script” at session level
SQL> alter session set "_oracle_script"=TRUE;
https://dbalifeeasy.com/2018/01/22/how-to-remove-pdb-from-restricted-mode/
SQL> select INST_ID,NAME,OPEN_MODE,RESTRICTED
from gv$pdbs order by 1,2;
Check PDB_PLUG_IN_VIOLATIONS.
select status, message, action
from pdb_plug_in_violations
where status !='RESOLVED';
===================================