Saturday , November 25 2017
Home / Oracle DBA / RMAN configuration in No catalog mode:

RMAN configuration in No catalog mode:

RMAN  backup is  a block level  backup. ( oracle block level ). Rman is centralized backup ,restore and Recovery utility

We can configure Rman in  Two modes:

  1. No catalog mode
  2. Catalog mode

Recommonded to configure Rman is “CATALOG MODE”.

No catalog mode: In No catalog mode , Rman keeps backup information in the Resusable section of the target databsae controlfile. The Retention of backup information depends on the parameter  CONTROLFILE_RECORD_KEEP_TIME  (default  value 7 days).

Even if we specify A bigger value for the parameter, retention may not be guranteed. since control file grows upto operating system limitation .

Ramn  backup retention based on Two factors:

1 retention based on number of backups

parameter: CONFIGURE RETENTION POLICY TO REDUNDANCY <value>

2 retention based on  number of days

parameter : CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF (x) DAYS.

In No catalog mode, we can not specify keep until time class to retain a backup for A specific time interval.If we are configure Rman , Recommended to configure large pool  other wise rman user some space from sharedpool. If the instance is started with SP file, by defailt rman takes the backup off spfile.

If we configure FRA , backup command creates backup sets in the backup destination. In  No catalog mode , we cannot create  stored Rman scripts which can be used across the EnterPrise databases.

A backup set is nothing  but collection of backup pieces . Which are intern nothing  but the physical files of the database.

RMAN  is  capable of taking the backup to the disk , but not into tape library. In order to take the backup into tape library we need integrate RMAN with 3rd  party MML ( media management layer) softwares like  tivoli,hp,legato,veritas.

Once the retention period experied, backup becomes OBSOLETE. In the Industry we  delete the obsolete backups.

If we configure RMAN in No catalog mode , it is not advisable to recreate the controlfile . If  we recreate controlfile ,Entire Rman  backup information will be vanished.

 

