Sunday, May 25, 2025

How to take backup of oracle database plus archivelog ?

 

RMAN>


RMAN> backup database plus archivelog ;



Starting backup at 25-MAY-25

current log archived

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=278 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=22 RECID=17 STAMP=1201966510

input archived log thread=1 sequence=23 RECID=18 STAMP=1201968926

input archived log thread=1 sequence=24 RECID=19 STAMP=1201970163

input archived log thread=1 sequence=25 RECID=20 STAMP=1202022953

input archived log thread=1 sequence=26 RECID=21 STAMP=1202026475

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

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_25/o1_mf_annnn_TAG20250525T081436_n35ncf0p_.bkp tag=TAG20250525T081436 comment=NONE

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

Finished backup at 25-MAY-25


Starting backup at 25-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 25-MAY-25

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35ncno8_.bkp tag=TAG20250525T081440 comment=NONE

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

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 25-MAY-25

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/2FACECCE69615207E0630400040AB366/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35ndnx1_.bkp tag=TAG20250525T081440 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 25-MAY-25

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/33E6395D57264163E0630400040A2C41/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35nf4bh_.bkp tag=TAG20250525T081440 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 25-MAY-25

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/2FAC79D13BBE3BB3E0630400040A98FA/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35nfmyv_.bkp tag=TAG20250525T081440 comment=NONE

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

Finished backup at 25-MAY-25


Starting backup at 25-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=27 RECID=22 STAMP=1202026564

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

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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_25/o1_mf_annnn_TAG20250525T081604_n35ng5fm_.bkp tag=TAG20250525T081604 comment=NONE

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

Finished backup at 25-MAY-25


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

piece handle=/u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_25/o1_mf_s_1202026566_n35ng924_.bkp comment=NONE

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


RMAN>

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

How to recover oracle database from loss of critical data files (system.dbf) ?

Recover database from loss of critical data files 



*Should we have good backup 


SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 PDB                            MOUNTED

         4 DEMO1                          MOUNTED

SQL> alter pluggable database all open ;

alter pluggable database all open

*

ERROR at line 1:

ORA-01116: error in opening database file 1

ORA-01110: data file 1: '/u01/app/oracle/oradata/DB1/system01.dbf'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file or directory

Additional information: 3



SQL>



SQL> shut abort ;

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

[oracle@orcl DB1]$

[oracle@orcl DB1]$ rman target /


Recovery Manager: Release 19.0.0.0.0 - Production on Sun May 25 08:56:06 2025

Version 19.3.0.0.0


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


connected to target database (not started)


RMAN> startup mount ;


Oracle instance started

database mounted


Total System Global Area    2432695832 bytes


Fixed Size                     9137688 bytes

Variable Size                553648128 bytes

Database Buffers            1862270976 bytes

Redo Buffers                   7639040 bytes


RMAN> restore datafile 1;


Starting restore at 25-MAY-25

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=257 device type=DISK


channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/DB1/system01.dbf

channel ORA_DISK_1: reading from backup piece /u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35ncno8_.bkp

channel ORA_DISK_1: piece handle=/u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_25/o1_mf_nnndf_TAG20250525T081440_n35ncno8_.bkp tag=TAG20250525T081440

channel ORA_DISK_1: restored backup piece 1

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

Finished restore at 25-MAY-25


RMAN> recover datafile 1;


Starting recover at 25-MAY-25

using channel ORA_DISK_1


starting media recovery

media recovery complete, elapsed time: 00:00:03


Finished recover at 25-MAY-25


RMAN> alter database open ;


Statement processed


RMAN> alter pluggable database all open ;


Statement processed


RMAN> exit



Recovery Manager complete.

[oracle@orcl DB1]$ sqlplus "/as sysdba"


SQL*Plus: Release 19.0.0.0.0 - Production on Sun May 25 08:58:08 2025

Version 19.3.0.0.0


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



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0


SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 PDB                            READ WRITE NO

         4 DEMO1                          READ WRITE NO

SQL>

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

Saturday, May 24, 2025

How to create Virtual Private catalog and enable the VPD (virtual private database ) feature in rman catalog with upgrade ?

[oracle@orcl ~]$

[oracle@orcl ~]$ sqlplus sys/sys@demopdb1 as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 24 15:45:25 2025

Version 19.3.0.0.0


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



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0


SQL> @$ORACLE_HOME/rdbms/admin/dbmsrmanvpc.sql vpd rcatowner


Checking the operating user... Passed


The VPC user schemas of the following catalogs: VPD, RCATOWNER are going to be upgraded to a new VPD model


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

Removing old VPC views in the base catalog of RCATOWNER...

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

