Hi, I'm trying to duplicate a database as part of a R12.1.3 EBS cloning process, it's still on 11.1.0.7 (Linux x86-64), and the plan is to upgrade within a year to R12.2.x, and 19c.
The problem I'm facing is that the duplicate runs, and seems to be restoring the files:
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 16-JUN-2020 18:39:27
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2380 device type=DISK
channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00045 to /db02/oradata/TEST/a_txn_data14.dbf
channel ORA_AUX_DISK_1: restoring datafile 00055 to /db01/oradata/TEST/sysaux05.dbf
channel ORA_AUX_DISK_1: restoring datafile 00392 to /db01/oradata/TEST/a_txn_data01.dbf
channel ORA_AUX_DISK_1: restoring datafile 00406 to /db00/oradata/TEST/a_txn_ind05.dbf
channel ORA_AUX_DISK_1: reading from backup piece /u06/hotbkp/PROD/past/DB_g7v23huv_1_1.rman
However, if I list the database directories, I see this:
$ ls -lh /db0?/oradata/TEST
/db00/oradata/TEST:
total 30G
-rw-r----- 1 oracle dba 32G Jun 16 19:30 a_txn_data14.dbf
-rw-r----- 1 oracle dba 32G Jun 16 19:30 a_txn_ind05.dbf
/db01/oradata/TEST:
total 30G
drwxr-xr-x 2 oracle dba 4.0K Jun 11 21:56 archive
-rw-r----- 1 oracle dba 32G Jun 16 19:30 a_txn_data01.dbf
-rw-r----- 1 oracle dba 32G Jun 16 19:30 sysaux05.dbf
/db02/oradata/TEST:
total 30G
-rw-r----- 1 oracle dba 32G Jun 16 19:30 a_txn_data14.dbf
-rw-r----- 1 oracle dba 32G Jun 16 19:30 a_txn_ind05.dbf
As you can see, some files are being "duplicated" on other directories; the source database does not have files with the same name in different directories. This is the second time this is happening, in the first DUPLICATE attempt I specified DB_FILE_NAME_CONVERT in the command. This time, explicitly assigned paths to the datafiles using SET NEWNAME for datafiles and tempfiles, in the same run block as the DUPLICATE command.
That first duplicate completed succesfully, and I was able to startup/shutdown the database, when I listed the datafiles, there were no duplicates:
SQL> select file#, name, status, bytes/1048576 "Mb"
2 from v$datafile
3 where name like '%ind09%';
FILE# NAME STATUS Mb
---------- -------------------------------------------------- ------- ----------
35 /db00/oradata/TEST/a_txn_ind09.dbf ONLINE 32767.9844
But, in the OS:
# ls -lh /db0?/oradata/TEST/a_txn_ind09.dbf
-rw-r----- 1 oracle dba 32G Jun 13 16:42 /db00/oradata/TEST/a_txn_ind09.dbf
-rw-r----- 1 oracle dba 32G Jun 13 16:42 /db02/oradata/TEST/a_txn_ind09.dbf
I shutdown the db, and renamed the file in /db02:
# cd /db02/oradata/TEST
# mv a_txn_ind09.dbf a_txn_ind09.not
# ls -lh a_txn_ind09*
-rw-r----- 1 oracle dba 32G Jun 13 16:56 a_txn_ind09.not
When I restarted the db:
SQL> startup
ORACLE instance started.
Total System Global Area 1.6034E+10 bytes
Fixed Size 2165888 bytes
Variable Size 2415920000 bytes
Database Buffers 1.3556E+10 bytes
Redo Buffers 60137472 bytes
Database mounted.
ORA-01157: cannot identify/lock data file 35 - see DBWR trace file
ORA-01110: data file 35: '/db00/oradata/TEST/a_txn_ind09.dbf'
The same occurred when If I renamed the file in /db00.
I'd appreciate if anybody could shed some light on this. I doesn´t happen with every file, only with some.
Thanks!
Hiroshi Komatsu