Home » RDBMS Server » Backup & Recovery » RMAN Recovery (Oracle 10.2.0.1.0 - Linux)
RMAN Recovery [message #346520] Mon, 08 September 2008 15:00 Go to next message
danyromimd
Messages: 73
Registered: August 2008
Member
Hi!
I'm getting the following error when executing the 'restore database;' command...

RMAN> restore database;

Starting restore at 08-SEP-08
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/app/oracle/oradata/xxx/system01.dbf
restoring datafile 00003 to /u01/app/oracle/oradata/xxx/sysaux01.dbf
restoring datafile 00009 to /u01/app/oracle/oradata/xxx/xxx_data_2.dbf
restoring datafile 00010 to /u01/app/oracle/oradata/xxx/xxx_data_3.dbf
restoring datafile 00017 to /u03/oracle/xxx/xxx_data_big_4.dbf
restoring datafile 00021 to /u01/app/oracle/oradata/xxx/xxx_data_4.dbf
restoring datafile 00034 to /u01/app/oracle/oradata/xxx/xxx_data_6.dbf
restoring datafile 00039 to /u02/app/oracle/oradata/xxx/xxx_idx_14.dbf
restoring datafile 00040 to /u01/app/oracle/oradata/xxx/xxx_data_7.dbf
channel ORA_DISK_1: reading from backup piece /u03/oracle/xxx/BKP/csbd_XXX_0njpm66j_664475859.bak
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 09/08/2008 16:23:57
ORA-19870: error reading backup piece /u03/oracle/xxx/BKP/csbd_XXX_0njpm66j_664475859.bak
ORA-19573: cannot obtain exclusive enqueue for datafile 17

RMAN>

The standby DB is mounted and the primary DB is opened.

Any suggestions about what to do?

Re: RMAN Recovery [message #346524 is a reply to message #346520] Mon, 08 September 2008 15:05 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
19573, 00000, "cannot obtain %s enqueue for datafile %s"
// *Cause:  The file access enqueue could not be obtained for a file
//          specified in a backup, copy or restore operation.
//          If the enqueue type shown is 'shared', then the file is the
//          input file for a backup or copy.  If the type is 'exclusive', then
//          the file is the output file for a datafile copy or restore which
//          is attempting to overwrite the currently active version of that
//          file - in this case, the file must be offline or the database must
//          be closed.  If the type is 'read-only', then you are attempting
//          to back up or copy this file while the database is in NOARCHIVELOG
//          mode.
// *Action: Wait until the conflicting operation is complete, then retry
//          the copy or backup.  If the database is in NOARCHIVELOG mode, then
//          all files being backed up must be closed cleanly.
Re: RMAN Recovery [message #346525 is a reply to message #346520] Mon, 08 September 2008 15:06 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
ORA-19573: cannot obtain %s enqueue for datafile %s
 *Cause:  The file access enqueue could not be obtained for a file
          specified in a backup, copy or restore operation.
          If the enqueue type shown is 'shared', then the file is the
          input file for a backup or copy.  If the type is 'exclusive', then
          the file is the output file for a datafile copy or restore which
          is attempting to overwrite the currently active version of that
          file - in this case, the file must be offline or the database must
          be closed.  If the type is 'read-only', then you are attempting
          to back up or copy this file while the database is in NOARCHIVELOG
          mode.
 *Action: Wait until the conflicting operation is complete, then retry
          the copy or backup.  If the database is in NOARCHIVELOG mode, then
          all files being backed up must be closed cleanly

Regards
Michel
Re: RMAN Recovery [message #346529 is a reply to message #346520] Mon, 08 September 2008 15:19 Go to previous messageGo to next message
danyromimd
Messages: 73
Registered: August 2008
Member
Is this the way to query the enqueue type? If so... What does it all mean??

SQL> SELECT id1, id2, type FROM V$LOCK ;

ID1 ID2 TY
---------- ---------- --
-512909092 535312601 WL
4 0 XR
0 0 CF
25 1 RS
1 0 RT

Thanks a lot.
Re: RMAN Recovery [message #346530 is a reply to message #346520] Mon, 08 September 2008 15:25 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
id1, id2, lmode, request, type
FROM V$LOCK
WHERE (id1, id2, type) IN
(SELECT id1, id2, type FROM V$LOCK WHERE request>0)
ORDER BY id1, request
/


I typically use the SQL above
Re: RMAN Recovery [message #346532 is a reply to message #346520] Mon, 08 September 2008 15:36 Go to previous messageGo to next message
danyromimd
Messages: 73
Registered: August 2008
Member
I've made a modification to your query as I had no rows with 'request>0'
This is the output... but I really don't understand what it all means...

SQL> SELECT DECODE(request,0,'Holder: ','Waiter: ')||sid sess,
2 id1, id2, lmode, request, type
3 FROM V$LOCK
4 WHERE (id1, id2, type) IN
5 (SELECT id1, id2, type FROM V$LOCK)
6 ORDER BY id1, request;

SESS ID1 ID2 LMODE REQUEST TY
------------- ---------- --------- ---------- ---------- --
Holder: 158 -512909092 535312601 5 0 WL

Holder: 165 0 0 2 0 CF

Holder: 166 1 0 6 0 RT

Holder: 165 4 0 1 0 XR

Holder: 165 25 1 2 0 RS


SQL>
Re: RMAN Recovery [message #346537 is a reply to message #346520] Mon, 08 September 2008 15:55 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & follow posting guidelines as stated in URL above

Please provide as much detail as possible as to what you are hoping to accomplish & what EXACTLY you did prior to issuing
RMAN> restore database;

do NOT use indefinite pronouns; use actual definitive names.
Re: RMAN Recovery [message #346698 is a reply to message #346520] Tue, 09 September 2008 07:52 Go to previous messageGo to next message
danyromimd
Messages: 73
Registered: August 2008
Member
I'm working on Data Guard, so I have 1 primary database and 1 standby db. I've made a backup of the primary db and now I'm trying to restore it on the standby db.
The backup worked perfectly, but the restore output is the one I've posted in my first message.

Thank you!
Re: RMAN Recovery [message #347066 is a reply to message #346520] Wed, 10 September 2008 10:02 Go to previous messageGo to next message
rooneyd
Messages: 9
Registered: September 2008
Junior Member
Hi,

Are the backup pieces available on the standby machine and why are you not using the duplicate target database for standby?
Re: RMAN Recovery [message #347069 is a reply to message #346520] Wed, 10 September 2008 10:11 Go to previous messageGo to next message
hkchital
Messages: 128
Registered: September 2008
Location: Singapore
Senior Member
Did you have a previous copy of the database present as the standby database ? Or a previous restore and mount ?

The error is likely when there is a running instance with the target datafile already present.
Re: RMAN Recovery [message #347095 is a reply to message #346520] Wed, 10 September 2008 11:49 Go to previous message
danyromimd
Messages: 73
Registered: August 2008
Member
Don't ask me how, but it finally worked! I've tried so many things that now I don't really know which of all of them is the one that made it work...
Thanks to all of you!
Previous Topic: types of backups in rman
Next Topic: Script for cold Backup
Goto Forum:
  


Current Time: Mon Nov 25 23:05:38 CST 2024