Forum Discussion

Govarthanagiri's avatar
11 years ago

Oracle restore: ORA-19573: cannot obtain exclusive enqueue for datafile

**** Moved to new discussion from: https://www-secure.symantec.com/connect/forums/reg-oracle-db-backup ****

i am getting the  below error when try to restore ...kindly help me

 

com09:oracle # /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/database_restore.sh
com09:oracle # cat database_restore.sh.out

Script /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/database_restore.sh
==== started on Sun Aug 17 16:39:17 UTC 2014 ====


RMAN: /opt/PlexView/Oracle/ora01/app/oracle/product/11.2.0/bin/rman
ORACLE_SID: plxdb
ORACLE_USER: oracle
ORACLE_HOME: /opt/PlexView/Oracle/ora01/app/oracle/product/11.2.0
Last login: Sun Aug 17 16:38:47 UTC 2014

Recovery Manager: Release 11.2.0.1.0 - Production on Sun Aug 17 16:39:17 2014

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

connected to target database: PLXDB (DBID=3747984712)
using target database control file instead of recovery catalog

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10>
allocated channel: ch00
channel ch00: SID=28 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.5 (2013061020)

allocated channel: ch01
channel ch01: SID=129 device type=SBT_TAPE
channel ch01: Veritas NetBackup for Oracle - Release 7.5 (2013061020)

Starting restore at 17-AUG-14

channel ch00: starting datafile backup set restore
channel ch00: specifying datafile(s) to restore from backup set
channel ch00: restoring datafile 00005 to /opt/PlexView/Oracle/ora02/oradata/plxdb/audit_data.dbf
channel ch00: restoring datafile 00006 to /opt/PlexView/Oracle/ora02/oradata/plxdb/cfma01.dbf
channel ch00: restoring datafile 00008 to /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es4m_indx.dbf
channel ch00: restoring datafile 00009 to /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es128k_data.dbf
channel ch00: restoring datafile 00010 to /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es128k_indx.dbf
channel ch00: reading from backup piece bk_84_1_855851605
channel ch01: starting datafile backup set restore
channel ch01: specifying datafile(s) to restore from backup set
channel ch01: restoring datafile 00001 to /opt/PlexView/Oracle/ora02/oradata/plxdb/system01.dbf
channel ch01: restoring datafile 00002 to /opt/PlexView/Oracle/ora02/oradata/plxdb/sysaux01.dbf
channel ch01: restoring datafile 00003 to /opt/PlexView/Oracle/ora02/oradata/plxdb/undotbs01.dbf
channel ch01: restoring datafile 00004 to /opt/PlexView/Oracle/ora02/oradata/plxdb/users01.dbf
channel ch01: restoring datafile 00007 to /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es4m_data.dbf
channel ch01: reading from backup piece bk_85_1_855851606
released channel: ch00
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 08/17/2014 16:39:27
ORA-19870: error while restoring backup piece bk_84_1_855851605
ORA-19573: cannot obtain exclusive enqueue for datafile 6

RMAN> RMAN>

Recovery Manager complete.
Last login: Sun Aug 17 16:38:47 UTC 2014

Script /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/database_restore.sh
==== ended in error on Sun Aug 17 16:39:27 UTC 2014 ====

com09:oracle #

regards,

Giri

  • Thanks Marriane,

    the restore works after mount the database (not open)..

    also kindly clarify my below doubt

    if i want to exclude the DB files from my another full bakcup policy ( entire server) which is configured for BMR  for the same server, i can add the below home dir in the exclude list , am i correct ?

    com09:oracle # echo $ORACLE_HOME
    /opt/PlexView/Oracle/ora01/app/oracle/product/11.2.0
    com09:oracle #

     

    regards,

    Giri

  • Rather find out in which folders/filesystems the db files are located and add those to the exclude_list.

    There may be oracle binaries and all sorts of config files in the ORACLE_HOME folder that probably need to be backed up with a normal Standard policy.

    From the output of the restore attempt, it seems that the db files are located under  /opt/PlexView/Oracle/ora02/oradata/

    Add this folder to exclude_list.

    Please .... one query/issue per discussion....

  • Hello, For your second question, first of all, I think, you should add the following DB files to your excluded list: Control file, Data files, Online log files. Second, you need to make sure where are these files located in DB? Run the following commands from your DB: SQL > select name from v$controlfile; SQL > select name from v$datafile; SQL > select * from v$logfile; Thanks
  • Thanks Walker

    i think its all under the dir  "/opt/PlexView/Oracle/ora02/oradata/"

    SQL>
    SQL> select name from v$controlfile;

    NAME
    --------------------------------------------------------------------------------
    /opt/PlexView/Oracle/ora02/oradata/plxdb/ctrl/control01.ctl
    /opt/PlexView/Oracle/ora02/oradata/plxdb/ctrl/control02.ctl

    SQL> select name from v$datafile;

    NAME
    --------------------------------------------------------------------------------
    /opt/PlexView/Oracle/ora02/oradata/plxdb/system01.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/sysaux01.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/undotbs01.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/users01.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/audit_data.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/cfma01.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es4m_data.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es4m_indx.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es128k_data.dbf
    /opt/PlexView/Oracle/ora02/oradata/plxdb/tablespace_es128k_indx.dbf

    10 rows selected.

    SQL> select * from v$logfile;

        GROUP# STATUS  TYPE
    ---------- ------- -------
    MEMBER
    --------------------------------------------------------------------------------
    IS_
    ---
             1         ONLINE
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo01.log
    NO

             2         ONLINE
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo02.log
    NO

        GROUP# STATUS  TYPE
    ---------- ------- -------
    MEMBER
    --------------------------------------------------------------------------------
    IS_
    ---

             3         ONLINE
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo03.log
    NO

             4         STANDBY
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo04.log

        GROUP# STATUS  TYPE
    ---------- ------- -------
    MEMBER
    --------------------------------------------------------------------------------
    IS_
    ---
    NO

             5         STANDBY
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo05.log
    NO

             6         STANDBY

        GROUP# STATUS  TYPE
    ---------- ------- -------
    MEMBER
    --------------------------------------------------------------------------------
    IS_
    ---
    /opt/PlexView/Oracle/ora02/oradata/plxdb/redo/redo06.log
    NO


    6 rows selected.

    SQL> exit