Saturday, May 24, 2025

How to execute stored script in rman catalog database ?

 

[oracle@orcl ~]$ rman target / catalog  rcatowner/oracle_4U@demopdb1


Recovery Manager: Release 19.0.0.0.0 - Production on Sat May 24 15:24:12 2025

Version 19.3.0.0.0


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


connected to target database: DB1 (DBID=1788905834)

connected to recovery catalog database

RMAN>


RMAN>


RMAN> run {

2> execute script db_plus_arc_bkp;

3> }


executing script: db_plus_arc_bkp



Starting backup at 24-MAY-25

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=37 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=17 RECID=12 STAMP=1201940579

input archived log thread=1 sequence=18 RECID=13 STAMP=1201956550

input archived log thread=1 sequence=19 RECID=14 STAMP=1201956572

input archived log thread=1 sequence=20 RECID=15 STAMP=1201961707

input archived log thread=1 sequence=21 RECID=16 STAMP=1201966425

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T153347_n33spwhd_.bkp tag=TAG20250524T153347 comment=NONE

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

Finished backup at 24-MAY-25


Starting backup at 24-MAY-25

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/DB1/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB1/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB1/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB1/users01.dbf

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_nnndf_TAG20250524T153355_n33sq62z_.bkp tag=TAG20250524T153355 comment=NONE

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

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00010 name=/u01/app/oracle/oradata/DB1/pdb/sysaux01.dbf

input datafile file number=00009 name=/u01/app/oracle/oradata/DB1/pdb/system01.dbf

input datafile file number=00011 name=/u01/app/oracle/oradata/DB1/pdb/undotbs01.dbf

input datafile file number=00012 name=/u01/app/oracle/oradata/DB1/pdb/users01.dbf

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/2FACECCE69615207E0630400040AB366/backupset/2025_05_24/o1_mf_nnndf_TAG20250524T153355_n33sqyrs_.bkp tag=TAG20250524T153355 comment=NONE

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

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00017 name=/u01/app/oracle/oradata/demo1/sysaux01.dbf

input datafile file number=00016 name=/u01/app/oracle/oradata/demo1/system01.dbf

input datafile file number=00018 name=/u01/app/oracle/oradata/demo1/undotbs01.dbf

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/33E6395D57264163E0630400040A2C41/backupset/2025_05_24/o1_mf_nnndf_TAG20250524T153355_n33srh8y_.bkp tag=TAG20250524T153355 comment=NONE

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

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00006 name=/u01/app/oracle/oradata/DB1/pdbseed/sysaux01.dbf

input datafile file number=00005 name=/u01/app/oracle/oradata/DB1/pdbseed/system01.dbf

input datafile file number=00008 name=/u01/app/oracle/oradata/DB1/pdbseed/undotbs01.dbf

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/2FAC79D13BBE3BB3E0630400040A98FA/backupset/2025_05_24/o1_mf_nnndf_TAG20250524T153355_n33srxtp_.bkp tag=TAG20250524T153355 comment=NONE

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

Finished backup at 24-MAY-25


Starting backup at 24-MAY-25

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=22 RECID=17 STAMP=1201966510

channel ORA_DISK_1: starting piece 1 at 24-MAY-25

channel ORA_DISK_1: finished piece 1 at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T153511_n33ssj1p_.bkp tag=TAG20250524T153511 comment=NONE

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

Finished backup at 24-MAY-25


Starting Control File and SPFILE Autobackup at 24-MAY-25

piece handle=/u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_24/o1_mf_s_1201966514_n33ssnvx_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 24-MAY-25


RMAN retention policy will be applied to the command

RMAN retention policy is set to redundancy 1

using channel ORA_DISK_1

Deleting the following obsolete backups and copies:

Type                 Key    Completion Time    Filename/Handle

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

Archive Log          154    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_17_n330h31n_.arc

Archive Log          155    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_18_n33j24vq_.arc

Archive Log          156    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_19_n33j2wbt_.arc

Archive Log          157    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_20_n33o3c4t_.arc

Archive Log          194    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_21_n33spson_.arc

Backup Set           199    24-MAY-25

  Backup Piece       200    24-MAY-25          /u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T153347_n33spwhd_.bkp


Do you really want to delete the above objects (enter YES or NO)? YES

deleted archived log

archived log file name=/u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_17_n330h31n_.arc RECID=12 STAMP=1201940579

deleted archived log

archived log file name=/u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_18_n33j24vq_.arc RECID=13 STAMP=1201956550

deleted archived log

archived log file name=/u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_19_n33j2wbt_.arc RECID=14 STAMP=1201956572

deleted archived log

archived log file name=/u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_20_n33o3c4t_.arc RECID=15 STAMP=1201961707

deleted archived log

archived log file name=/u01/app/oracle/fast_recovery_area/DB1/archivelog/2025_05_24/o1_mf_1_21_n33spson_.arc RECID=16 STAMP=1201966425

deleted backup piece

backup piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T153347_n33spwhd_.bkp RECID=42 STAMP=1201966428

Deleted 6 objects



RMAN>

No comments:

Post a Comment

About the Author : Anurag Pandey | Database cloud Architect | Oracle | SQL Server | PostgreSQL | AI and Data Platform Enthusiast

Anurag Pandey is a Database Architect with expertise in Oracle, PostgreSQL, SQL Server, Linux, and enterprise database platforms and specializes in database architecture, performance tuning, high availability, disaster recovery, cloud modernization, and operational excellence. With extensive experience in enterprise-scale environments, Anurag is passionate about leveraging AI, automation, and modern data platforms to improve reliability, scalability, and business outcomes. He actively contributes to technical communities through knowledge sharing, architecture guidance, and thought leadership in database and data engineering domains.

Follow more articles at

Visit Blog

Oracle 19c to PostgreSQL 15 Migration: Step-by-Step Production Guide (Ora2Pg + DMS)

Production-oriented migration approach for a complex Oracle 19c to PostgreSQL 15 workload , covering assessment, schema and code conversion,...