Showing posts with label rman. Show all posts
Showing posts with label rman. Show all posts

Wednesday, January 10, 2024

Query to check rman backup details in oracle

Query to check rman backup details in oracle:


set lines 220
set pages 1000
col cf for 9,999
col df for 9,999
col elapsed_seconds heading "ELAPSED|SECONDS"
col i0 for 9,999
col i1 for 9,999
col l for 9,999
col output_mbytes for 999,999,999 heading "OUTPUT|MBYTES"
col session_recid for 999999 heading "SESSION|RECID"
col session_stamp for 99999999999 heading "SESSION|STAMP"
col status for a10 trunc
col time_taken_display for a10 heading "TIME|TAKEN"
col output_instance for 9999 heading "OUT|INST"
select
  j.session_recid, j.session_stamp,
  to_char(j.start_time, 'yyyy-mm-dd hh24:mi:ss') start_time,
  to_char(j.end_time, 'yyyy-mm-dd hh24:mi:ss') end_time,
  (j.output_bytes/1024/1024) output_mbytes, j.status, j.input_type,
  decode(to_char(j.start_time, 'd'), 1, 'Sunday', 2, 'Monday',
                                     3, 'Tuesday', 4, 'Wednesday',
                                     5, 'Thursday', 6, 'Friday',
                                     7, 'Saturday') dow,
  j.elapsed_seconds, j.time_taken_display,
  x.cf, x.df, x.i0, x.i1, x.l,
  ro.inst_id output_instance
from V$RMAN_BACKUP_JOB_DETAILS j
  left outer join (select
                     d.session_recid, d.session_stamp,
                     sum(case when d.controlfile_included = 'YES' then d.pieces else 0 end) CF,
                     sum(case when d.controlfile_included = 'NO'
                               and d.backup_type||d.incremental_level = 'D' then d.pieces else 0 end) DF,
                     sum(case when d.backup_type||d.incremental_level in ('I0', 'D0') then d.pieces else 0 end) I0,
                     sum(case when d.backup_type||d.incremental_level = 'I1' then d.pieces else 0 end) I1,
                     sum(case when d.backup_type = 'L' then d.pieces else 0 end) L
                   from
                     V$BACKUP_SET_DETAILS d
                     join V$BACKUP_SET s on s.set_stamp = d.set_stamp and s.set_count = d.set_count
                   where s.input_file_scan_only = 'NO'
                   group by d.session_recid, d.session_stamp) x
    on x.session_recid = j.session_recid and x.session_stamp = j.session_stamp
  left outer join (select o.session_recid, o.session_stamp, min(inst_id) inst_id
                   from GV$RMAN_OUTPUT o
                   group by o.session_recid, o.session_stamp)
    ro on ro.session_recid = j.session_recid and ro.session_stamp = j.session_stamp
where j.start_time > trunc(sysdate)-&NUMBER_OF_DAYS
order by j.start_time;

>> on the prompt enter the # of days you want the backup for.

This is controlled by below setting in rman:

Configure RMAN output to keep for 'n' days;

where n is the number of days the information is retained.

This is a quick query sharing blog.

Thanks

Saturday, September 30, 2023

Procedure to restore selected list of archivelogs in oracle

Procedure to restore selected list of archivelogs


Steps overview:

0. Verify the control_file_record_keeptime parameter

1. Find out the list of archivelogs really available

2. Now define the goal of which archives we needed to restore

3. Verify if we have backup for the archvielog

4. Kick off the restore from rman

5. Verify if the archivelogs are now showing in v$archived_log


Execution:


0. Verify the control_file_record_keep_time parameter


show parameter control_file_record_keep_time;


Output:


SQL> show parameter control_file_record_keep_time;


NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

control_file_record_keep_time        integer     60




1. Find out the list of archivelogs really available


export NLS_DATE_FORMAT='DD/MON/YYYY HH24:MI:SS';

rman> crosscheck archivelog all;

alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';

set lines 200

set pages 3000

set colsep ,

select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


