Monday, 29 February 2016

IO Stats

select
FILE_NO,
FILETYPE_NAME,
SMALL_READ_MEGABYTES "Single-block MegaBytes Reads",
SMALL_WRITE_MEGABYTES "Single-block MegaBytes Writes",
SMALL_READ_REQS "Single-block Read Requests",
SMALL_WRITE_REQS "Single-block Write Requests",
SMALL_READ_SERVICETIME "Total S-Block Read Time",
SMALL_WRITE_SERVICETIME "Total S-Block Write Time",
-- decode(SMALL_READ_REQS,0,0,SMALL_READ_SERVICETIME/SMALL_READ_REQS) "Per SBlock
Read Response T",
SMALL_SYNC_READ_REQS,
SMALL_SYNC_READ_LATENCY "S-Block Sync Read Latency (ms)",
LARGE_READ_MEGABYTES "Multi-block MegaBytes Reads",
LARGE_WRITE_MEGABYTES "Multi-block MegaBytes Writes",
LARGE_READ_REQS "Multi-block Read Requests",
LARGE_WRITE_REQS "Multi-block Write Requests",
LARGE_READ_SERVICETIME "Total M-Block Read Time",
LARGE_WRITE_SERVICETIME "Total M-Block Write Time",
ASYNCH_IO,
RETRIES_ON_ERROR
from V$IOSTAT_FILE
order by FILE_NO
/

IO Tuning

IO Related waits

SELECT
n.username,
s.sid,
s.value
FROM v$sesstat s,v$statname t, v$session n
WHERE s.statistic# = t.statistic#
AND n.sid = s.sid
AND t.name='CPU used by this session'
Page 342 Oracle DBA Code Examples
AND s.value <> 0
ORDER BY s.value desc;

Top session CPU-comsumers

SELECT n.username, s.sid, s.value
FROM v$sesstat s,v$statname t, v$session n
WHERE s.statistic# = t.statistic#
AND n.sid = s.sid
AND t.name='CPU used by this session'
AND s.value <> 0
ORDER BY s.value desc;

CPU Utilization

One-hour history of the Host CPU Utilization

select BEGIN_TIME, END_TIME, GROUP_ID, METRIC_ID, METRIC_NAME, VALUE, METRIC_UNIT
from V$SYSMETRIC_HISTORY
where METRIC_NAME LIKE '%Host CPU%';




Happy Learning..!!
Cheers..!!

Saturday, 27 February 2016

How to create database manually on linux

Create a necessary directories for admin, oradata and recovery destination.

mkdir -p /u01/app/oracle/admin/prod/adump
mkdir -p /u01/app/oracle/oradata/prod/
mkdir -p /u01/app/oracle/flash_recovery_area/prod
mkdir -p /u01/app/oracle/diag

After 11g your diagnostic location should be in Oracle base directory.

create a script called db_create.sql with the below

I am going to create a database called prod.

CREATE DATABASE "prod"
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/app/oracle/oradata/prod/redo1.log' SIZE 10M,
GROUP 2 '/u01/app/oracle/oradata/prod/redo2.log' SIZE 10M,
GROUP 3 '/u01/app/oracle/oradata/prod/redo3.log' SIZE 10M
DATAFILE
'/u01/app/oracle/oradata/prod/system.dbf' size 1000m,
'/u01/app/oracle/oradata/prod/usr04.dbf' size 100m
sysaux datafile '/u01/app/oracle/oradata/prod/sysaux.dbf' size 100m
undo tablespace undotbs
datafile '/u01/app/oracle/oradata/prod/undo.dbf' size 50m
CHARACTER SET US7ASCII
;


Set the environment. 

$export ORACLE_SID=prod.


Create a init file in ORACLE_HOME/dbs directory. Your init file name should be initprod.ora

