RMAN Backup Archive log until SCN

RMAN Backup Archive logs until SCN:

SQL> select current_scn from v$database;

CURRENT_SCN
-----------
    2161903
RMAN>  backup archivelog until scn  2161903  delete input;

Starting backup at 12-AUG-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=60 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=5 STAMP=1080341951
input archived log thread=1 sequence=10 RECID=6 STAMP=1080425353
channel ORA_DISK_1: starting piece 1 at 12-AUG-21
channel ORA_DISK_1: finished piece 1 at 12-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/0q06buvj_1_1 
tag=TAG20210812T221059 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
channel ORA_DISK_1: deleting archived log(s)
archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_9_1080337722.dbf RECID=5 
STAMP=1080341951
archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_10_1080337722.dbf RECID=6 
STAMP=1080425353
Finished backup at 12-AUG-21

Starting Control File and SPFILE Autobackup at 12-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210812-00 
comment=NONE
Finished Control File and SPFILE Autobackup at 12-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup archive log all and skip Inaccessible

RMAN Backup archive logs all and skip Inaccessible:

RMAN> backup archivelog all skip inaccessible;

Starting backup at 11-AUG-21
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=9 RECID=5 STAMP=1080341951
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/0i069ddv_1_1 
tag=TAG20210811T225911 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-07 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup archive log and All Delete input

RMAN Backup archive log and All Delete input:

RMAN>  backup archivelog all delete input;

Starting backup at 11-AUG-21
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=1 STAMP=1080340278
input archived log thread=1 sequence=6 RECID=2 STAMP=1080340342
input archived log thread=1 sequence=7 RECID=3 STAMP=1080341803
input archived log thread=1 sequence=8 RECID=4 STAMP=1080341856
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/0g069db0_1_1 
tag=TAG20210811T225736 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_5_1080337722.dbf 
RECID=1 STAMP=1080340278 archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_6_1080337722.dbf 
RECID=2 STAMP=1080340342 archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_7_1080337722.dbf 
RECID=3 STAMP=1080341803 archived log file 
name=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/arch1_8_1080337722.dbf 
RECID=4 STAMP=1080341856
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-06 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup Archive log

RMAN Backup Archive log:

RMAN>  backup archivelog all;

Starting backup at 11-AUG-21
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=1 STAMP=1080340278
input archived log thread=1 sequence=6 RECID=2 STAMP=1080340342
input archived log thread=1 sequence=7 RECID=3 STAMP=1080341803
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/0e069d9b_1_1 
tag=TAG20210811T225643 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-05 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

Block Change Tracking using Rman

Block Change Tracking

Block changing tracking improves the performance of incremental backups. During an incremental backup, instead of scanning all data blocks to identify which blocks have changed, RMAN uses this file to identify the changed blocks that need to be backed up.

You can Enable block change tracking when the database is either open or mounted. This section assumes that you intend to create the block change tracking file as an Oracle Managed File in the database area, which is where the database maintains active database files such as data files, control files, and online redo log files.

Block Change Tracking

SQL> select status from v$block_change_tracking;
STATUS                     FILENAME
----------                  --------------------  
DISABLED
SQL> select name from v$datafile;
NAME
------------------------------------------------------------------
/u01/app/oracle/oradata/TEST/system01.dbf
/u01/app/oracle/oradata/TEST/sysaux01.dbf
/u01/app/oracle/oradata/TEST/undotbs01.dbf
/u01/app/oracle/oradata/TEST/users01.dbf

 DB_CREATE_FILE_DEST

Set the DB_CREATE_FILE_DEST  initialization parameter to specify the location where 
new database files, including the block change tracking file, must be stored. SQL> alter system set DB_CREATE_FILE_DEST = '/u01/app/oracle/oradata'; System altered.

Enable Block Change Tracking for the database

SQL> ALTER DATABASE ENABLE BLOCK CHANGE TRACKING;

Database altered.


SQL>  select status,filename from v$block_change_tracking;

STATUS     FILENAME
---------- ----------------------------------------
ENABLED    /u01/app/oracle/oradata/TEST/changetrack  ing/o1_mf_jl7qx7bp_.chg

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Full Database Backup

RMAN Full Database Backup:

RMAN> backup database;

Starting backup at 11-AUG-21
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=66 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=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/01069bke_1_1 
tag=TAG20210811T222830 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-00 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup Tablespace

RMAN Backup Tablespace:

