Home » RDBMS Server » Backup & Recovery » ORA-19573: cannot obtain exclusive enqueue for datafile 1 (windows 7 64bit , oracle 10g )
ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570171] Tue, 06 November 2012 04:49 Go to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
hello i backup my database using rman into my external disk using this command

RMAN> run
2> {
3> backup database format 'H:\backup\bkp_%u' tag='sh';
4> backup archivelog ALL format 'H:\backup\arc_%u' Delete input;
5> }

Starting backup at 06-NOV-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF

input datafile fno=00003 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF

input datafile fno=00005 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DB
F
input datafile fno=00004 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
input datafile fno=00002 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DB
F
channel ORA_DISK_1: starting piece 1 at 06-NOV-12
channel ORA_DISK_1: finished piece 1 at 06-NOV-12
piece handle=H:\BACKUP\BKP_05NPKV1M tag=SH comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:36
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 06-NOV-12
channel ORA_DISK_1: finished piece 1 at 06-NOV-12
piece handle=H:\BACKUP\BKP_06NPKV4M tag=SH comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:04
Finished backup at 06-NOV-12

Starting backup at 06-NOV-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=36 recid=9 stamp=798652425
input archive log thread=1 sequence=37 recid=8 stamp=798652423
input archive log thread=1 sequence=38 recid=7 stamp=798652423
input archive log thread=1 sequence=39 recid=10 stamp=798653596
channel ORA_DISK_1: starting piece 1 at 06-NOV-12
channel ORA_DISK_1: finished piece 1 at 06-NOV-12
piece handle=H:\BACKUP\ARC_07NPKV4T tag=TAG20121106T161316 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
channel ORA_DISK_1: deleting archive log(s)
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_06\O1_MF_1_36_89KS9HD8_.ARC recid=9 stamp=798652425
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_06\O1_MF_1_37_89KS9HGM_.ARC recid=8 stamp=798652423
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_06\O1_MF_1_38_89KS9HFX_.ARC recid=7 stamp=798652423
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_06\O1_MF_1_39_89KTG42D_.ARC recid=10 stamp=798653596
Finished backup at 06-NOV-12


now i restore this database using this syntax

RMAN> restore database;

Starting restore at 06-NOV-12
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 F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
channel ORA_DISK_1: reading from backup piece H:\BACKUP\BKP_05NPKV1M
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/06/2012 16:18:27
ORA-19870: error reading backup piece H:\BACKUP\BKP_05NPKV1M
ORA-19573: cannot obtain exclusive enqueue for datafile 1



can you suggest me how can i restore this database using this archive log
Re: ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570174 is a reply to message #570171] Tue, 06 November 2012 05:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Your datahase is up and so you can't restore it.

Regards
Michel
Re: ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570241 is a reply to message #570174] Wed, 07 November 2012 04:01 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
thanks michel

i did this step but when i take backup this time i have one table emp1 in scott schema. i successfuly restore and recover my database but this my emp1 is not recover

i follow this steps

C:\Users\Administrator>sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Nov 7 14:45:43 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;

NAME
---------
ORCL

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

Total System Global Area 1610612736 bytes
Fixed Size                  2066080 bytes
Variable Size             385878368 bytes
Database Buffers         1207959552 bytes
Redo Buffers               14708736 bytes
Database mounted.


C:\Users\Administrator>rman

Recovery Manager: Release 10.2.0.4.0 - Production on Wed Nov 7 14:49:36 2012

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

RMAN> connect target sys@orcl

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

RMAN> restore database
2> ;

Starting restore at 07-NOV-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
channel ORA_DISK_1: reading from backup piece H:\BACKUP\BKP_05NPKV1M
channel ORA_DISK_1: restored backup piece 1

RMAN> restore archivelog all;

Starting restore at 07-NOV-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=36
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=37
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=38
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=39
channel ORA_DISK_1: reading from backup piece H:\BACKUP\ARC_07NPKV4T
channel ORA_DISK_1: restored backup piece 1
piece handle=H:\BACKUP\ARC_07NPKV4T tag=TAG20121106T161316
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
Finished restore at 07-NOV-12

RMAN> recover database;

Starting recover at 07-NOV-12
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:01

