Datafile cannot be open by either non cdb or cdb instance [message #681113] |
Tue, 16 June 2020 17:14 |
|
juniordbanewbie
Messages: 250 Registered: April 2014
|
Senior Member |
|
|
Dear all,
I'm using method similar to https://oracle-base.com/articles/19c/upgrading-to-19c#convert-non-cdb-to-pdb
to upgrade my customer database and perform non cdb to pdb conversion later.
I try to create a pluggable database using xml
but it fails after not enough disk space
SYS@camden-ora06 bicdb>CREATE PLUGGABLE DATABASE &&2 USING '&3'
2 MOVE
3 FILE_NAME_CONVERT=('&4','&5'
4 ,'&6','&7');
old 1: CREATE PLUGGABLE DATABASE &&2 USING '&3'
new 1: CREATE PLUGGABLE DATABASE biorcl USING 'K:\db_upgrade\database\scripts\dbms_pdb\describe\log\camden-ora06_biorcl_describe_20200615_195914.xml'
old 3: FILE_NAME_CONVERT=('&4','&5'
new 3: FILE_NAME_CONVERT=('D:\app\oracle\oradata\biorcl','D:\app\oracle\oradata\bicdb\biorcl'
old 4: ,'&6','&7')
new 4: ,'J:\app\oracle\oradata\biorcl','J:\app\oracle\oradata\bicdb\biorcl')
next I do the following, resolve disk issue and drop the pluggable database (did not drop database files), and move the datafiles files, create the pluggable database again
CREATE PLUGGABLE DATABASE biorcl USING 'K:\db_upgrade\database\scripts\dbms_pdb\describe\log\camden-ora06_biorcl_describe_20200615_195914.xml'
*
ERROR at line 1:
ORA-65139: Mismatch between XML metadata file and data file
D:\APP\ORACLE\ORADATA\biorcl\SYSTEM01.DBF for value of cid (0 in the plug XML
file, 3 in the data file)
it fail again,
so I decide to start the non cdb instance and check whether i can be read or not
it fails
from alert_biorcl.log
ALTER DATABASE OPEN
2020-06-16T02:29:29.462767-04:00
Errors in file E:\APP\ORACLE\diag\rdbms\biorcl\biorcl\trace\biorcl_mz00_11760.trc:
ORA-01110: data file 1: 'D:\APP\ORACLE\ORADATA\biorcl\SYSTEM01.DBF'
ORA-01204: file number is 8 rather than 1 - wrong file
Ping without log force is disabled:
instance mounted in exclusive mode.
Read of datafile 'D:\APP\ORACLE\ORADATA\biorcl\SYSTEM01.DBF' (fno 1) header failed with ORA-01204
Rereading datafile 1 header failed with ORA-01204
2020-06-16T02:29:29.587830-04:00
Errors in file E:\APP\ORACLE\diag\rdbms\biorcl\biorcl\trace\biorcl_ora_12232.trc:
it quite obvious that the datafile header has its number renamed during the plug in operations.
so how can i make the datafile back to its original number again?
On one note here I should just resolve the disk issues and copy the tempfiles and do non cdb to pdb conversion. who knows it might work.
many thanks in advance.
|
|
|
|
|
|
Re: Datafile cannot be open by either non cdb or cdb instance [message #681120 is a reply to message #681119] |
Wed, 17 June 2020 04:16 |
|
juniordbanewbie
Messages: 250 Registered: April 2014
|
Senior Member |
|
|
Dear John,
I did not think of upgrading by applying the archivelog until you mentioned it, I more concern about restoring up the the point before unplugging the non cdb, but it most likely case, I can only restore up to before the upgrade.
It's probably too optimistic to think that I can recover up to the point of just before the datafiles are being moved.
It brings me to a point, the need to backup the database after the upgrade, otherwise every thing will be lost.
many thanks
|
|
|