prod.__db_cache_size=88080384
prod.__java_pool_size=4194304
prod.__large_pool_size=4194304
prod.__shared_pool_size=62914560
prod.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/prod/adump'
*.compatible='11.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/prod/control01.ctl','/u01/app/oracle/oradata/prod/control02.ctl','/u01/app/oracle/oradata/prod/control03.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='prod'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area/prod'
*.db_recovery_file_dest_size=2147483648
*.diagnostic_dest='/u01/app/oracle/diag'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=prodXDB)'
*.job_queue_processes=10
*.open_cursors=300
*.pga_aggregate_target=202375168
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=609222656
*.undo_management='AUTO'
*.undo_tablespace='undotbs'


Once your init file is created, Start the database in  nomount stage.

Once the instance is started, Run the db_create.sql script.

SQL>@db_create.sql;

Database created.


After your database creation, Your database will come up in default log mode, which is noarchivelog mode.

for make your database in archivelog mode, shutdown your database and start in mount state to change the database to archive log mode.

once the database came up in mount mode,

SQL> alter database archivelog;

SQL> alter database open;


Post installation we should run the below script.

SQL> @?/rdbms/admin/catalog.sql;
SQL> @?/rdbms/admin/catblock.sql;
SQL> @?/rdbms/admin/catproc.sql;


Run this pupbld.sql script as system user.

SQL> conn system/manager
connected
SQL>@?/sqlplus/admin/pupbld.sql;

Now your database is ready to use.


Happy Learning..!!
Cheers..!!








Sunday, 21 February 2016

Monitor Log Shipping