Finished recover at 07-NOV-12

RMAN>

piece handle=H:\BACKUP\BKP_05NPKV1M tag=SH
channel ORA_DISK_1: restore complete, elapsed time: 00:00:36
Finished restore at 07-NOV-12
Re: ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570245 is a reply to message #570241] Wed, 07 November 2012 04:18 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
All I can tell you is that Oracle restore what you had at backup time and so you had not this table at this time.
So either you had not this table either it is not in the schema you think.

Regards
Michel
Re: ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570428 is a reply to message #570245] Fri, 09 November 2012 05:21 Go to previous messageGo to next message
x-oracle
Messages: 380
Registered: April 2011
Location: gujarat
Senior Member
ok michel i did this step

F:\oracle\product\10.2.0\db_1\BIN>sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Wed Nov 7 14:55:42 2012

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Enter user-name: sys as sysdba
Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name from v$database;

NAME
---------
ORCL


SQL> conn scott/tiger@ORCL
Connected.




SQL> select tname from tab;

TNAME
------------------------------
DEPT
EMP
BONUS
SALGRADE



SQL> create table emp1 as select * from emp;

Table created.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DEPT                           TABLE
EMP                            TABLE
BONUS                          TABLE
SALGRADE                       TABLE
EMP1                           TABLE

SQL> select * from emp1;

     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
---------- ---------- --------- ---------- --------- ---------- ----------
    DEPTNO
----------
      7369 SMITH      CLERK           7902 17-DEC-80        800
        20

      7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300
        30

      7521 WARD       SALESMAN        7698 22-FEB-81       1250        500
        30


     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
---------- ---------- --------- ---------- --------- ---------- ----------
    DEPTNO
----------
      7566 JONES      MANAGER         7839 02-APR-81       2975
        20

      7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400
        30

      7698 BLAKE      MANAGER         7839 01-MAY-81       2850
        30


     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
---------- ---------- --------- ---------- --------- ---------- ----------
    DEPTNO
----------
      7782 CLARK      MANAGER         7839 09-JUN-81       2450
        10

      7788 SCOTT      ANALYST         7566 19-APR-87       3000
        20

      7839 KING       PRESIDENT            17-NOV-81       5000
        10


     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
---------- ---------- --------- ---------- --------- ---------- ----------
    DEPTNO
----------
      7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0
        30

      7876 ADAMS      CLERK           7788 23-MAY-87       1100
        20

      7900 JAMES      CLERK           7698 03-DEC-81        950
        30


     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM
---------- ---------- --------- ---------- --------- ---------- ----------
    DEPTNO
----------
      7902 FORD       ANALYST         7566 03-DEC-81       3000
        20

      7934 MILLER     CLERK           7782 23-JAN-82       1300
        10


14 rows selected.



C:\Users\Administrator>rman

Recovery Manager: Release 10.2.0.4.0 - Production on Thu Nov 8 12:10:47 2012

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

RMAN> connect target sys@orcl

target database Password:
connected to target database: ORCL (DBID=1323743716)


RMAN> run{
2> backup database format 'g:\backup\bkp_%u' tag='sh';
3> backup archivelog ALL format 'g:\backup\arc_%u' Delete input;
4> }

Starting backup at 08-NOV-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=158 devtype=DISK
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00001 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF

input datafile fno=00003 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF

input datafile fno=00005 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DB
F
input datafile fno=00004 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
input datafile fno=00002 name=F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DB
F
channel ORA_DISK_1: starting piece 1 at 08-NOV-12
channel ORA_DISK_1: finished piece 1 at 08-NOV-12
piece handle=G:\BACKUP\BKP_08NPPQ6L tag=SH comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:55
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 08-NOV-12
channel ORA_DISK_1: finished piece 1 at 08-NOV-12
piece handle=G:\BACKUP\BKP_09NPPQC4 tag=SH comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:17
Finished backup at 08-NOV-12