UPGRADE STATUS:

The VPC user schemas of these catalogs: RCATOWNER

have been successfully upgraded to the new VPD model!


Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

[oracle@orcl ~]$

[oracle@orcl ~]$

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


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

Version 19.3.0.0.0


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


connected to recovery catalog database


RMAN> upgrade catalog ;


recovery catalog owner is RCATOWNER

enter UPGRADE CATALOG command again to confirm catalog upgrade


RMAN> upgrade catalog ;


RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-20516: cannot upgrade the catalog when other RMAN sessions are connected to catalog


RMAN> upgrade catalog ;


recovery catalog owner is RCATOWNER

enter UPGRADE CATALOG command again to confirm catalog upgrade


RMAN> upgrade catalog ;


recovery catalog upgraded to version 19.03.00.00.00

DBMS_RCVMAN package upgraded to version 19.03.00.00

DBMS_RCVCAT package upgraded to version 19.03.00.00.


RMAN>

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

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>

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

How to create stored script using recovery catalog and replace the script if needed ?

 


[oracle@orcl ~]$

[oracle@orcl ~]$

[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> list script names;


List of Stored Scripts in Recovery Catalog


        No scripts in recovery catalog


RMAN> create script db_plus_arc_bkp

2> {

3> backup database plus archivelog ;

4> }


created script db_plus_arc_bkp


RMAN> list script names;


List of Stored Scripts in Recovery Catalog



    Scripts of Target Database DB1


       Script Name

       Description

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

       db_plus_arc_bkp


RMAN> print script db_plus_arc_bkp;


printing stored script: db_plus_arc_bkp

{

backup database plus archivelog ;

}


RMAN> replace script db_plus_arc_bkp

2> {

3> backup database plus archivelog ;

4> delete obsolete ;

5> }


replaced script db_plus_arc_bkp


RMAN> print script db_plus_arc_bkp;


printing stored script: db_plus_arc_bkp

{

backup database plus archivelog ;

delete obsolete ;

}


RMAN>

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

How to manually resync oracle database with catalog database ?

 [oracle@orcl ~]$

[oracle@orcl ~]$

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


Recovery Manager: Release 19.0.0.0.0 - Production on Sat May 24 15:11:11 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> resync catalog ;


starting full resync of recovery catalog

full resync complete


RMAN>

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

How to register database in recovery catalog ?

[oracle@orcl ~]$

[oracle@orcl ~]$

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


Recovery Manager: Release 19.0.0.0.0 - Production on Sat May 24 15:07:56 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> register database ;


database registered in recovery catalog

starting full resync of recovery catalog

full resync complete


RMAN>

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

How to create recovery catalog ?

 


[oracle@orcl ~]$

[oracle@orcl ~]$ sqlplus "/as sysdba"


SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 24 14:41:25 2025

Version 19.3.0.0.0


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



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0



SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 DEMOPDB1                       MOUNTED

SQL> alter pluggable database demopdb1 open read write ;


Pluggable database altered.


SQL> show con_name


CON_NAME

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

CDB$ROOT

SQL>





SQL> alter session set container =demopdb1;


Session altered.




SQL> create tablespace rcat datafile '/u01/app/oracle/oradata/DB2/rcat.dbf' size 15M;


Tablespace created.


SQL>



SQL>

SQL> CREATE USER rcatowner IDENTIFIED BY oracle_4U

TEMPORARY TABLESPACE temp

DEFAULT TABLESPACE rca  2    3  t

QUOTA UNLIMIT  4  ED ON rcat;


User created.




SQL> grant recovery_catalog_owner to rcatowner;


Grant succeeded.


SQL>



[oracle@orcl ~]$

[oracle@orcl ~]$

[oracle@orcl ~]$ rman


Recovery Manager: Release 19.0.0.0.0 - Production on Sat May 24 14:54:57 2025

Version 19.3.0.0.0


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


RMAN> connect catalog rcatowner/oracle_4U@demopdb1


connected to recovery catalog database


RMAN> create catalog;



recovery catalog created


RMAN>

RMAN>




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

How to create tablespace in oracle database ?

 

SQL>

SQL>  create tablespace rcat datafile '/u01/app/oracle/oradata/DB2/rcat.dbf' size 15M;


Tablespace created.


SQL>

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

How to drop tablespace in oracle database ?

 



SQL> DROP TABLESPACE rcat INCLUDING CONTENTS AND DATAFILES;


Tablespace dropped.


SQL>

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

How backup database using rman keep forever ?

 


RMAN> backup database keep forever ;


Starting backup at 24-MAY-25


using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2025 14:12:06

RMAN-06522: KEEP FOREVER option is not supported without the recovery catalog


RMAN>




RMAN> backup database keep until time 'sysdate+1';


Starting backup at 24-MAY-25


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:04

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:06

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:07

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2025 14:13:08

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes


RMAN>



RMAN> backup database keep until time 'sysdate+1';


Starting backup at 24-MAY-25


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:04

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:06

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-03009: failure of backup command on ORA_DISK_1 channel at 05/24/2025 14:13:07

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes

continuing other job steps, job failed will not be re-run

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

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2025 14:13:08

ORA-19811: cannot have files in DB_RECOVERY_FILE_DEST with keep attributes


RMAN>


RMAN>


RMAN> backup database format '/u01/app/oracle/%U' keep until time 'sysdate+1';


Starting backup at 24-MAY-25


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

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/2n3q8ulb_1_1 tag=TAG20250524T141402 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/2o3q8um4_1_1 tag=TAG20250524T141402 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/2p3q8umj_1_1 tag=TAG20250524T141402 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/2q3q8un3_1_1 tag=TAG20250524T141402 comment=NONE

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

current log archived


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

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=20 RECID=15 STAMP=1201961707

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/2r3q8unc_1_1 tag=TAG20250524T141402 comment=NONE

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


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

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/2s3q8und_1_1 tag=TAG20250524T141402 comment=NONE

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


using channel ORA_DISK_1

backup will be obsolete on date 25-MAY-25

archived logs required to recover from this backup will be backed up

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 24-MAY-25

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

piece handle=/u01/app/oracle/2t3q8unf_1_1 tag=TAG20250524T141402 comment=NONE

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

Finished backup at 24-MAY-25


RMAN>

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

RMAN-06603: TO DESTINATION option must be specified with RECOVERY AREA, RECOVERY FILES or DB_RECOVERY_FILE_DEST on disk device

 

RMAN> backup recovery area;


Starting backup at 24-MAY-25

using channel ORA_DISK_1

specification does not match any datafile copy in the repository

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2025 13:47:36

RMAN-06603: TO DESTINATION option must be specified with RECOVERY AREA, RECOVERY FILES or DB_RECOVERY_FILE_DEST on disk device


RMAN> backup recovery files;


Starting backup at 24-MAY-25

using channel ORA_DISK_1

specification does not match any datafile copy in the repository

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of backup command at 05/24/2025 13:47:50

RMAN-06603: TO DESTINATION option must be specified with RECOVERY AREA, RECOVERY FILES or DB_RECOVERY_FILE_DEST on disk device



Note : we have to specify the destination directory path where we need to take backup 


BACKUP RECOVERY AREA TO DESTINATION 'u01/app/oracle/backup';

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

How to take backup of backupset in oracle RMAN ?

 RMAN> backup backupset all;


Starting backup at 24-MAY-25

using channel ORA_DISK_1

channel ORA_DISK_1: input backup set: count=78, stamp=1201960787, piece=1

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

skipping backup piece handle /u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_24/o1_mf_s_1201960787_n33n6o4x_.bkp; already exists

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

channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:00

channel ORA_DISK_1: input backup set: count=79, stamp=1201960815, piece=1

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

channel ORA_DISK_1: backup piece /u01/app/oracle/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_nnndf_TAG20250524T140015_n33n7jcg_.bkp

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

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

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

channel ORA_DISK_1: input backup set: count=80, stamp=1201960817, piece=1

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

skipping backup piece handle /u01/app/oracle/fast_recovery_area/DB1/autobackup/2025_05_24/o1_mf_s_1201960817_n33n7m82_.bkp; already exists

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

channel ORA_DISK_1: backup piece complete, elapsed time: 00:00:00

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_1201960828_n33n7y5b_.bkp comment=NONE

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


RMAN>

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

How to backup all recovery files in oracle ?

 RMAN> backup recovery files to destination '/u01/app/oracle/';


Starting backup at 24-MAY-25

using channel ORA_DISK_1

specification does not match any datafile copy in the repository

skipping archived logs of thread 1 from sequence 17 to 19; already backed up

skipping backup set key 19; already backed up 1 time(s)

skipping backup set key 20; already backed up 1 time(s)

skipping backup set key 21; already backed up 1 time(s)

skipping backup set key 22; already backed up 1 time(s)

skipping backup set key 23; already backed up 1 time(s)

skipping backup set key 24; already backed up 1 time(s)

skipping backup set key 25; already backed up 1 time(s)

skipping backup set key 26; already backed up 1 time(s)

skipping backup set key 27; already backed up 1 time(s)

skipping backup set key 28; already backed up 1 time(s)

Finished backup at 24-MAY-25


RMAN>

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

How to backup recovery area in oracle database ?

 RMAN> backup recovery area to destination '/u01/app/oracle/'

2> ;


Starting backup at 24-MAY-25

using channel ORA_DISK_1

specification does not match any datafile copy in the repository

skipping backup set key 23; already backed up 1 time(s)

skipping backup set key 26; already backed up 1 time(s)

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

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/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T135211_n33mrcpv_.bkp tag=TAG20250524T135211 comment=NONE

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

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_1201960334_n33mrjx1_.bkp comment=NONE

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


RMAN>

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

How to take incremental backup of oracle database ?

 

RMAN>  run {

2>  allocate channel "ch1" device type disk format '/u01/app/oracle/%U';

3> backup as backupset tag 'BASE01' incremental level 0 database;

4> }


released channel: ORA_DISK_1

allocated channel: ch1

channel ch1: SID=281 device type=DISK


Starting backup at 24-MAY-25

channel ch1: starting incremental level 0 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0l3q8raq_1_1 tag=BASE01 comment=NONE

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

channel ch1: starting incremental level 0 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0m3q8rbj_1_1 tag=BASE01 comment=NONE

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

channel ch1: starting incremental level 0 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0n3q8rc2_1_1 tag=BASE01 comment=NONE

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

channel ch1: starting incremental level 0 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0o3q8rca_1_1 tag=BASE01 comment=NONE

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

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_1201958297_n33krv6v_.bkp comment=NONE

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

released channel: ch1


RMAN>




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


RMAN>


RMAN> run {

2> allocate channel "ch1" device type disk format '/u01/app/oracle/%U';

3> backup tag 'incrementallv1' incremental level 1 database ;

4> }


allocated channel: ch1

channel ch1: SID=281 device type=DISK


Starting backup at 24-MAY-25

channel ch1: starting incremental level 1 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0q3q8rhm_1_1 tag=INCREMENTALLV1 comment=NONE

channel ch1: backup set complete, elapsed time: 00:00:03

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

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

skipping datafile 00010 because it has not changed

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

skipping datafile 00009 because it has not changed

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

skipping datafile 00011 because it has not changed

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

skipping datafile 00012 because it has not changed

channel ch1: backup cancelled because all files were skipped

channel ch1: starting incremental level 1 datafile backup set

channel ch1: 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 ch1: starting piece 1 at 24-MAY-25

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

piece handle=/u01/app/oracle/0s3q8rhq_1_1 tag=INCREMENTALLV1 comment=NONE

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

channel ch1: starting incremental level 1 datafile backup set

channel ch1: specifying datafile(s) in backup set

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

skipping datafile 00006 because it has not changed

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

skipping datafile 00005 because it has not changed

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

skipping datafile 00008 because it has not changed

channel ch1: backup cancelled because all files were skipped

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_1201958459_n33kxxp9_.bkp comment=NONE

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

released channel: ch1


RMAN>

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

How to check and open pluggable database ?

 SQL>

SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 PDB                            MOUNTED

         4 DEMO1                          MOUNTED

SQL> alter pluggable database demo1 open read write ;


Pluggable database altered.


SQL> show pdbs


    CON_ID CON_NAME                       OPEN MODE  RESTRICTED

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

         2 PDB$SEED                       READ ONLY  NO

         3 PDB                            MOUNTED

         4 DEMO1                          READ WRITE NO

SQL>

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

How to enable block change tracking in oracle database ?

 [oracle@orcl 2025_05_21]$ sqlplus / as sysdba


SQL*Plus: Release 19.0.0.0.0 - Production on Sat May 24 13:01:35 2025

Version 19.3.0.0.0


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



Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0


SQL>

SQL>

SQL> SELECT status, filename FROM v$block_change_tracking;


STATUS     FILENAME

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

DISABLED


SQL>

SQL>

SQL> select filename form v$datafile;

select filename form v$datafile

                     *

ERROR at line 1:

ORA-00923: FROM keyword not found where expected



SQL> select name from v$datafile;


NAME

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

/u01/app/oracle/oradata/DB1/system01.dbf

/u01/app/oracle/oradata/DB1/sysaux01.dbf

/u01/app/oracle/oradata/demo1/undotbs01.dbf


14 rows selected.


SQL> alter database enable block change tracking using file '/u01/app/oracle/block_change_tracking.f';


Database altered.


SQL> select * from v$block_change_tracking ;


STATUS     FILENAME                            BYTES     CON_ID

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

ENABLED    /u01/app/oracle/block_change_t   11599872          1

           racking.f



SQL>

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,...