How to force tempfile reuse when duplicating database [message #474988] |
Fri, 10 September 2010 11:10 |
metabaron
Messages: 13 Registered: September 2010
|
Junior Member |
|
|
Hi all
I can successfully duplicate a database(10gr2) when there is no already existing 'auxiliary' tempfile. Tempfile is created and available.
RMAN>RUN
{
SET NEWNAME FOR DATAFILE 1 TO '/db2/dbs/system01.dbf';
...
SET NEWNAME FOR TEMPFILE 1 TO '/db2/dbs/temp01.dbf';
DUPLICATE TARGET DATABASE TO db2;
}
But if I duplicate without deleting the tempfile, database is successfully created, but tempfile is not available:
SQL> select * from dba_temp_files ;
select * from dba_temp_files
*
ERREUR à la ligne 1 :
ORA-01187: impossible de lire le fichier 201 car les tests de vérification ont échoué
ORA-01110: fichier de données 201 : '/db2/dbs/temp01.dbf'
I have read that locally managed tempfile should be manually recreated after a duplicate. But as duplicate is able to create tempfile if there is no already existing one when duplicating to a new database, is there a way to force a 'REUSE' if tempfile already exist when refreshing?
Tanks for help
|
|
|
|
Re: How to force tempfile reuse when duplicating database [message #475139 is a reply to message #474990] |
Mon, 13 September 2010 05:01 |
metabaron
Messages: 13 Registered: September 2010
|
Junior Member |
|
|
I tried with DB_FILE_NAME_CONVERT but it's the same behaviours than "set newname": if tempfile does not exist it's successfully created. But if it already exist, it's not reused: there is a ORA-01187.
Sure i could drop the database before, I also have some other alternative solutions, but I was really curious to know if it was a bug or if this was a wanted behaviour of not reusing existing tempfile.
|
|
|
|
|