SET PAGESIZE 124
COL DB_NAME FORMAT A8
COL HOSTNAME FORMAT A12
COL LOG_ARCHIVED FORMAT 999999
COL LOG_APPLIED FORMAT 999999
COL LOG_GAP FORMAT 9999
COL APPLIED_TIME FORMAT A12
SELECT DB_NAME, HOSTNAME, LOG_ARCHIVED, LOG_APPLIED,APPLIED_TIME,
LOG_ARCHIVED-LOG_APPLIED LOG_GAP
FROM
(
SELECT NAME DB_NAME
FROM V$DATABASE
),
(
SELECT UPPER(SUBSTR(HOST_NAME,1,(DECODE(INSTR(HOST_NAME,'.'),0,LENGTH(HOST_NAME),
(INSTR(HOST_NAME,'.')-1))))) HOSTNAME
FROM V$INSTANCE
),
(
SELECT MAX(SEQUENCE#) LOG_ARCHIVED
FROM V$ARCHIVED_LOG WHERE DEST_ID=1 AND ARCHIVED='YES'
),
(
SELECT MAX(SEQUENCE#) LOG_APPLIED
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED='YES'
),
(
SELECT TO_CHAR(MAX(COMPLETION_TIME),'DD-MON/HH24:MI') APPLIED_TIME
FROM V$ARCHIVED_LOG WHERE DEST_ID=2 AND APPLIED='YES'
);




Happy Learning..!!
Cheers..!!

Long running sessions

SELECT SID, SERIAL#, opname, SOFAR, TOTALWORK,
ROUND(SOFAR/TOTALWORK*100,2) COMPLETE
FROM V$SESSION_LONGOPS
WHERE
TOTALWORK != 0
AND SOFAR != TOTALWORK
order by 1;


Happy learning..!!
Cheers..!!

Get table and index DDL

set heading off;
set echo off;
Set pages 999;
set long 90000;

spool ddl_list.sql

select dbms_metadata.get_ddl('TABLE','DEPT','SCOTT') from dual;

select dbms_metadata.get_ddl('INDEX','DEPT_IDX','SCOTT') from dual;

spool off;


============================================================================================


Now we can modify the syntax to punch a whole schema. 

It us easily done by selecting dbms_metadata. get_ddl and specifying USER_TABLES and USER_INDEXES. :



set pagesize 0
set long 90000
set feedback off
set echo off 

spool scott_schema.sql 

connect scott/tiger;

SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
FROM USER_TABLES u;

SELECT DBMS_METADATA.GET_DDL('INDEX',u.index_name)
FROM USER_INDEXES u;

spool off;


Happy Learning..!!
Cheers..!!

ORA-19809: limit exceeded for recovery files

ORA-19809: limit exceeded for recovery files

The flash recovery area is full:

To verify this run the following query. It will show the size of the recovery area and how full it is:

set lines 100
col name format a60
select name
, floor(space_limit / 1024 / 1024) "Size MB"
, ceil(space_used / 1024 / 1024) "Used MB"
from v$recovery_file_dest
order by name
/

To fix the problem, you need to either make the flash recovery area larger, or remove some files from it.

If you have the disk space available, make the recovery area larger:

alter system set db_recovery_file_dest_size= scope=both
/

To remove files you must use RMAN.
Manually moving or deleting files will have no effect as oracle will be unaware.
The obvious choice is to backup and remove some archive log files.
However, if you usually write your RMAN backups to disk, this could prove tricky.

RMAN will attempt to write the backup to the flash recovery area...which is full.

You could try sending the backup elsewhere using a command such as this:

rman target / catalog user/pass@rmancat

run {allocate channel t1 type disk;
backup archivelog all delete input
format '//arch_%d_%u_%';
release channel t1;
}

This will backup all archive log files to a location of your choice and then remove them.



Happy Learning..!!
Cheers..!!

No of archives generated everyday

SELECT A.*,
Round(A.Count#*B.AVG#/1024/1024) Daily_Avg_Mb
FROM
(
SELECT
To_Char(First_Time,’YYYY-MM-DD’) DAY,
Count(1) Count#,
Min(RECID) Min#,
Max(RECID) Max#
FROM
v$log_history
GROUP
BY To_Char(First_Time,’YYYY-MM-DD’)
ORDER
BY 1 DESC
) A,
(
SELECT
Avg(BYTES) AVG#,
Count(1) Count#,
Max(BYTES) Max_Bytes,
Min(BYTES) Min_Bytes
FROM
v$log
) B;


Happy Learning..!!
Cheers..!!

which schema's are taking up space

set pages 999
col "size MB" format 999,999,999
col "Objects" format 999,999,999
select obj.owner "Owner"
, obj_cnt "Objects"
, decode(seg_size, NULL, 0, seg_size) "size MB"
from (select owner, count(*) obj_cnt from dba_objects group by owner) obj
, (select owner, ceil(sum(bytes)/1024/1024) seg_size
from dba_segments group by owner) seg
where obj.owner = seg.owner(+)
order by 3 desc ,2 desc, 1
/



Happy Learning..!!
Cheers..!!

List segments of a tablespace, their properties and sizes

set lines 137
set pages 10000

clear break

col TSname heading 'TSpace|Name|'
col TSname format a25
col SgmntOwner heading 'Sgmnt|Owner|'
col SgmntOwner format a15
col SgmntType heading 'Sgmnt|Type|'
col SgmntType format a15
col SgmntName heading 'Sgmnt|Name|'
col SgmntName format a35
col MinExt heading 'Min|No of|Ext'
col MinExt format 99999999999
col MaxExt heading 'Max|No of|Ext'
col MaxExt format 99999999999
col SgmntSize heading 'Sgmnt|Size|Mb'
col SgmntSize format 9999
col SgmntExentNo heading 'No of|Extent|'
col SgmntExentNo format 9999999999

SELECT
ds.tablespace_name as "TSname",
ds.owner as "SgmntOwner",
ds.segment_type as "SgmntType",
ds.segment_name as "SgmntName",
ds.min_extents as "MinExt",
ds.max_extents as "MaxExt",
ROUND(ds.bytes/1024/1024,0) as "SgmntSize",
SUM(ds.extents) as "SgmntExentNo"
FROM
dba_segments ds
WHERE tablespace_name = 'SYSAUX'
GROUP BY
ds.tablespace_name,
ds.owner,
ds.segment_type,
ds.segment_name,
ds.min_extents,
ds.max_extents,
ds.bytes
ORDER BY
ds.tablespace_name,
ds.owner,
ds.segment_type,
ds.segment_name
;


Happy Learning..!!
Learning..!!

Automatic DB startup

Installing Oracle Database 11g R2 on a Linux Server (you can check my previous post) does not provide the database the possibility to preform an automatic 

startup/shutdown when the system is starts or shutdown, we need to do it manually!

so here is a few steps to make it happen automatically.


The automatic startup and shutdown of the Oracle database can be achieved with the files dbstart and dbshut both provided by Oracle. These files rely on the 

existence of the file /etc/oratab to work.

The format of the /etc/oratab file is as follows:

SID:ORACLE_HOME:AUTO

or in my example:

ORCL:/u01/app/oracle/product/11.2.0/dbhome_1:Y

To start and stop the database when the machine comes up and goes down by modifying the startup routines for the Linux machine. This is quite easy, although 

I should point out here that this may change depending on which flavor of Linux (slackware, debian, redhat, etc). I will show examples which work for Oracle 

Linux 5.x. To modify these for your own flavor of Linux, please see your Linux documentation sets.

Note: /etc/init.d is the official location for placing start up scripts and most, but not all distros follow this convention. /etc/rc.d/init.d is where Red 

Hat (which Oracle Linux is based on) places startup scripts, but in order to comply with modern convention, they make /etc/initd a symlink to 

/etc/rc.d/init.d.

Firstly, we need to create the script which will run dbshut and dbstart in the /etc/rc.d/init.d directory. Create the following file as /etc/init.d/oracle:

Note1: The parts in red are optional where if you like to have Oracle Enterprise Manager starting/shutting down with the system.
Note2: If you copy and paste the script you may/will get errors because of the double quotation and the (-) chars, please read Mike’s comment, here is the 

script with the correct chars.

#!/bin/sh
#
# /etc/rc.d/init.d/oracle
# Description: Starts and stops the Oracle database, listeners and Enterprise Manager
# See how we were called.
case "$1" in
start)
echo "Starting Oracle"
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Starting Oracle Databases as part of system up." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
echo -n "Starting Oracle Listeners: "
su - oracle -c "lsnrctl start" >> /var/log/oracle
echo "Done."
echo -n "Starting Oracle Databases: "
su - oracle -c dbstart >> /var/log/oracle
echo "Done."
echo -n "Starting Oracle Enterprise Manager: "
su - oracle -c "emctl start dbconsole" >> /var/log/oracle
echo "Done."
echo ""
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
touch /var/lock/subsys/oracle
;;
stop)
echo "Shutting Down Oracle"
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Shutting Down Oracle Databases as part of system down." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
echo -n "Shutting Down Oracle Enterprise Manager: "
su - oracle -c "emctl stop dbconsole" >> /var/log/oracle
echo "Done."
echo -n "Shutting Down Oracle Listeners: "
su - oracle -c "lsnrctl stop" >> /var/log/oracle
echo "Done."
rm -f /var/lock/subsys/oracle
echo -n "Shutting Down Oracle Databases: "
su - oracle -c dbshut >> /var/log/oracle
echo "Done."
echo ""
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
;;
restart)
echo "Restarting Oracle"
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Restarting Oracle Databases as part of system up." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
echo -n "Restarting Oracle Listeners: "
su - oracle -c "lsnrctl stop" >> /var/log/oracle
su - oracle -c "lsnrctl start" >> /var/log/oracle
echo "Done."
echo -n "Restarting Oracle Databases: "
su - oracle -c dbshut >> /var/log/oracle
su - oracle -c dbstart >> /var/log/oracle
echo "Done."
echo -n "Restarting Oracle Enterprise Manager: "
su - oracle -c "emctl stop dbconsole" >> /var/log/oracle
su - oracle -c "emctl start dbconsole" >> /var/log/oracle
echo "Done."
echo ""
echo "—————————————————-" >> /var/log/oracle
date +"! %T %a %D : Finished." >> /var/log/oracle
echo "—————————————————-" >> /var/log/oracle
touch /var/lock/subsys/oracle
;;
*)
echo "Usage: oracle {start|stop|restart}"
exit 1
esac

