1: Create new service named “catdb” using netca for “catdb” database.
2: Now Create a new database named “catdb” using dbca , check in /etc/oratab
3: Register “catdb” database with listener.
[oracle@airyhost ~]$ cat /etc/oratab
ORCL:/u01/app/oracle/product/11.2.0/db_1:N
catdb:/u01/app/oracle/product/11.2.0/db_1:N
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? catdb
[oracle@airyhost ~]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-DEC-2014 16:35:55
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 29-DEC-2014 15:09:13
Uptime 0 days 1 hr. 26 min. 48 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "catdb" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
Service "catdbXDB" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> exit
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [ catdb] ? ORCL
[oracle@airyhost ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 28 14:38:28 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? catdb
[oracle@airyhost ~]$sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 28 14:38:50 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
CATDB
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/catdb/system01.dbf
/u01/app/oracle/oradata/catdb/sysaux01.dbf
/u01/app/oracle/oradata/catdb/undotbs01.dbf
/u01/app/oracle/oradata/catdb/users01.dbf
SQL> create tablespace airyrcat datafile ‘/u01/app/oracle/oradata/catdb/airyrcat01.dbf’
size 500m autoextend on next 128m maxsize unlimited;
Tablespace created.
SQL> create user cat
identified by cat
default tablespace airyrcat
temporary tablespace temp
quota unlimited on airyrcat
profile default;
User created.
SQL> grant recovery_catalog_owner to cat;
Grant succeeded.
The RECOVERY_CATALOG_OWNER role provides privileges for the owner of the recovery catalog. The role includes the following system privileges: ALTER SESSION, CREATE CLUSTER, CREATE DATABASE LINK, CREATE PROCEDURE, CREATE SEQUENCE, CREATE SESSION, CREATE SYNONYM, CREATE TABLE, CREATE TRIGGER, CREATE TYPE, and CREATE VIEW.
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Current log sequence 3
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size 2180344 bytes
Variable Size 1811942152 bytes
Database Buffers 1509949440 bytes
Redo Buffers 16379904 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 1
Next log sequence to archive 3
Current log sequence 3
[oracle@airyhost ~]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 29-DEC-2014 16:35:55
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> reload
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 29-DEC-2014 15:09:13
Uptime 0 days 1 hr. 30 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Service "catdb" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
Service "catdbXDB" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL> service
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "ORCLXDB" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: localhost.localdomain, pid: 20324>
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=28083))
Service "catdb" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:1 refused:0 state:ready
LOCAL SERVER
Service "catdbXDB" has 1 instance(s).
Instance "catdb", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: localhost.localdomain, pid: 18646>
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=9080))
The command completed successfully
LSNRCTL> exit
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? catdb
RMAN>rman target sys/sys@catdb catalog cat/cat@catdb
Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jul 28 14:47:15 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: CATDB (DBID=1417825656)
connected to recovery catalog database
RMAN> create catalog ;
recovery catalog created
RMAN> exit
Recovery Manager complete.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [catdb] ? ORCL
[oracle@airyhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 28 14:48:16 2014
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list;
Database log mode No Archive Mode
Automatic archival Disabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 38
Current log sequence 40
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 3340451840 bytes
Fixed Size 2180344 bytes
Variable Size 1845496584 bytes
Database Buffers 1476395008 bytes
Redo Buffers 16379904 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
[oracle@airyhost ~]$ . oraenv
ORACLE_SID = [ORCL] ? ORCL
[oracle@airyhost ~]$ rman target sys/sys@ORCL catalog cat/cat@catdb
Recovery Manager: Release 11.2.0.1.0 - Production on Mon Jul 28 14:49:51 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1417825656)
connected to recovery catalog database
RMAN> REGISTER DATABASE;
database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
Now Base Recovery Catalog creation is complete.
In my next post, I will let you know, how you can see data stored in recovery catalog.
Thank you for Reading…This is Airy… Enjoy 🙂