Output:


RMAN> crosscheck archivelog all;


using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=73 device type=DISK

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_08_26/o1_mf_1_15_lgncg2vp_.arc RECID=7 STAMP=1145901138

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_16_lh9r7shc_.arc RECID=8 STAMP=1146602380

validation succeeded for archived log

...

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_35_lkhq2q2r_.arc RECID=41 STAMP=1148894951

validation succeeded for archived log

archived log file name=/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_36_lkj0lyq4_.arc RECID=42 STAMP=1148904688

Crosschecked 22 objects



RMAN>


SQL> alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';


Session altered.


SQL> select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by sequence#;


 SEQUENCE#,S,COMPLETION_TIME     ,FIRST_CHANGE#,NEXT_CHANGE#

----------,-,--------------------,-------------,------------

        15,A,26/AUG/2023 17:52:18,       459810,      460509

        16,A,03/SEP/2023 20:39:40,       460509,      577599

        17,A,03/SEP/2023 20:57:41,       577599,      586943

        18,A,03/SEP/2023 21:19:23,       586943,      590545

        19,A,03/SEP/2023 21:21:02,       590545,      590839

        20,A,03/SEP/2023 21:21:03,       590839,      590846

        21,A,03/SEP/2023 21:24:51,       590846,      591366

..

        33,A,25/SEP/2023 16:50:51,       689053,      689058

        34,A,25/SEP/2023 16:50:53,       689058,      689067

        34,A,25/SEP/2023 16:50:54,       689058,      689067

        35,A,30/SEP/2023 09:29:11,       689067,      721250

        36,A,30/SEP/2023 12:11:28,       721250,      772138


36 rows selected.



2. Now define the goal of which archives we needed to restore


We need archives covering change 459732, this needs to be accessible from logminer. So I am going to restore archive which has this change-1 (459731).


>> goal defined


3. Verify if we have backup for the archvielog


list backup of archivelog from scn 459730;


output:


RMAN> list backup of archivelog from scn 459730;


using target database control file instead of recovery catalog


List of Backup Sets

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



BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ --------------------

10      655.50K    DISK        00:00:00     26/AUG/2023 17:52:19

        BP Key: 10   Status: AVAILABLE  Compressed: NO  Tag: TAG20230826T175219

        Piece Name: /oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1


  List of Archived Logs in backup set 10

  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time

  ---- ------- ---------- -------------------- ---------- ---------

  1    14      458962     26/AUG/2023 17:42:45 459810     26/AUG/2023 17:48:39

  1    15      459810     26/AUG/2023 17:48:39 460509     26/AUG/2023 17:52:18




4. Kick off the restore from rman


restore archivelog from scn 459730;


output:


RMAN> restore archivelog from scn 459730;


Starting restore at 30/SEP/2023 12:25:28

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=68 device type=DISK


archived log for thread 1 with sequence 15 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_08_26/o1_mf_1_15_lgncg2vp_.arc

archived log for thread 1 with sequence 16 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_16_lh9r7shc_.arc

archived log for thread 1 with sequence 17 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_03/o1_mf_1_17_lh9s9nyw_.arc

...

khq2q2r_.arc

archived log for thread 1 with sequence 36 is already on disk as file /oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_36_lkj0lyq4_.arc

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=14

channel ORA_DISK_1: reading from backup piece /oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1

channel ORA_DISK_1: piece handle=/oraarch/GGSRC04T/DBBackup/rman_arch_GGSRC04T_3024q42j_1_1 tag=TAG20230826T175219

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

Finished restore at 30/SEP/2023 12:25:30


RMAN>



5. Verify if the archivelogs are now showing in v$archived_log


alter session set nls_date_format='DD/MON/YYYY HH24:MI:SS';

select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


Output:


SQL> select sequence#,status,completion_time,first_change#,next_change# from v$archived_log order by 1;


 SEQUENCE#,S,COMPLETION_TIME     ,FIRST_CHANGE#,NEXT_CHANGE#