it’s important to remember to make the script executable by simply run the command:

$ chmod +x /etc/init.d/oracle

It is worth checking that this file actually correctly stops and starts the databases for your system. Check the log file, /var/log/oracle for error 

messages.

Once this script is working we need to create start and kill symbolic links in the appropriate runlevel directories /etc/rc.d/rcX.d.

The following commands will ensure that the databases will come up in runlevels 2,3,4 and 5:

$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc2.d/S99oracle
$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc3.d/S99oracle
$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc4.d/S99oracle
$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc5.d/S99oracle

To stop the databases on reboot or restart we need the following links:

$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc0.d/K01oracle # Halting
$ ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc6.d/K01oracle # Rebooting



Happy Learning..!!
Cheers..!!

Size of archival generation per day;

No. of archival generation per day;

SET PAUSE ON
SET PAUSE 'Press Return to Continue'
SET PAGESIZE 60
SET LINESIZE 300
SET VERIFY OFF

COL "Generation Date" FORMAT a20

SELECT TRUNC(completion_time)  "Generation Date" ,
   round(SUM(blocks*block_size)/1048576,0) "Total for the Day in MB"
FROM gv$archived_log
GROUP BY TRUNC(completion_time)
ORDER BY TRUNC(completion_time);



Happy Learning..!!
Cheers..!!

