ORA-01110: data file 1: '+DATA/demodb/datafile/system.296.726853295'
ORA-01206: file is not part of this database - wrong database id
Reason:
RMAN Duplicate command updates source database, datafile headers.
Solution:
Restore and Recover the database with RMAN Backup.
to avoid this error add the following entries in pfile(clone/duplicate database)
db_file_name_convert='+DATA/DEMODB/DATAFILE/','/u01/app/oracle/oradata/dupdb/'
log_file_name_convert='+DATA/DEMODB/ONLINELOG/','/u01/app/oracle/oradata/dupdb/'
or set new name command in rman script.
[oracle@rac2 ~]$ . oraenv
ORACLE_SID = [+ASM2] ? demodb
[oracle@rac2 ~]$ rlsqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Aug 21 14:32:31 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters and OLAP options
SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '+DATA/demodb/datafile/system.296.726853295'
ORA-01206: file is not part of this database - wrong database id
oracle@rac2 backup]$ . oraenv
ORACLE_SID = [demodb] ? demodb
[oracle@rac2 backup]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Sat Aug 21 14:34:47 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: DEMODB (DBID=3723121283, not open)
RMAN> restore database
2> ;
Starting restore at 21-AUG-10
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=154 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 +DATA/demodb/datafile/system.296.726853295
restoring datafile 00002 to +DATA/demodb/datafile/undotbs1.298.726853331
restoring datafile 00003 to +DATA/demodb/datafile/sysaux.297.726853315
restoring datafile 00004 to +DATA/demodb/datafile/users.299.726853339
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/backup/DEMODB_02ll6n2k_1_1.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u01/app/oracle/backup/DEMODB_02ll6n2k_1_1.bkp tag=TAG20100813T000329
channel ORA_DISK_1: restore complete, elapsed time: 00:02:38
Finished restore at 21-AUG-10
RMAN> recover database;
Starting recover at 21-AUG-10
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 3 is already on disk as file +DATA/demodb/archivelog/2010_08_13/thread_1_seq_3.311.726883477
archive log thread 1 sequence 4 is already on disk as file +DATA/demodb/archivelog/2010_08_13/thread_1_seq_4.312.726885007
archive log thread 1 sequence 5 is already on disk as file +DATA/demodb/archivelog/2010_08_13/thread_1_seq_5.313.726940211
archive log thread 1 sequence 6 is already on disk as file +DATA/demodb/archivelog/2010_08_13/thread_1_seq_6.314.726940893
archive log thread 1 sequence 7 is already on disk as file +DATA/demodb/archivelog/2010_08_13/thread_1_seq_7.315.726940901
archive log filename=+DATA/demodb/archivelog/2010_08_13/thread_1_seq_3.311.726883477 thread=1 sequence=3
archive log filename=+DATA/demodb/archivelog/2010_08_13/thread_1_seq_4.312.726885007 thread=1 sequence=4
archive log filename=+DATA/demodb/archivelog/2010_08_13/thread_1_seq_5.313.726940211 thread=1 sequence=5
media recovery complete, elapsed time: 00:00:39
Finished recover at 21-AUG-10
RMAN> exit
Recovery Manager complete.
[oracle@rac2 backup]$ . oraenv
ORACLE_SID = [demodb] ?
[oracle@rac2 backup]$ rlsqlplus
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Aug 21 14:44:48 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters and OLAP options
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01139: RESETLOGS option only valid after an incomplete database recovery
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 7
Next log sequence to archive 9
Current log sequence 9
SQL> select name from v$datafile;
NAME
--------------------------------------------------------------------------------
+DATA/demodb/datafile/system.296.726853295
+DATA/demodb/datafile/undotbs1.298.726853331
+DATA/demodb/datafile/sysaux.297.726853315
+DATA/demodb/datafile/users.299.726853339
SQL>
No comments:
Post a Comment