----------,-,--------------------,-------------,------------

        14,A,30/SEP/2023 12:25:29,       458962,      459810

        15,A,26/AUG/2023 17:52:18,       459810,      460509

        16,A,03/SEP/2023 20:39:40,       460509,      577599

        17,A,03/SEP/2023 20:57:41,       577599,      586943

..

        34,A,25/SEP/2023 16:50:54,       689058,      689067

        35,A,30/SEP/2023 09:29:11,       689067,      721250

        36,A,30/SEP/2023 12:11:28,       721250,      772138


37 rows selected.


SQL> select name from v$archived_log where sequence#=14;


NAME

------------------------------------------------------------------

/oraarch/GGSRC04T/archivelog/2023_09_30/o1_mf_1_14_lkj1f92g_.arc


SQL>



YouTube Video:




Monday, September 25, 2023

How to perform oracle RDBMS backup to multiple location in disk

How to perform oracle RDBMS backup to multiple location in disk


Situation: 

In your project, you may be in a situation where

a. DB size is in several TBs.

b. Backup mountpath allocated isnt in proportion to the db size, rpo, rto requirement

i. due to os & filesystem format limitation (linux <7 has 16TB limitation for ext* FS)



In such situation, we may have to distribute the backups to multiple locations using rman.


Solution Tried:


1a. Channel configuration to send identified (d1, d2 etc..) to the corresponding mountpath


CONFIGURE DEVICE TYPE DISK PARALLELISM 2;

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/backup1/rman_bkp/ch1_%U'; 

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/backup2/rman_bkp/ch5_%U';


Or


1b. Channel config through run


ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '/backup1/rman_bkp/%U';

ALLOCATE CHANNEL d2 DEVICE TYPE DISK FORMAT '/backup2/rman_bkp/%U';


Test outcome: Worked as expected


2. Configure the multiple disk location in the channel config like below


CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   '/oraarch/ORA19C/backup/bkp%U',   '/u01/app/oracle/admin/ORA19C/bkpspace2/bkp%U';


Test outcome: Didn’t work


Steps for solution 1a)


1) Preserve the rman setting using


show all;


Actual output:


RMAN> show all;


using target database control file instead of recovery catalog

RMAN configuration parameters for database with db_unique_name ORA19C are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;

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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/19.0.0/db_1/dbs/snapcf_ORA19C.f'; # default


RMAN> 



2) Perform the db backup using the below setting.. Ensure the # of disk parallelism and channel 1,2 format are aligned. If you used 5 in place of 2, it wont work for 2nd channel.


CONFIGURE DEVICE TYPE DISK PARALLELISM 2;

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/oraarch/ORA19C/backup/rman_%d_%U'; 

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_%d_%U';


Actual output:


RMAN> CONFIGURE DEVICE TYPE DISK PARALLELISM 2;


old RMAN configuration parameters:

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters:

CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

new RMAN configuration parameters are successfully stored


RMAN> CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT '/oraarch/ORA19C/backup/rman_%d_%U';


new RMAN configuration parameters:

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/oraarch/ORA19C/backup/rman_%d_%U';

new RMAN configuration parameters are successfully stored


RMAN> CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_%d_%U';


new RMAN configuration parameters:

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_%d_%U';

new RMAN configuration parameters are successfully stored


RMAN>




3) Verify the rman backup settings using 


show all;


Actual output:


RMAN> show all;


RMAN configuration parameters for database with db_unique_name ORA19C are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/oraarch/ORA19C/backup/rman_%d_%U';

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_%d_%U';

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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/19.0.0/db_1/dbs/snapcf_ORA19C.f'; # default


RMAN>




4) Perform the backup using the below command...


backup as compressed backupset section size 32G filesperset 1 database;


RMAN> backup as compressed backupset section size 32G filesperset 1 database;


The command has no syntax errors


RMAN> exit



Recovery Manager complete.

[oracle@vcentos79-oracle-ha1 backup]$



Recovery Manager: Release 19.0.0.0.0 - Production on Mon Sep 25 13:06:17 2023

