RMAN: Skipping Offline or Inaccessible Data Files

RMAN: SKIP INACCESSIBLE
Andrey Volkov

Andrey Volkov

System, network administration + DBA. And a little programmer!)) See Author profile.

Suppose you have one data file that is missing or corrupt, and you don’t have a backup of it, so you can’t restore and recover it. You can’t start your database in this situation:

SQL> startup;

ORA-01157: cannot identify/lock data file 6 - see DBWR trace file

ORA-01110: data file 6: '/u01/dbfile/ O12C/reg_data01.dbf'

In this scenario, you’ll have to take the data file offline before you can start your database:

SQL> alter database datafile '/u01/dbfile/O12C/reg_data01.dbf' offline for drop;

Now, you can open your database:

SQL> alter database open;

Suppose you then attempt to run an RMAN backup:

RMAN> backup database;

The following error is thrown when RMAN encounters a data file that it can’t back up:

RMAN-03002: failure of backup command at ...

RMAN-06056: could not access datafile 6

In this situation, you’ll have to instruct RMAN to exclude the offline data file from the backup. The SKIP OFFLINE command instructs RMAN to ignore data files with an offline status:

RMAN> backup database skip offline;

If a file has gone completely missing, use SKIP INACCESSIBLE to instruct RMAN to ignore files that are not available on disk. This might happen if the data file was deleted using an OS command. Here is an example of excluding inaccessible data files from the RMAN backup:

RMAN> backup database skip inaccessible;

You can skip read-only, offline, and inaccessible data files with one command:

RMAN> backup database skip readonly skip offline skip inaccessible;

When dealing with offline and inaccessible files, you should figure out why the files are offline or inaccessible and try to resolve any issues.

Вас заинтересует / Intresting for you:

RMAN: Using Online or Offline ...
RMAN: Using Online or Offline ... 819 views Андрей Волков Sat, 29 Feb 2020, 10:01:33
RMAN: Specifying the Backup Us...
RMAN: Specifying the Backup Us... 1467 views Андрей Волков Sat, 29 Feb 2020, 10:14:03
RMAN: Checking for Corruption ...
RMAN: Checking for Corruption ... 161 views Андрей Волков Thu, 30 Sep 2021, 11:57:27
RMAN: Backing UP Oracle Databa...
RMAN: Backing UP Oracle Databa... 112 views Андрей Волков Wed, 29 Sep 2021, 18:27:51
Log in to comment