CPU usage

select
   ss.username,
   se.SID,
   VALUE/100 cpu_usage_seconds
from
   v$session ss,
   v$sesstat se,
   v$statname sn
where
   se.STATISTIC# = sn.STATISTIC#
and
   NAME like '%CPU used by this session%'
and
   se.SID = ss.SID
and
   ss.status='ACTIVE'
and
   ss.username is not null

order by VALUE desc;



Happy Learning..!!
Cheers..!!

Index for particular table

select index_name, index_type, status from dba_indexes where table_name='<name>';


Happy Learning..!!
Cheers..!!

Size of table

SELECT SEGMENT_NAME,SEGMENT_TYPE ,BYTES/1024/1024 MB FROM DBA_SEGMENTS WHERE SEGMENT_TYPE='TABLE' AND SEGMENT_NAME='<NAME>';





Happy Learning..!!
Cheers..!! 

Reclaimable space for tables.

select owner,table_name,round((blocks*8),2)||'kb' "Fragmented size",
round((num_rows*avg_row_len/1024),2)||'kb' "Actual size", round((blocks*8),2)-round((num_rows*avg_row_len/1024),2)||'kb',
((round((blocks*8),2)-round((num_rows*avg_row_len/1024),2))/round((blocks*8),2))*100 -10 "reclaimable space % "
from dba_tables where table_name ='T963' AND OWNER LIKE 'SCHEMA';


Happy Learning..!!
Cheers..!!

Script to check the list of table and owner

set lines 200;
column owner format a15;
column segment_name format a30;

select
a.segment_name
from dba_segments a, dba_tables b
where a.owner=b.owner
and a.owner not like 'SYS%'
and a.segment_name = b.table_name
and a.segment_type='TABLE'
group by a.owner, a.segment_name, a.segment_type,
round(a.bytes/1024/1024,0) ,round((a.bytes-(b.num_rows*b.avg_row_len) )/1024/1024,0)
having round(bytes/1024/1024,0) >100
order by round(bytes/1024/1024,0) desc ;

Script to check the DB Size

select a.data_size+b.temp_size+c.redo_size+d.controlfile_size "total_size in GB"
from ( select sum(bytes)/1024/1024/1024 data_size
from dba_data_files ) a,
( select nvl(sum(bytes),0)/1024/1024/1024 temp_size
from dba_temp_files ) b,
( select sum(bytes)/1024/1024/1024 redo_size
from sys.v_$log ) c,
( select sum(BLOCK_SIZE*FILE_SIZE_BLKS)/1024/1024/1024 controlfile_size
from v$controlfile) d; 





