Today we will see how to take backup of Oracle Database when your database is in NOARCHIVELOG mode.

Step 1: Check your database details

[oracle@dbatesting ~]$ export ORACLE_SID=orcl
[oracle@dbatesting ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed Dec 19 21:44:57 2018

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode from v$database;

NAME	  OPEN_MODE
--------- --------------------
ORCL	  READ WRITE

SQL> show parameter db_recovery

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest		     string	 /home/appndb/oracle/fast_recov
						 ery_area/orcl
db_recovery_file_dest_size	     big integer 62780M
SQL> archive log list
Database log mode	       No Archive Mode
Automatic archival	       Disabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     1
Current log sequence	       2
SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCLPDB			  READ WRITE NO
SQL>

In the above output, we can see that the database is in NOARCHIVELOG mode and we have checked the db_recovery_file_dest_size parameter where we can see that it has enough space available to take a new backup.

Step 2: Let’s connect to RMAM and try taking backup

[oracle@dbatesting ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Wed Dec 19 21:47:50 2018

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

connected to target database: ORCL (DBID=1523095627)

RMAN> backup database;

Starting backup at 19-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=264 device type=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/19/2018 21:48:00
RMAN-06149: cannot BACKUP DATABASE in NOARCHIVELOG mode

RMAN> exit

RMAN threw an error that we cannot take backup of the database when the database is in NOARCHIVELOG mode. Let’s try changing open mode of the database

Step 3: Let’s try changing open_mode of database

[oracle@dbatesting ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed Dec 19 21:48:07 2018

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name,open_mode from v$database;

NAME	  OPEN_MODE
--------- --------------------
ORCL	  READ WRITE

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 2097152000 bytes
Fixed Size		    8794696 bytes
Variable Size		  620760504 bytes
Database Buffers	 1459617792 bytes
Redo Buffers		    7979008 bytes
Database mounted.
SQL>

Step 4: I have changed database state to mount state. Now let’s take a backup

[oracle@dbatesting ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Wed Dec 19 21:49:28 2018

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

connected to target database: ORCL (DBID=1523095627, not open)


RMAN> configure controlfile autobackup on;

new RMAN configuration parameters:
CONFIGURE CONTROLFILE AUTOBACKUP ON;
new RMAN configuration parameters are successfully stored

RMAN> backup database;

Starting backup at 19-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=135 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/home/appndb/oracle/oradata/orcl/system01.dbf
input datafile file number=00003 name=/home/appndb/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00004 name=/home/appndb/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00007 name=/home/appndb/oracle/oradata/orcl/users01.dbf
channel ORA_DISK_1: starting piece 1 at 19-DEC-18
channel ORA_DISK_1: finished piece 1 at 19-DEC-18
piece handle=/home/appndb/oracle/fast_recovery_area/orcl/ORCL/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvxjb2_.bkp tag=TAG20181219T214959 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:36
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=/home/appndb/oracle/oradata/orcl/orclpdb/sysaux01.dbf
input datafile file number=00009 name=/home/appndb/oracle/oradata/orcl/orclpdb/system01.dbf
input datafile file number=00011 name=/home/appndb/oracle/oradata/orcl/orclpdb/undotbs01.dbf
input datafile file number=00012 name=/home/appndb/oracle/oradata/orcl/orclpdb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 19-DEC-18
channel ORA_DISK_1: finished piece 1 at 19-DEC-18
piece handle=/home/appndb/oracle/fast_recovery_area/orcl/ORCL/7D624BBBEC2B4677E0538001A8C06AFB/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvym6w_.bkp tag=TAG20181219T214959 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=/home/appndb/oracle/oradata/orcl/pdbseed/sysaux01.dbf
input datafile file number=00005 name=/home/appndb/oracle/oradata/orcl/pdbseed/system01.dbf
input datafile file number=00008 name=/home/appndb/oracle/oradata/orcl/pdbseed/undotbs01.dbf
channel ORA_DISK_1: starting piece 1 at 19-DEC-18
channel ORA_DISK_1: finished piece 1 at 19-DEC-18
piece handle=/home/appndb/oracle/fast_recovery_area/orcl/ORCL/7D6229500D1A3A90E0538001A8C0AF10/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvz2ct_.bkp tag=TAG20181219T214959 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15
Finished backup at 19-DEC-18

Starting Control File and SPFILE Autobackup at 19-DEC-18
piece handle=/home/appndb/oracle/fast_recovery_area/orcl/ORCL/autobackup/2018_12_19/o1_mf_s_995320112_g1nvzm3z_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 19-DEC-18

RMAN> 

Step 5: Now let’s open database in open mode

[oracle@dbatesting ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Wed Dec 19 21:51:18 2018

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> alter database open;

Database altered.

SQL> show pdbs;

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCLPDB			  MOUNTED
SQL> alter pluggable database orclpdb open;

Pluggable database altered.

SQL> show pdbs

    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 ORCLPDB			  READ WRITE NO
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

Step 6: You can check backup we took in rman using list backup command

[oracle@dbatesting ~]$ rman target /

Recovery Manager: Release 12.2.0.1.0 - Production on Wed Dec 19 21:51:47 2018

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

connected to target database: ORCL (DBID=1523095627)

RMAN> list backup;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
1       Full    1.01G      DISK        00:00:25     19-DEC-18      
        BP Key: 1   Status: AVAILABLE  Compressed: NO  Tag: TAG20181219T214959
        Piece Name: /home/appndb/oracle/fast_recovery_area/orcl/ORCL/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvxjb2_.bkp
  List of Datafiles in backup set 1
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  1       Full 1446097    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/system01.dbf
  3       Full 1446097    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/sysaux01.dbf
  4       Full 1446097    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/undotbs01.dbf
  7       Full 1446097    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
2       Full    478.31M    DISK        00:00:09     19-DEC-18      
        BP Key: 2   Status: AVAILABLE  Compressed: NO  Tag: TAG20181219T214959
        Piece Name: /home/appndb/oracle/fast_recovery_area/orcl/ORCL/7D624BBBEC2B4677E0538001A8C06AFB/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvym6w_.bkp
  List of Datafiles in backup set 2
  Container ID: 3, PDB Name: ORCLPDB
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  9       Full 1446024    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/orclpdb/system01.dbf
  10      Full 1446024    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/orclpdb/sysaux01.dbf
  11      Full 1446024    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/orclpdb/undotbs01.dbf
  12      Full 1446024    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/orclpdb/users01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
3       Full    512.50M    DISK        00:00:11     19-DEC-18      
        BP Key: 3   Status: AVAILABLE  Compressed: NO  Tag: TAG20181219T214959
        Piece Name: /home/appndb/oracle/fast_recovery_area/orcl/ORCL/7D6229500D1A3A90E0538001A8C0AF10/backupset/2018_12_19/o1_mf_nnndf_TAG20181219T214959_g1nvz2ct_.bkp
  List of Datafiles in backup set 3
  Container ID: 2, PDB Name: PDB$SEED
  File LV Type Ckp SCN    Ckp Time  Abs Fuz SCN Sparse Name
  ---- -- ---- ---------- --------- ----------- ------ ----
  5       Full 1440350    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/pdbseed/system01.dbf
  6       Full 1440350    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/pdbseed/sysaux01.dbf
  8       Full 1440350    19-DEC-18              NO    /home/appndb/oracle/oradata/orcl/pdbseed/undotbs01.dbf

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4       Full    17.94M     DISK        00:00:02     19-DEC-18      
        BP Key: 4   Status: AVAILABLE  Compressed: NO  Tag: TAG20181219T215105
        Piece Name: /home/appndb/oracle/fast_recovery_area/orcl/ORCL/autobackup/2018_12_19/o1_mf_s_995320112_g1nvzm3z_.bkp
  SPFILE Included: Modification time: 19-DEC-18
  SPFILE db_unique_name: ORCL
  Control File Included: Ckp SCN: 1446097      Ckp time: 19-DEC-18

RMAN>

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

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.