Case 4--Delete tablespace (with backup)
Recover the Tablespace-related information by backing up the control file because there is no information about the tablespace in the new control file. In fact, the archive log is used for recovery throughout the recovery process, and if the operation before the delete Tablespace is written to the archived information in a timely manner, it will be fully recovered. The following cases are divided between the switch log and the not switch log.
1. Incomplete recovery based on backup control
Sql> select File_id,file_name,tablespace_name from Dba_data_files;
file_id file_name Tablespace_name
---------- -------------------------------------------------- -----------------------
5/U01/APP/ORACLE/ORADATA/ANNY/TEXT01.DBF TEXT
4/U01/APP/ORACLE/ORADATA/ANNY/USER01.DBF USERS
3/U01/APP/ORACLE/ORADATA/ANNY/SYSAUX01.DBF Sysaux
2/U01/APP/ORACLE/ORADATA/ANNY/LX02.DBF LX02
1/U01/APP/ORACLE/ORADATA/ANNY/SYSTEM01.DBF SYSTEM
6/U01/APP/ORACLE/ORADATA/ANNY/LX01.DBF LX01
7/U01/APP/ORACLE/ORADATA/ANNY/UNDOTBS01.DBF Undotbs
8/U01/APP/ORACLE/ORADATA/ANNY/LX03.DBF LX03
9/U01/APP/ORACLE/ORADATA/ANNY/LX04.DBF LX04
10/U01/APP/ORACLE/ORADATA/ANNY/INDEX01.DBF INDEXES
Ten rows selected.
Sql> Conn Scott/tiger
Sql> select Table_name,tablespace_name from User_tables;
TABLE_NAME Tablespace_name
------------------------------ ---------------
DEPT USERS
EMP USERS
BONUS USERS
Salgrade USERS
EMPLOYEES USERS
EMP2 USERS
TB01 TEXT
Admin_ext_employees
EMP1 USERS
9 rows selected.
Sql> select * from TB01;
Id
----------
1
2
3
sql> INSERT INTO TB01 select * from TB01;
3 rows created.
Sql> select * from TB01;
Id
----------
1
2
3
1
2
3
6 rows selected.
Sql> commit;
Commit complete.
--Generate Control file backup
Sql> Conn/as SYSDBA
Connected.
sql> ALTER DATABASE backup Controlfile to '/disk1/backup/anny/anny_control.bak ';
Database altered.
--Do not switch logs
sql> INSERT INTO SCOTT.TB01 values (4);