RMAN-05517: temporary file conflicts with file used by target database(zt)

season0891發表於2010-08-01

Re: 10gR2 (10g Release 2) RMAN Duplicate database which has tempfiles?

From: Snewber <>
Date: Thu, 03 Nov 2005 10:21:59 +1000
Message-ID:


I realise that this was the case with pre 10gR2 RMAN backups, but the latest 10gR2 RMAN now records information about tempfiles, eg,

[1020]$ rman nocatalog

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Nov 3

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

RMAN> connect target /

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

RMAN> report schema ;

Report of database schema

List of Permanent Datafiles



File Size(MB) Tablespace RB segs Datafile Name
---- -------- ------------- ------- ------------------------
1 250 SYSTEM *** /a01/o/DUP/system_01.dbf
2 118 UNDOTBS *** /a01/o/DUP/undotbs_01.dbf
3 67 SYSAUX *** /a01/o/DUP/sysaux_01.dbf

List of Temporary Files



File Size(MB) Tablespace Maxsize(MB) Tempfile Name
---- -------- ------------- ----------- --------------------
1 50 TEMP 1000 /a01/o/DUP/temp_01.dbf


So, when duplicating a database with a tempfile, it appears that you need the following extra line

set newname for tempfile 1 to '/a01/o/DUP/temp.dbf';

Otherwise you will get this error message:

RMAN-05517: temporary file /a01/o/DUP/temp_01.dbf conflicts with file used by target database

So, I can duplicate the database without error until you need to access the tempfile. So if the added functionality for tempfiles is now included it seems strange that you still need to drop and recreate the tempfile?

Eric de Redelijkheid wrote:

> Anno Domini 2-11-2005 5:50, Snewber sprak aldus:
>

>> I can duplicate the database without error, but the tempfile(s) are
>> not setup correctly. For example, when I run the following query, on
>> the newly duplicated database, I get the following error:
>>
>> select * from dba_temp_files ;
>> ORA-01187: cannot read from file 151 because it failed verification tests
>> ORA-01110: data file 151: '/a01/oradata/DUP/temp_01.dbf'
>>
>> So I need to drop the tempfile and then add it again. Is there a
>> better way of doing this with RMAN in the latest 10gR2 version?
>>
>> I'm using the following RMAN commnads:
>>
>> # target and auxilary connections are set up prior to here
>> run {
>> set until time = '02-NOV-2005 10:26:36';
>> set newname for tempfile 1 to '/a01/o/DUP/temp.dbf';
>> set newname for datafile 1 to '/a01/o/DUP/system.dbf';
>> set newname for datafile 2 to '/a01/o/DUP/undo.dbf';
>> set newname for datafile 3 to '/a01/o/DUP/sysaux.dbf';
>> duplicate target database to DUP
>> LOGFILE
>> GROUP 1 ('/a04/oradata/DUP/redo_01a.log') SIZE 100M,
>> GROUP 2 ('/a04/oradata/DUP/redo_02a.log') SIZE 100M;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/90618/viewspace-669957/,如需轉載,請註明出處,否則將追究法律責任。

相關文章