Starting backup at 08-NOV-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=36 recid=14 stamp=798735501
input archive log thread=1 sequence=37 recid=12 stamp=798735499
input archive log thread=1 sequence=38 recid=11 stamp=798735499
input archive log thread=1 sequence=39 recid=13 stamp=798735500
input archive log thread=1 sequence=40 recid=15 stamp=798811201
input archive log thread=1 sequence=41 recid=16 stamp=798812567
channel ORA_DISK_1: starting piece 1 at 08-NOV-12
channel ORA_DISK_1: finished piece 1 at 08-NOV-12
piece handle=G:\BACKUP\ARC_0ANPPQCN tag=TAG20121108T122247 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:56
channel ORA_DISK_1: deleting archive log(s)
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_07\O1_MF_1_36_89NBFLSD_.ARC recid=14 stamp=798735501
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_07\O1_MF_1_37_89NBFLWY_.ARC recid=12 stamp=798735499
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_07\O1_MF_1_38_89NBFLW6_.ARC recid=11 stamp=798735499
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_07\O1_MF_1_39_89NBFLT9_.ARC recid=13 stamp=798735500
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_08\O1_MF_1_40_89PNC8D7_.ARC recid=15 stamp=798811201
archive log filename=F:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\ORCL\ARCHIVELO
G\2012_11_08\O1_MF_1_41_89POOYS9_.ARC recid=16 stamp=798812567
Finished backup at 08-NOV-12



SQL> conn sys@orcl as sysdba
Enter password:
Connected.
SQL> select name from v$database;

NAME
---------
ORCL


SQL> conn scott/tiger
Connected.
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DEPT                           TABLE
EMP                            TABLE
BONUS                          TABLE
SALGRADE                       TABLE
EMP1                           TABLE

SQL> drop table emp1;

Table dropped.

SQL> conn sys@orcl as sysdba
Enter password:
Connected.
SQL> select name from v$database;

NAME
---------
ORCL



SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.



SQL> startup mount
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size                  2066080 bytes
Variable Size             385878368 bytes
Database Buffers         1207959552 bytes
Redo Buffers               14708736 bytes
Database mounted.



C:\Users\Administrator>rman

Recovery Manager: Release 10.2.0.4.0 - Production on Thu Nov 8 12:47:55 2012

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


RMAN> connect target sys@orcl

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

RMAN> restore database;

Starting restore at 08-NOV-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF
restoring datafile 00002 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\UNDOTBS01.DBF
restoring datafile 00003 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSAUX01.DBF
restoring datafile 00004 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\USERS01.DBF
restoring datafile 00005 to F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\EXAMPLE01.DBF
channel ORA_DISK_1: reading from backup piece G:\BACKUP\BKP_08NPPQ6L
channel ORA_DISK_1: restored backup piece 1
piece handle=G:\BACKUP\BKP_08NPPQ6L tag=SH
channel ORA_DISK_1: restore complete, elapsed time: 00:00:46
Finished restore at 08-NOV-12

RMAN> restore archivelog all;

Starting restore at 08-NOV-12
using channel ORA_DISK_1

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=36
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=37
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=38
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=39
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=40
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=41
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=42
channel ORA_DISK_1: reading from backup piece G:\BACKUP\ARC_0DNPPSH8
channel ORA_DISK_1: restored backup piece 1
piece handle=G:\BACKUP\ARC_0DNPPSH8 tag=TAG20121108T125920
channel ORA_DISK_1: restore complete, elapsed time: 00:00:16
Finished restore at 08-NOV-12

RMAN> recover database;

Starting recover at 08-NOV-12
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:03

Finished recover at 08-NOV-12

RMAN>


SQL> alter database open;

Database altered.

SQL> conn sys as sysdba
Enter password:
Connected.
SQL> conn scott/tiger
Connected.
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
DEPT                           TABLE
EMP                            TABLE
BONUS                          TABLE
SALGRADE                       TABLE
BIN$zGN+LTbIQj+a8BS1+D5fWw==$0 TABLE
Re: ORA-19573: cannot obtain exclusive enqueue for datafile 1 [message #570430 is a reply to message #570428] Fri, 09 November 2012 05:42 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You recovered the database up to the latest point/time that us AFTER the drop.

Regards
Michel
Previous Topic: Restore backup at new machine
Next Topic: dbms_snapshot.refresh
Goto Forum:
  


Current Time: Thu Mar 28 13:40:00 CDT 2024