Version 19.3.0.0.0


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


connected to target database: ORA19C (DBID=1186647419)


RMAN> backup as compressed backupset section size 32G filesperset 1 database;


Starting backup at 25-SEP-23

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=70 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=57 device type=DISK

channel ORA_DISK_1: starting compressed full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/oradata/ORA19C/system01.dbf

..

channel ORA_DISK_2: specifying datafile(s) in backup set

input datafile file number=00012 name=/oradata/ORA19C/opdb1/users01.dbf

channel ORA_DISK_2: starting piece 1 at 25-SEP-23

channel ORA_DISK_1: finished piece 1 at 25-SEP-23

piece handle=/oraarch/ORA19C/backup/rman_ORA19C_0j278mkk_1_1 tag=TAG20230925T130624 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04

channel ORA_DISK_2: finished piece 1 at 25-SEP-23

piece handle=/u01/app/oracle/admin/ORA19C/bkpspace2/rman_ORA19C_0m278mkn_1_1 tag=TAG20230925T130624 comment=NONE

channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01

Finished backup at 25-SEP-23


Starting Control File and SPFILE Autobackup at 25-SEP-23

piece handle=/oraarch/ORA19C/autobackup/2023_09_25/o1_mf_s_1148476056_lk2y08m1_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 25-SEP-23


RMAN>





5) Verify the backup:


RMAN> list backup of database summary;


using target database control file instead of recovery catalog


List of Backups

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

Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag

------- -- -- - ----------- --------------- ------- ------- ---------- ---

12      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

13      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

14      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

15      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

16      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

17      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

18      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

19      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

20      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

21      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

22      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624


RMAN>


Location:

[oracle@vcentos79-oracle-ha1 backup]$ ls -altr /oraarch/ORA19C/backup/ /u01/app/oracle/admin/ORA19C/bkpspace2

/oraarch/ORA19C/backup/:

total 630832

drwxr-x---. 5 oracle oinstall        56 Sep 25 08:58 ..

-rw-r-----. 1 oracle oinstall 239403008 Sep 25 13:07 rman_ORA19C_0c278mih_1_1

-rw-r-----. 1 oracle oinstall  62070784 Sep 25 13:07 rman_ORA19C_0h278mk2_1_1

-rw-r-----. 1 oracle oinstall  21512192 Sep 25 13:07 rman_ORA19C_0j278mkk_1_1

...

/u01/app/oracle/admin/ORA19C/bkpspace2:

total 419716

drwxr-x---. 7 oracle oinstall       81 Sep 25 08:53 ..

-rw-r-----. 1 oracle oinstall 66502656 Sep 25 13:06 rman_ORA19C_0d278mih_1_1

-rw-r-----. 1 oracle oinstall  1425408 Sep 25 13:06 rman_ORA19C_0e278mja_1_1

-rw-r-----. 1 oracle oinstall 40804352 Sep 25 13:07 rman_ORA19C_0f278mjb_1_1

-rw-r-----. 1 oracle oinstall 40738816 Sep 25 13:07 rman_ORA19C_0g278mjq_1_1

-rw-r-----. 1 oracle oinstall 61997056 Sep 25 13:07 rman_ORA19C_0i278mk5_1_1

-rw-r-----. 1 oracle oinstall  1097728 Sep 25 13:07 rman_ORA19C_0k278mkk_1_1

-rw-r-----. 1 oracle oinstall  1245184 Sep 25 13:07 rman_ORA19C_0l278mkm_1_1

-rw-r-----. 1 oracle oinstall  1073152 Sep 25 13:07 rman_ORA19C_0m278mkn_1_1


[oracle@vcentos79-oracle-ha1 backup]$ du -sh /u01/app/oracle/admin/ORA19C/bkpspace2 /oraarch/ORA19C/backup/

410M    /u01/app/oracle/admin/ORA19C/bkpspace2

617M    /oraarch/ORA19C/backup/

[oracle@vcentos79-oracle-ha1 backup]$


