Oracle Incomplete recovery based on user Management (v) deleting tablespaces incorrectly

Source: Internet
Author: User
Tags commit backup

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);

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.