How to recover a READONLY tablespace backups made before a RESETLOGS in a new
incarnation:
* Backups of a tablespace made after it was made read-only
(only if it was not made read/write again before the RESETLOGS)
This is a inhouse tested scenario
Here are the steps :
STEPS
-----
SQL> select name,status,checkpoint_change# from v$datafile;
NAME STATUS CHECKPOINT_CHANGE#
---------------------------------------- ------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM 766796
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE 423736 --> THIS IS THE READ ONLY TABLESPACE
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE 766864
9 rows selected.
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY
JAGU ONLINE
9 rows selected.
SQL> shutdown abort
ORACLE instance shut down.
----------ASSUME THERE WAS A DATABASE CRASH --------------------
A few assumptions in this case
------------------------
++ Having Restored all the datafile except the read only
++ NOT RESTORED THE readonly tablespace datafile yet
++ Trying to do the incomplete recovery
SQL> startup mount
ORACLE instance started.
Total System Global Area 187987996 bytes
Fixed Size 75804 bytes
Variable Size 67436544 bytes
Database Buffers 120397824 bytes
Redo Buffers 77824 bytes
Database mounted.
SQL> recover database until cancel ;
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: 'D:\ORACLE\ORADATA\AMAR\TEST01.DBF'
Reason for this error
-----------------------
++ As this file is missing .
++ SO EITHER we HAVE to RESTORE FROM BACKUP or OFFLINE DROP THIS FILE
++ Now have dropped the datafile 8
SQL> alter database datafile 8 offline drop;
Database altered.
SQL> select name,status from v$datafile_header;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
OFFLINE - in datafile header entry is there
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select FILE# from v$recover_file;
FILE#
----------
8 FILE NEEDS ReCOVERY
+++ DONE a INCOMPLETE Recovery
SQL> recover database until cancel
cancel
SQL> alter database open resetlogs;
Database altered.
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS') from v$database
2 ;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
AMAR 01-MAR-2004 01:07::18
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS')
2 from v$datafile_header;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\DR01.DBF 01-MAR-2004 01:07::18
MISSING FOR DATAFILE 8
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 01-MAR-2004 01:07::18
9 rows selected.
SQL> select file# from v$recover_file;
FILE#
----------
8 - Still showing needs recovery after RESETLOGS
++ If this file was lost in the crash we will need to restore the same from the backup taken after it was made READ ONLY
SQL> recover datafile 8;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
Reasons for the errors seen
---------------------------
++ As this is a READ ONLY TS it does not need media recovery
++ We cant take the datafile online directly
SQL> alter database datafile 8 online;
alter database datafile 8 online
*
ERROR at line 1:
ORA-01190: controlfile or data file 8 is from before the last RESETLOGS
ORA-01110: data file 8: 'D:\ORACLE\ORADATA\AMAR\TEST01.DBF'
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY -READONLY After RESETLOGS
JAGU ONLINE
9 rows selected.
SQL> select name,status from v$datafile;
clsNAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF OFFLINE -- as we have offline drop this file
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select name,status from v$datafile_header;
clsNAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
OFFLINE -- as we have offline drop this file
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
+++ TRYing to take the READ ONLY tablespace ONLINE
SQL> alter tablespace test online;
Tablespace altered.
SQL> select name,status from v$datafile;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE -File is online
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select name,status from v$datafile_header;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE - FIle is online
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY -- Still in Read only after resetlogs and is accessible in the database.
JAGU ONLINE
9 rows selected.
SQL> select name,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
---------------------------------------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 766872
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 766872
D:\ORACLE\ORADATA\AMAR\DR01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 423736 -- its the same SCN as we started with
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 766872
9 rows selected.
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS')
2 from v$datafile_header;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\DR01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 10-NOV-2003 01:12::26 -- Showing the LAST RESETLOGS date
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 01-MAR-2004 01:07::18
9 rows selected.
SQL> alter tablespace test read write;
Tablespace altered.
SQL> select name,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
---------------------------------------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 766872
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 766872
D:\ORACLE\ORADATA\AMAR\DR01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 766928 -Sync with the other files
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 766872
9 rows selected.
Now the Readonly tablespace before the incarnation is a part of the database.
incarnation:
* Backups of a tablespace made after it was made read-only
(only if it was not made read/write again before the RESETLOGS)
This is a inhouse tested scenario
Here are the steps :
STEPS
-----
SQL> select name,status,checkpoint_change# from v$datafile;
NAME STATUS CHECKPOINT_CHANGE#
---------------------------------------- ------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM 766796
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE 766796
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE 423736 --> THIS IS THE READ ONLY TABLESPACE
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE 766864
9 rows selected.
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY
JAGU ONLINE
9 rows selected.
SQL> shutdown abort
ORACLE instance shut down.
----------ASSUME THERE WAS A DATABASE CRASH --------------------
A few assumptions in this case
------------------------
++ Having Restored all the datafile except the read only
++ NOT RESTORED THE readonly tablespace datafile yet
++ Trying to do the incomplete recovery
SQL> startup mount
ORACLE instance started.
Total System Global Area 187987996 bytes
Fixed Size 75804 bytes
Variable Size 67436544 bytes
Database Buffers 120397824 bytes
Redo Buffers 77824 bytes
Database mounted.
SQL> recover database until cancel ;
ORA-00283: recovery session canceled due to errors
ORA-01157: cannot identify/lock data file 8 - see DBWR trace file
ORA-01110: data file 8: 'D:\ORACLE\ORADATA\AMAR\TEST01.DBF'
Reason for this error
-----------------------
++ As this file is missing .
++ SO EITHER we HAVE to RESTORE FROM BACKUP or OFFLINE DROP THIS FILE
++ Now have dropped the datafile 8
SQL> alter database datafile 8 offline drop;
Database altered.
SQL> select name,status from v$datafile_header;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
OFFLINE - in datafile header entry is there
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select FILE# from v$recover_file;
FILE#
----------
8 FILE NEEDS ReCOVERY
+++ DONE a INCOMPLETE Recovery
SQL> recover database until cancel
cancel
SQL> alter database open resetlogs;
Database altered.
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS') from v$database
2 ;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
AMAR 01-MAR-2004 01:07::18
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS')
2 from v$datafile_header;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\DR01.DBF 01-MAR-2004 01:07::18
MISSING FOR DATAFILE 8
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 01-MAR-2004 01:07::18
9 rows selected.
SQL> select file# from v$recover_file;
FILE#
----------
8 - Still showing needs recovery after RESETLOGS
++ If this file was lost in the crash we will need to restore the same from the backup taken after it was made READ ONLY
SQL> recover datafile 8;
ORA-00283: recovery session canceled due to errors
ORA-00264: no recovery required
Reasons for the errors seen
---------------------------
++ As this is a READ ONLY TS it does not need media recovery
++ We cant take the datafile online directly
SQL> alter database datafile 8 online;
alter database datafile 8 online
*
ERROR at line 1:
ORA-01190: controlfile or data file 8 is from before the last RESETLOGS
ORA-01110: data file 8: 'D:\ORACLE\ORADATA\AMAR\TEST01.DBF'
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY -READONLY After RESETLOGS
JAGU ONLINE
9 rows selected.
SQL> select name,status from v$datafile;
clsNAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF OFFLINE -- as we have offline drop this file
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select name,status from v$datafile_header;
clsNAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
OFFLINE -- as we have offline drop this file
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
+++ TRYing to take the READ ONLY tablespace ONLINE
SQL> alter tablespace test online;
Tablespace altered.
SQL> select name,status from v$datafile;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF SYSTEM
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE -File is online
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select name,status from v$datafile_header;
NAME STATUS
---------------------------------------- -------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\RBS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\USERS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\INDX01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\DR01.DBF ONLINE
D:\ORACLE\ORADATA\AMAR\TEST01.DBF ONLINE - FIle is online
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF ONLINE
9 rows selected.
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
RBS ONLINE
USERS ONLINE
TEMP ONLINE
TOOLS ONLINE
INDX ONLINE
DRSYS ONLINE
TEST READ ONLY -- Still in Read only after resetlogs and is accessible in the database.
JAGU ONLINE
9 rows selected.
SQL> select name,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
---------------------------------------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 766872
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 766872
D:\ORACLE\ORADATA\AMAR\DR01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 423736 -- its the same SCN as we started with
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 766872
9 rows selected.
SQL> select name,to_char(RESETLOGS_TIME,'DD-MON-YYYY HH:MI::SS')
2 from v$datafile_header;
NAME TO_CHAR(RESETLOGS_TIM
---------------------------------------- ---------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\DR01.DBF 01-MAR-2004 01:07::18
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 10-NOV-2003 01:12::26 -- Showing the LAST RESETLOGS date
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 01-MAR-2004 01:07::18
9 rows selected.
SQL> alter tablespace test read write;
Tablespace altered.
SQL> select name,checkpoint_change# from v$datafile_header;
NAME CHECKPOINT_CHANGE#
---------------------------------------- ------------------
D:\ORACLE\ORADATA\AMAR\SYSTEM01.DBF 766872
D:\ORACLE\ORADATA\AMAR\RBS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\USERS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEMP01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TOOLS01.DBF 766872
D:\ORACLE\ORADATA\AMAR\INDX01.DBF 766872
D:\ORACLE\ORADATA\AMAR\DR01.DBF 766872
D:\ORACLE\ORADATA\AMAR\TEST01.DBF 766928 -Sync with the other files
D:\ORACLE\ORADATA\AMAR\JAGU01.DBF 766872
9 rows selected.
Now the Readonly tablespace before the incarnation is a part of the database.
No comments:
Post a Comment