Saturday, May 24, 2025

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>

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>

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>

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>

RMAN setting not able to change when connect with pluggable database

 RMAN> show all;


RMAN configuration parameters for database with db_unique_name DB1 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; # default

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

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

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE 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/dbhome_1/dbs/snapcf_db1.f'; # default


RMAN> CONFIGURE CONTROLFILE AUTOBACKUP ON;


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

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

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

RMAN-03002: failure of configure command at 05/24/2025 12:56:01

RMAN-07536: command not allowed when connected to a Pluggable Database


RMAN>

backup pluggable database with direct connect with rman

 [oracle@orcl 2025_05_21]$

[oracle@orcl 2025_05_21]$

[oracle@orcl 2025_05_21]$ rman target sys/sys@demo1


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

Version 19.3.0.0.0


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


connected to target database: DB1:DEMO1 (DBID=687471135, not open)


RMAN> backup database;


Starting backup at 24-MAY-25

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=291 device type=DISK

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=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_TAG20250524T125446_n33jdplq_.bkp tag=TAG20250524T125446 comment=NONE

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

Finished backup at 24-MAY-25


RMAN>

How to backup pluggable database including archivelog ?

 RMAN>


RMAN> backup pluggable database demo1 plus archivelog;



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=17 RECID=12 STAMP=1201940579

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

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_TAG20250524T124910_n33j27g2_.bkp tag=TAG20250524T124910 comment=NONE

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

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=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_TAG20250524T124914_n33j2cfq_.bkp tag=TAG20250524T124914 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=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/fast_recovery_area/DB1/backupset/2025_05_24/o1_mf_annnn_TAG20250524T124932_n33j2x6l_.bkp tag=TAG20250524T124932 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_1201956574_n33j30tj_.bkp comment=NONE

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


RMAN>

Oracle 26 ai database free

 https://www.oracle.com/in/database/26ai/ Oracle 26 ai release  Oracle AI Database Free Want to get hands-on with Oracle AI Database 26ai—ab...