Skip to main content

Setup pluggable database (PDB) as a recovery catalog for all other pluggable DBs in the container

In order to make a recovery catalog using a pluggable database as part of your container database you should follow these instructions
special notes
* PDB can act as a recovery catalog
* Recovery catalog is not supported when connected to pluggable database
* You must register the whole CDB agains the PDB catalog

Creating pluggable database for RMAN catalog
bash-4.2$ echo $ORACLE_SID
CDB

bash-4.2$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Thu Jul 28 15:38:17 2016

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> create pluggable database rman admin user rman identified by rman;

SQL> alter session set container = rman;

Session altered.

SQL> alter database open;

Database altered.


Preparing specific tablespace 

SQL> conn sys@RMAN as sysdba
Enter password:
Connected.

SQL> show CON_NAME

CON_NAME
------------------------------
RMAN


SQL> create tablespace CAT_TBS;

Tablespace created.

SQL> select tablespace_name,file_name from dba_data_files;

TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
SYSTEM
/oracle/CDB/38B26CEDFDCC341FE05329D3EC0AACAA/datafile/o1_mf_system_csmz8
3x6_.dbf

SYSAUX
/oracle/CDB/38B26CEDFDCC341FE05329D3EC0AACAA/datafile/o1_mf_sysaux_csmz8
3xg_.dbf

CAT_TBS

TABLESPACE_NAME
------------------------------
FILE_NAME
--------------------------------------------------------------------------------
/oracle/CDB/38B26CEDFDCC341FE05329D3EC0AACAA/datafile/o1_mf_cat_tbs_csv9
m99m_.dbf


Handle grants 

SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

SQL> alter user rman default tablespace cat_tbs;

User altered.

SQL> alter user rman quota unlimited on CAT_TBS;

User altered.


Simply creating the catalog

bash-4.2$ rman catalog rman/rman@RMAN

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Jul 31 10:20:35 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

connected to recovery catalog database

RMAN> CREATE CATALOG;

recovery catalog created


Register the CDB in the catalog  (it's not supported to connect to PDB as target as you can see:)

bash-4.2$ rman catalog rman@RMAN target sys@PDB1

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Jul 31 10:30:27 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

target database Password:
connected to target database: CDB (DBID=2034989396, not open)
recovery catalog database Password:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-01005: recovery catalog is not supported when connected to pluggable database
bash-4.2$

This is how you do it:

bash-4.2$ rman catalog rman@RMAN target sys@CDB

Recovery Manager: Release 12.1.0.2.0 - Production on Sun Jul 31 10:37:27 2016

Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.

target database Password:
connected to target database: CDB (DBID=2034989396)
recovery catalog database Password:
connected to recovery catalog database

RMAN>

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete




Comments

Popular posts from this blog

ORA-27104: system-defined limits for shared memory was misconfigured

I faced this error while trying to restore & recover of a PDB (pluggable database) part of the log file and the solution is described here below: log: initialization parameters used for automatic instance: db_name=CDB db_unique_name=gbux_pitr_PDB1_CDB compatible=12.1.0.2.0 db_block_size=8192 db_files=200 diagnostic_dest=/oracle/app/oracle _system_trig_enabled=FALSE sga_target=1888M processes=200 db_create_file_dest=/oracle/auxilary log_archive_dest_1='location=/oracle/auxilary' enable_pluggable_database=true _clone_one_pdb_recovery=true #No auxiliary parameter file used starting up automatic instance CDB RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of recover command at 07/31/2016 16:22:20 RMAN-04014: startup failed: ORA-27104: system-defined limits for shared

mount.nfs: backgrounding

if you face this kind of error with your remote NFS: [root@Vertica000 ~]# mount /files/application/Rremote3 mount.nfs: backgrounding "10.0.0.2:/files/application/remoteFiles" mount.nfs: mount options: "bg,hard,nointr,rsize=65536,wsize=65536,tcp,actimeo=0,vers=3,timeo=600,addr=10.0.0.2" look for the problem in the log file: cat /var/log/messages | grep mount  mount to NFS server '10.0.0.2' failed: timed out, retrying Solution: In most of the cases, you have a problem with your iptables in the destination server login as root to dest server (10.0.0.2) in my case and type this command: iptables --flush  the go back to your origin server to try remount the problematic NFS file system of course this is in case nfs server was installed and functioning properly. Good luck.

ora-65035 while create pluggable database from another one

or : ORA-21000: error number argument to raise_application_error of -65035 is out of range Cause: this error caused because of an unrecoverable transaction in the source DB. Solution: 1. either stop and start your pluggable source DB 2. identify the open transaction and kill it if you can. use this query to do so: select * from v$transaction t,v$session  s where t.ses_addr = s.saddr;