>> More or less uniform size distribution.



Steps for solution 1b)


1) Run the backup without any setting change using the below command:


run

{

ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '/oraarch/ORA19C/backup/rman_test_%d_%U';

ALLOCATE CHANNEL d2 DEVICE TYPE DISK FORMAT '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_test_%d_%U';

backup as compressed backupset section size 32G filesperset 1 database;

}


No setting changes in rman..


RMAN> show all;


RMAN configuration parameters for database with db_unique_name ORA19C are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON; # default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE CHANNEL 1 DEVICE TYPE DISK FORMAT   '/oraarch/ORA19C/backup/rman_%d_%U';

CONFIGURE CHANNEL 2 DEVICE TYPE DISK FORMAT   '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_%d_%U';

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 RMAN OUTPUT TO KEEP FOR 7 DAYS; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/19.0.0/db_1/dbs/snapcf_ORA19C.f'; # default




RMAN> run

{

ALLOCATE CHANNEL d1 DEVICE TYPE DISK FORMAT '/oraarch/ORA19C/backup/rman_test_%d_%U';

ALLOCATE CHANNEL d2 DEVICE TYPE DISK FORMAT '/u01/app/oracle/admin/ORA19C/bkpspace2/rman_test_%d_%U';

2> 3> 4> backup as compressed backupset section size 32G filesperset 1 database;

}5> 6>


allocated channel: d1

channel d1: SID=86 device type=DISK


allocated channel: d2

channel d2: SID=33 device type=DISK


Starting backup at 25-SEP-23

channel d1: starting compressed full datafile backup set

channel d1: specifying datafile(s) in backup set

input datafile file number=00001 name=/oradata/ORA19C/system01.dbf

channel d1: starting piece 1 at 25-SEP-23

channel d2: starting compressed full datafile backup set

channel d2: specifying datafile(s) in backup set

input datafile file number=00003 name=/oradata/ORA19C/sysaux01.dbf

..

piece handle=/u01/app/oracle/admin/ORA19C/bkpspace2/rman_test_ORA19C_11278mva_1_1 tag=TAG20230925T131159 comment=NONE

channel d2: backup set complete, elapsed time: 00:00:01

channel d2: starting compressed full datafile backup set

channel d2: specifying datafile(s) in backup set

input datafile file number=00012 name=/oradata/ORA19C/opdb1/users01.dbf

channel d2: starting piece 1 at 25-SEP-23

channel d1: finished piece 1 at 25-SEP-23

piece handle=/oraarch/ORA19C/backup/rman_test_ORA19C_0v278mv8_1_1 tag=TAG20230925T131159 comment=NONE

channel d1: backup set complete, elapsed time: 00:00:04

channel d2: finished piece 1 at 25-SEP-23

piece handle=/u01/app/oracle/admin/ORA19C/bkpspace2/rman_test_ORA19C_12278mvb_1_1 tag=TAG20230925T131159 comment=NONE

channel d2: backup set complete, elapsed time: 00:00:01

Finished backup at 25-SEP-23


Starting Control File and SPFILE Autobackup at 25-SEP-23

piece handle=/oraarch/ORA19C/autobackup/2023_09_25/o1_mf_s_1148476396_lk2ybwlm_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 25-SEP-23

released channel: d1

released channel: d2


2) Verify the backup


RMAN> list backup of database summary;



List of Backups

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

Key     TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag

------- -- -- - ----------- --------------- ------- ------- ---------- ---

12      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624 << 1st

13      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

14      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

15      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

16      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

17      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

18      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

19      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

20      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

21      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

22      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T130624

24      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159 << 2nd

25      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

26      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

27      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

28      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

29      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

30      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

31      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

32      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

33      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159

34      B  F  A DISK        25-SEP-23       1       1       YES        TAG20230925T131159


RMAN>



Both used different format in the mountpath:


[oracle@vcentos79-oracle-ha1 backup]$ ls -altr /oraarch/ORA19C/backup/ /u01/app/oracle/admin/ORA19C/bkpspace2

