Dear Friends, The content in this blog are purely based on my own opinion ,it is not reflecting any of my current or previous employers materials or official documents. All my posts here are not warranted to be free of errors. Please use at your own risk and after thorough testing in your environment. If you feel that i am violating any of the company's policies or documents, kindly mail me at jeyaseelan.hi@gmail.com,I am happy to take out those content from this blog.
Friday, 25 May 2018
Hot Cloning of PDB - 12c2 / 18c
12C has brought the container & Pluggable database feature. To clone a PDB from another clone, we need to keep the source PDB in read only mode.
SQL> SELECT PROPERTY_NAME, PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME = 'LOCAL_UNDO_ENABLED'
2 ;
no rows selected
SQL> create pluggable database DEVPDB4 from DEVPDB3;
create pluggable database DEVPDB4 from DEVPDB3
*
ERROR at line 1:
ORA-65035: unable to create pluggable database from DEVPDB3
From 12cr2 onwards we can perform this operation while source PDB is in read write mode
In-order to achieve this, we should have the following conditions met.
1. Enabled local Undo
2. cloneddb=true ( init.ora parameter)
Enable Local Undo
This need to be done in upgrade mode
# stop DB
srvctl stop database -d db1
# set cluster_database = false ( it you are doing on RAC)
sqlplus /nolog
conn /as sysdba
alter system set cluster_database=false scope=spfile;
shutdown immediate;
# enable local undo
sqlplus /nolog
conn / as sysdba
startup upgrade
ALTER DATABASE LOCAL UNDO ON;
shutdown immediate;
exit
# enable cluster_database=true ( if you are peforming this activity in RAC)
sqlplus /nolog
conn /as sysdba
alter system set cluster_database=true scope=spfile;
shutdown immediate;
# start db
srvctl start database -d db1
set clonedb=true
alter system set cloned=true scope=spfile sid='*' ;
# bounce the db to effect the above parameter
# Verify if local undo is enabled
SQL> SELECT PROPERTY_NAME, PROPERTY_VALUE FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME
--------------------------------------------------------------------------------
PROPERTY_VALUE
--------------------------------------------------------------------------------
LOCAL_UNDO_ENABLED
TRUE
Hot Clone PDB
# Source PDB in read write mode
1* select name,open_mode from v$pdbs where name='DEVPDB3'
SQL> /
NAME OPEN_MODE
------------------------------ ----------------------------------------
DEVPDB3 READ WRITE
SQL> create pluggable database DEVPDB4 from DEVPDB3;
Pluggable database created.
SQL>
Subscribe to:
Post Comments (Atom)
-
We may not be able to disable the logtransport when the database is in maximum availabilty mode. We may get the below error DGMGRL...
-
Error Messages: We may get the following error messages while doing ASM operations ORA-15137: The ASM cluster is in rolling patch state....
-
MIRA - Multi Instance Redo Apply - 12cR2 onwards/18C With Oracle 12c Release 2, We can enable Multi Instance Redo apply ( MIR...
No comments:
Post a Comment