Happy Learning..!!
Cheers..!!

List SQL being executed by a particular SID

col sql_text format a100 heading "Current SQL"
select q.sql_text
from v$session s
, v$sql q
WHERE s.sql_address = q.address
and s.sql_hash_value + DECODE
(SIGN(s.sql_hash_value), -1, POWER( 2, 32), 0) = q.hash_value
AND s.sid=&1;




Happy Learning..!!
Cheers..!!

Find SQL being executed by a OS Process ID (PID)


prompt "Please Enter The UNIX Process ID"
set pagesize 50000
set linesize 30000
set long 500000
set head off
select
s.username su,
substr(sa.sql_text,1,540) txt
from v$process p,
v$session s,
v$sqlarea sa
where p.addr=s.paddr
and s.username is not null
and s.sql_address=sa.address(+)
and s.sql_hash_value=sa.hash_value(+)
and spid=&SPID;





Happy Learning..!!
Cheers..!!

How to get the SQL details for Particular SID

select sid, serial#, username, status, sql_id, program from v$session where sid = 198;


select sql_text from v$sql where ADDRESS =<SQL ID>;

To get to know the ETA for query.

select sid, serial#, sofar, totalwork, start_time, time_remaining, username from v$session_longops where sql_id = '<SQL ID>';




Happy Learning..!!
Cheers..!!








Lockers & Blockers

Script to  check the blocking session:


col "Lock Type" format a15
col "Mode Held" format a15
col "Blocking?" format a15
SELECT SUBSTR(TO_CHAR(session_id),1,5) "SID",
  SUBSTR(lock_type,1,15) "Lock Type",
SUBSTR(mode_held,1,15) "Mode Held",
SUBSTR(blocking_others,1,15) "Blocking?"
FROM dba_locks  where blocking_others='Blocking';


Happy Learning..!!
Cheers..!!

Wednesday, 17 February 2016

How to create a recovery catalog database



The RMAN Recovery Catalog is a database schema that holds the metadata detailing the RMAN backup operations performed on the target database. The metadata include the following information from about the target database: database structure, RMAN configuration, data file and archive log backups (backup sets, pieces and copies), archived redo logs and their copies. In addition to the metadata the recovery catalog can also store scripts that can be used by all registered target databases.

This document will detail the steps to create  RMAN recovery catalog using Oracle Database 11gR2 on OEL OS. The process is the same for other versions of UNIX, Solaris and AIX.

It is recommended that the recovery catalog be in a database separate from any of the target databases. Many organizations store the recovery catalog in the same database as their Enterprise Manager Grid Control repository. It is also recommended that the database that houses the recovery catalog to be in ARCHIVELOG mode.

SQL> create tablespace rman
    datafile ‘u01\app\oracle\oradata\rcvcat\rman01.dbf’
    size 100M;


Next we should create the recovery catalog owner. 


SQL> create user rcat identified by rmancat
    default tablespace rman;

User created.

SQL> grant recovery_catalog_owner to rman;

Grant succeeded.

The role RECOVERY_CATALOG_OWNER has all of the privileges to maintain the recovery catalog.

The actual creation of the recovery catalog is performed in RMAN while connected to the database in which the catalog is to be created. The command CREATE 

CATALOG will create the recovery catalog in the default table space of the user. 

rman target / catalog rcat/rmancat@rcvcat
Recovery Manager: Release 11.2.0.1.0 – Production on Mon Jul 8 23:33:23 2013

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

connected to target database: rcvcat (DBID=1234567890)
connected to recovery catalog database
RMAN> create catalog;

recovery catalog created

To the new database to be backed up, you have to register it on the rman catalog you just created: (For any new database you can use this catalog after 

register database in catalog)

RMAN>  register database;

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


Cheers..!!
Happy Learning..!!