[oracle@ssss4 ~]$ export ORACLE_SID=cheysar
[oracle@ssss4 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Mon Jul 3 15:50:36 2017

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

 

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME OPEN_MODE
——— ——————–
CHEYSAR READ WRITE

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

 

 

 

[oracle@ssss4 ~]$ which rman
/u01/app/oracle/product/11.2.0/db_home/bin/rman
[oracle@ssss4 ~]$
[oracle@ssss4 ~]$ rman

Recovery Manager: Release 11.2.0.2.0 – Production on Mon Jul 3 15:54:53 2017

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

RMAN> connect target/

connected to target database: CHEYSAR (DBID=1251988537)

RMAN> list db_unique_name all;

using target database control file instead of recovery catalog

List of Databases
DB Key DB Name DB ID Database Role Db_unique_name
——- ——- —————– ————— ——————
2 CHEYSAR 1251988537 PRIMARY CHEYSAR

RMAN> exit

 

 

 

[oracle@ssss4 ~]$ list db_unique_name all;
-bash: list: command not found
[oracle@ssss4 ~]$ rman target/    ==> ( directly establesh connection)

Recovery Manager: Release 11.2.0.2.0 – Production on Mon Jul 3 15:57:39 2017

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

connected to target database: CHEYSAR (DBID=1251988537)

 

 

 

RMAN> shutdown immediate   ==( shut down the database)

using target database control file instead of recovery catalog
database closed
database dismounted
Oracle instance shut down

 

RMAN> startup nomount

connected to target database (not started)

Oracle instance started

Total System Global Area 523108352 bytes

Fixed Size 1345288 bytes
Variable Size 348129528 bytes
Database Buffers 167772160 bytes
Redo Buffers 5861376 bytes

 

 

RMAN> alter database mount;

database mounted

RMAN> alter database mount;

 

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 07/03/2017 16:07:41
ORA-01100: database already mounted

RMAN> alter database open;

database opened

RMAN> host ‘clear’;  ===( clear in RMAN prompt )

 

host command complete

 

 

TO CHECK RMAN CONFIGURATION PARAMETERS:-

RMAN> show all;  ==(display the Rman configuration parameters)

RMAN configuration parameters for database with db_unique_name CHEYSAR are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO ‘%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default
CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/oracle/product/11.2.0/db_home/dbs/snapcf_cheysar.f’; # default

RMAN>

 

**HOW TO LOAD PARAMTERS : by using spool command

RMAN> spool log to rman.log       ( here rman.log is a file . this is creatre a file  OS level)
RMAN> show all;
RMAN> spool off
RMAN> host ‘pwd’;   ==> ( to check location of OS LEVEL)
/home/oracle  ==>   ( location of  ramn.log )
RMAN> exit

 

 

 

[oracle@ssss4 ~]$ vi rman.log
CONFIGURE RETENTION POLICY TO REDUNDANCY 2; # default  ==> ( latest  2 backups are valid)
CONFIGURE BACKUP OPTIMIZATION ON; # default  ==>( read only tablespace  only one backup)
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO’/u03/rmanbkp/%F’; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default CONFIGURE MAXSETSIZE TO UNLIMITED; # default CONFIGURE ENCRYPTION FOR DATABASE OFF; # default CONFIGURE ENCRYPTION ALGORITHM ‘AES128’; # default CONFIGURE COMPRESSION ALGORITHM ‘BASIC’ AS OF RELEASE ‘DEFAULT’ OPTIMIZE FOR LOAD TRUE ; # default CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default CONFIGURE SNAPSHOT CONTROLFILE NAME TO ‘/u01/app/oracle/product/11.2.0/db_home/dbs/snapcf_cheysar.f’; # default CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT’/u03/rmanbkp/%U’; CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT’/u03/rmanbkp/%U’;

:wq!

NOTE :  /u03/rmanbkp  is  backup location  and %F = is format  backup location

PARALLELISM 2 = two channel backup  and  %U= use multiple backup pices

 

 

[oracle@ssss4 ~]$ rman target/

Recovery Manager: Release 11.2.0.2.0 – Production on Mon Jul 3 16:27:24 2017

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

connected to target database: CHEYSAR (DBID=1251988537)

RMAN>

 

 

RMAN> @rman.log

RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
using target database control file instead of recovery catalog
new RMAN configuration parameters:
CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
new RMAN configuration parameters are successfully stored
# default
RMAN> CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters:
CONFIGURE BACKUP OPTIMIZATION ON;
new RMAN configuration parameters are successfully stored
# default
RMAN> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters:
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
new RMAN configuration parameters are successfully stored
# default
RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored
# default
new RMAN configuration parameters:
CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT ‘/u03/rmanbkp/%U’;
new RMAN configuration parameters are successfully stored

RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT’/u03/rmanbkp/%U’;
new RMAN configuration parameters:
CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT ‘/u03/rmanbkp/%U’;
new RMAN configuration parameters are successfully stored

RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN>
RMAN> **end-of-file**

 

 

 

NOTE: OPEN NEW TERNMINAL

[root@ssss4 ~]# mkdir -p /u03/app/oracle
[root@ssss4 ~]# chown -R oracle:oinstall /u03/app/oracle
[root@ssss4 ~]# chmod -R 775 /u03/app/oracle
[root@ssss4 ~]#

 

 

RMAN> list backup; ===> existing backup

specification does not match any backup in the repository

 

RMAN> report schema;  ( list of permanent  datfiles) and  means oracle  indivisual need to check

Report of database schema for database with db_unique_name CHEYSAR

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
—- ——– ——————– ——- ————————
1 690 SYSTEM *** /u01/app/oracle/cheysar/system01.dbf
2 490 SYSAUX *** /u01/app/oracle/cheysar/sysaux01.dbf
3 30 UNDOTBS1 *** /u01/app/oracle/cheysar/undotbs01.dbf4 5 USERS *** /u01/app/oracle/cheysar/users01.dbf

List of Temporary Files
=======================
File Size(MB) Tablespace Maxsize(MB) Tempfile Name
—- ——– ——————– ———– ——————–
1 20 TEMP 32767 /u01/app/oracle/cheysar/temp01.dbf

 

 

 

RMAN> report obsolete;   ( configuration redundancy value are changed or not)

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
no obsolete backups found

RMAN> report need backup;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
—- —– —————————————————–
1 0 /u01/app/oracle/cheysar/system01.dbf
2 0 /u01/app/oracle/cheysar/sysaux01.dbf
3 0 /u01/app/oracle/cheysar/undotbs01.dbf
4 0 /u01/app/oracle/cheysar/users01.dbf

RMAN>

 

 

RMAN> backup datafile 4;

Starting backup at 03-JUL-17
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=35 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=39 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/cheysar/users01.dbf
channel ORA_DISK_1: starting piece 1 at 03-JUL-17
channel ORA_DISK_1: finished piece 1 at 03-JUL-17
piece handle=/u03/rmanbkp/02s8eg85_1_1 tag=TAG20170703T170820 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-JUL-17

Starting Control File and SPFILE Autobackup at 03-JUL-17
piece handle=/u03/rmanbkp/c-1251988537-20170703-00 comment=NONE
Finished Control File and SPFILE Autobackup at 03-JUL-17

RMAN>

 

RMAN> report need backup;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
—- —– —————————————————–
1     0         /u01/app/oracle/cheysar/system01.dbf
2     0          /u01/app/oracle/cheysar/sysaux01.dbf
3     0        /u01/app/oracle/cheysar/undotbs01.dbf
4     1        /u01/app/oracle/cheysar/users01.dbf

RMAN>

 

 

 

RMAN> backup datafile 4;    ==>tjis is  2nd time backup  of datafile

Starting backup at 03-JUL-17
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/cheysar/users01.dbf
channel ORA_DISK_1: starting piece 1 at 03-JUL-17
channel ORA_DISK_1: finished piece 1 at 03-JUL-17
piece handle=/u03/rmanbkp/04s8egpa_1_1 tag=TAG20170703T171730 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-JUL-17

Starting Control File and SPFILE Autobackup at 03-JUL-17
piece handle=/u03/rmanbkp/c-1251988537-20170703-01 comment=NONE
Finished Control File and SPFILE Autobackup at 03-JUL-17

 

RMAN> report need backup;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of files with less than 2 redundant backups
File #bkps Name
—- —– —————————————————–
1 0 /u01/app/oracle/cheysar/system01.dbf
2 0 /u01/app/oracle/cheysar/sysaux01.dbf
3 0 /u01/app/oracle/cheysar/undotbs01.dbf

RMAN>

NOTE: backup datfile is  gone  why because still redundancy value 2

 

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
no obsolete backups found

 

 

RMAN> backup datafile 4;

Starting backup at 03-JUL-17
using channel ORA_DISK_1
using channel ORA_DISK_2
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00004 name=/u01/app/oracle/cheysar/users01.dbf
channel ORA_DISK_1: starting piece 1 at 03-JUL-17
channel ORA_DISK_1: finished piece 1 at 03-JUL-17
piece handle=/u03/rmanbkp/06s8egvc_1_1 tag=TAG20170703T172044 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 03-JUL-17

Starting Control File and SPFILE Autobackup at 03-JUL-17
piece handle=/u03/rmanbkp/c-1251988537-20170703-02 comment=NONE
Finished Control File and SPFILE Autobackup at 03-JUL-17

 

 

RMAN> report obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
——————– —— —————— ——————–
Backup Set 1 03-JUL-17
Backup Piece 1 03-JUL-17 /u03/rmanbkp/02s8eg85_1_1
Backup Set 2 03-JUL-17
Backup Piece 2 03-JUL-17 /u03/rmanbkp/c-1251988537-20170703-00
Backup Set 3 03-JUL-17
Backup Piece 3 03-JUL-17 /u03/rmanbkp/04s8egpa_1_1
Backup Set 4 03-JUL-17
Backup Piece 4 03-JUL-17 /u03/rmanbkp/c-1251988537-20170703-01

 

 

RMAN>
RMAN> list backup;

 

List of Backup Sets
===================

 

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
1 Full 1.30M DISK 00:00:01 03-JUL-17
BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20170703T170820
Piece Name: /u03/rmanbkp/02s8eg85_1_1
List of Datafiles in backup set 1
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
4 Full 875762 03-JUL-17 /u01/app/oracle/cheysar/users01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
2 Full 9.36M DISK 00:00:02 03-JUL-17
BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20170703T170822
Piece Name: /u03/rmanbkp/c-1251988537-20170703-00
SPFILE Included: Modification time: 03-JUL-17
SPFILE db_unique_name: CHEYSAR
Control File Included: Ckp SCN: 875768 Ckp time: 03-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time

 

 

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
6 Full 9.36M DISK 00:00:01 03-JUL-17
BP Key: 6 Status: AVAILABLE Compressed: NO Tag: TAG20170703T172045
Piece Name: /u03/rmanbkp/c-1251988537-20170703-02
SPFILE Included: Modification time: 03-JUL-17
SPFILE db_unique_name: CHEYSAR
Control File Included: Ckp SCN: 876210 Ckp time: 03-JUL-17

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
7 Full 1.30M DISK 00:00:00 03-JUL-17
BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20170703T172236
Piece Name: /u03/rmanbkp/08s8eh2s_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
—- — —- ———- ——— —-
4 Full 876267 03-JUL-17 /u01/app/oracle/cheysar/users01.dbf

BS Key Type LV Size Device Type Elapsed Time Completion Time
——- —- — ———- ———– ———— —————
8 Full 9.36M DISK 00:00:01 03-JUL-17
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20170703T172237
Piece Name: /u03/rmanbkp/c-1251988537-20170703-03
SPFILE Included: Modification time: 03-JUL-17
SPFILE db_unique_name: CHEYSAR
Control File Included: Ckp SCN: 876274 Ckp time: 03-JUL-17

 

RMAN> delete noprompt backup;

using channel ORA_DISK_1
using channel ORA_DISK_2

List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
——- ——- — — ———– ———– ———-
1 1 1 1 AVAILABLE DISK /u03/rmanbkp/02s8eg85_1_1
2 2 1 1 AVAILABLE DISK /u03/rmanbkp/c-1251988537-20170703-00
3 3 1 1 AVAILABLE DISK /u03/rmanbkp/04s8egpa_1_1
4 4 1 1 AVAILABLE DISK /u03/rmanbkp/c-1251988537-20170703-01
5 5 1 1 AVAILABLE DISK /u03/rmanbkp/06s8egvc_1_1
6 6 1 1 AVAILABLE DISK /u03/rmanbkp/c-1251988537-20170703-02
7 7 1 1 AVAILABLE DISK /u03/rmanbkp/08s8eh2s_1_1
8 8 1 1 AVAILABLE DISK /u03/rmanbkp/c-1251988537-20170703-03
deleted backup piece
backup piece handle=/u03/rmanbkp/02s8eg85_1_1 RECID=1 STAMP=948388101
deleted backup piece
backup piece handle=/u03/rmanbkp/c-1251988537-20170703-00 RECID=2 STAMP=948388103
deleted backup piece
backup piece handle=/u03/rmanbkp/04s8egpa_1_1 RECID=3 STAMP=948388650
deleted backup piece
backup piece handle=/u03/rmanbkp/c-1251988537-20170703-01 RECID=4 STAMP=948388652
deleted backup piece
backup piece handle=/u03/rmanbkp/06s8egvc_1_1 RECID=5 STAMP=948388844
deleted backup piece
backup piece handle=/u03/rmanbkp/c-1251988537-20170703-02 RECID=6 STAMP=948388845
deleted backup piece
backup piece handle=/u03/rmanbkp/08s8eh2s_1_1 RECID=7 STAMP=948388956
deleted backup piece
backup piece handle=/u03/rmanbkp/c-1251988537-20170703-03 RECID=8 STAMP=948388957
Deleted 8 objects

 

 

 

 

 

RMAN> list backup;

specification does not match any backup in the repository

RMAN> delete noprompt obsolete;

RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
using channel ORA_DISK_2
no obsolete backups found

 

Comments

comments

Check Also

How to perform RMAN cloning (Easy process to clone a database on different server)

Cloning is a process of making a separate copy from one database to another. Cloning …

Leave a Reply

Your email address will not be published. Required fields are marked *