/oraarch/ORA19C/backup/:

total 630832

drwxr-x---. 5 oracle oinstall        56 Sep 25 08:58 ..

-rw-r-----. 1 oracle oinstall 239403008 Sep 25 13:07 rman_ORA19C_0c278mih_1_1

-rw-r-----. 1 oracle oinstall  62070784 Sep 25 13:07 rman_ORA19C_0h278mk2_1_1

-rw-r-----. 1 oracle oinstall  21512192 Sep 25 13:07 rman_ORA19C_0j278mkk_1_1 <<backup 1

-rw-r-----. 1 oracle oinstall 239403008 Sep 25 13:12 rman_test_ORA19C_0o278msv_1_1 <<backup 2

-rw-r-----. 1 oracle oinstall  62070784 Sep 25 13:13 rman_test_ORA19C_0t278muo_1_1

drwxr-xr-x. 2 oracle oinstall       213 Sep 25 13:13 .

-rw-r-----. 1 oracle oinstall  21512192 Sep 25 13:13 rman_test_ORA19C_0v278mv8_1_1


/u01/app/oracle/admin/ORA19C/bkpspace2:

total 419716

drwxr-x---. 7 oracle oinstall       81 Sep 25 08:53 ..

-rw-r-----. 1 oracle oinstall 66502656 Sep 25 13:06 rman_ORA19C_0d278mih_1_1

-rw-r-----. 1 oracle oinstall  1425408 Sep 25 13:06 rman_ORA19C_0e278mja_1_1

-rw-r-----. 1 oracle oinstall 40804352 Sep 25 13:07 rman_ORA19C_0f278mjb_1_1

-rw-r-----. 1 oracle oinstall 40738816 Sep 25 13:07 rman_ORA19C_0g278mjq_1_1

-rw-r-----. 1 oracle oinstall 61997056 Sep 25 13:07 rman_ORA19C_0i278mk5_1_1

-rw-r-----. 1 oracle oinstall  1097728 Sep 25 13:07 rman_ORA19C_0k278mkk_1_1

-rw-r-----. 1 oracle oinstall  1245184 Sep 25 13:07 rman_ORA19C_0l278mkm_1_1

-rw-r-----. 1 oracle oinstall  1073152 Sep 25 13:07 rman_ORA19C_0m278mkn_1_1

-rw-r-----. 1 oracle oinstall 66510848 Sep 25 13:12 rman_test_ORA19C_0p278msv_1_1

-rw-r-----. 1 oracle oinstall  1433600 Sep 25 13:12 rman_test_ORA19C_0q278mto_1_1

-rw-r-----. 1 oracle oinstall 40804352 Sep 25 13:12 rman_test_ORA19C_0r278mtq_1_1

-rw-r-----. 1 oracle oinstall 40738816 Sep 25 13:12 rman_test_ORA19C_0s278mu9_1_1

-rw-r-----. 1 oracle oinstall 61997056 Sep 25 13:13 rman_test_ORA19C_0u278mup_1_1

-rw-r-----. 1 oracle oinstall  1097728 Sep 25 13:13 rman_test_ORA19C_10278mv8_1_1

-rw-r-----. 1 oracle oinstall  1245184 Sep 25 13:13 rman_test_ORA19C_11278mva_1_1

drwxr-xr-x. 2 oracle oinstall     4096 Sep 25 13:13 .

-rw-r-----. 1 oracle oinstall  1073152 Sep 25 13:13 rman_test_ORA19C_12278mvb_1_1

[oracle@vcentos79-oracle-ha1 backup]$



Sizes are more or less aligned. This closes this blog.


YouTube Video link:



Thanks

OKV platform certificate rotation - pitfall , awareness!!!!

OKV version: 21.9 Setup: Multimaster R/W cluster Plan: https://docs.google.com/spreadsheets/d/e/2PACX-1vSaXXTjj9cE1fvYpNmsDNBOkTIw78yTwQ6a9o...