RMAN>  backup tablespace users,data;

Starting backup at 11-AUG-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00005 name=/u01/app/oracle/oradata/data01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/0a069cag_1_1 
tag=TAG20210811T224016 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-03 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup Database includes a control file

RMAN Backup Database includes a control file:

RMAN>  backup database include current controlfile;

Starting backup at 11-AUG-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/07069bu9_1_1 
tag=TAG20210811T223345 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/08069bvm_1_1 
tag=TAG20210811T223345 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-02 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RMAN Backup Database plus Archive log

RMAN Backup Database plus Archive log:

RMAN>  backup database plus archivelog;

Starting backup at 11-AUG-21
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=5 RECID=1 STAMP=1080340278
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/03069bpm_1_1 
tag=TAG20210811T223118 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:08
Finished backup at 11-AUG-21

Starting backup at 11-AUG-21
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/ORCL/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00007 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/04069bpu_1_1 
tag=TAG20210811T223126 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 11-AUG-21

Starting backup at 11-AUG-21
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=6 RECID=2 STAMP=1080340342
channel ORA_DISK_1: starting piece 1 at 11-AUG-21
channel ORA_DISK_1: finished piece 1 at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/05069brm_1_1 
tag=TAG20210811T223222 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 11-AUG-21

Starting Control File and SPFILE Autobackup at 11-AUG-21
piece handle=/u01/app/oracle/product/19.0.0/dbhome_1/dbs/c-1608118455-20210811-01 
comment=NONE
Finished Control File and SPFILE Autobackup at 11-AUG-21


Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8

RECOVERY CATALOG DATABASE IN RMAN

Restore / Recovery. Recovery Manager (RMAN) Enterprise Manager. Backup. Control file. Reporting REPORT. LIST. Target database. Stored scripts. Catalog Maintenance. Register. Resynchronize. Reset. Change/Delete/Catalog. Backup /Restore/Recover. 

RECOVERY CATALOG DATABASE:

A Recovery catalog creates redundancy for the RMAN repository stored in the control file of each target database.

A recovery catalog centralizes metadata for all your target databases. Storing the metadata in a single place makes reporting and administration tasks easier to perform.

A recovery catalog can store metadata history much longer than the control file. This capability is useful if you must do a recovery that goes further back in time than the history in the control file.

A recovery catalog is required when you use RMAN in a Data Guard environment. By storing backup metadata for all primary and standby databases, the catalog enables you to offload backup tasks to one standby database while enabling you to restore backups on other databases in the environment.

Catalog Database - APPS
Target Database - TEST

Catalog Database Server (192.168.1.101)

[oratest@oracle ~]$ export ORACLE_SID=APPS

[oratest@oracle ~]$ sqlplus / as sysdba

create one New Tablespace and New user in Catalog Database

SQL > create tablespace rmantbs datafile ‘/u01/app/oracle/oradata/rman01.dbf’
size 100m;

Tablespace created.

SQL > create user rman identified by rman123
Default tablespace rmantbs
Temporary tablespace temp
Quota unlimited on rmantbs;

User created.
SQL > grant connect,resource to rman;

Grant succeeded.
SQL > grant recovery_catalog_owner to rman;

Grant succeeded.

SQL > exit

Target database server ( 192.168.1.110 )

[oratest@oracle ~] $ cat >> $ORACLE_HOME/network/admin/tnsnames.ora

Apps123 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.101 )(PORT
= 1521))
(CONNECT_DATA =
 (SERVER = DEDICATED)
(SERVICE_NAME = apps)
    )
  )

[oratest@oracle ~]$ export ORACLE_SID=test

[oratest@oracle ~]$ rman target /

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Aug 18 21:21:57 2021
Version 19.3.0.0.0

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

connected to target database: TEST (DBID=2378581000)
RMAN > connect catalog rman/rman123@apps123

RMAN > create catalog;

RMAN > register database;

RMAN > resync catalog;

 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Ramkumar’s LinkedIn: https://www.linkedin.com/in/ramkumardba/
LinkedIn Group: https://www.linkedin.com/in/ramkumar-m-0061a0204/
Facebook Page: https://www.facebook.com/Oracleagent-344577549964301
Ramkumar’s Twitter: https://twitter.com/ramkuma02877110
Ramkumar’s Telegram: https://t.me/oracleageant
Ramkumar’s Facebook: https://www.facebook.com/ramkumarram8