RMAN

How to Resolve ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

Found ORA-19602

When I tried to backup a NOARCHIVELOG database in MOUNT state, I got ORA-19602 like the following case:

RMAN> startup mount;
...
RMAN> backup database tag '20190416-before-yearly-import';

Starting backup at 16-APR-19
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=393 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
RMAN-03009: failure of backup command on ORA_DISK_1 channel at 04/16/2019 04:59:52
ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode
...

Rationale

I know a database with NOARCHIVELOG mode cannot be backed up online. In my case, I backed up the database in MOUNT state, it should be no problem at all.

Let’s see the content of ORA-19602.

  • Description
  • ORA-19602: cannot backup or copy active file in NOARCHIVELOG mode

  • Cause
  • You tried to copy or backup a file that was not closed cleanly, and the database was in NOARCHIVELOG mode. This is not allowed because when restored, the file will require redo application before it is usable, and redo is not currently being saved beyond the contents of the online redo logs.

  • Action
  • Take the tablespace offline clean or close the database and retry the copy or backup.

According the above explanation, the term “active file” in the error message means that some data files are not consistent with the redo logs in checkpoint. The inconsistency may result from SHUTDOWN ABORT, blackout or system reboots without closing the database gracefully. Such incidents may leave the database crashed.

To prevent system reboots without closing the database first, you can deploy an automatically start stop initialization script for your system.

Solutions to ORA-19602

Now, you have two ways to handle it, you can either open/shutdown/mount the database, or you can recover the database by this: SQL> recover database;
Please note that, SQL’s recover database and RMAN’s recover database are look-alike, but their effects are slightly different.

Let’s do a backup again.

RMAN> backup database tag '20190416-before-yearly-import';

Starting backup at 16-APR-19
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/ORCL/system01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/ORCL/sysaux01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/ORCL/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/ORCL/users01.dbf
channel ORA_DISK_1: starting piece 1 at 16-APR-19
...

The backup is done.

Leave a Reply

Your email address will not be published. Required fields are marked *