Oracle Manual Full Recovery (iii) Recovery of table space

Source: Internet
Author: User

Case 2:recover tablespace (recover tablespace (delete all datafile of tablespace))

When you delete a data file in Guanqu state, this restores: Dumps the datafile, makes the missing datafile offline, recover tablespace

(1) Simulation environment

Sql> Conn Scott/tiger

Connected.

Sql> Col tname for A30

Sql> select * from tab;

Tname Tabtype Clusterid

------------------------------ --------------------- ----------

DEPT TABLE

EMP TABLE

BONUS TABLE

Salgrade TABLE

EMP1 TABLE

Admin_ext_employees TABLE

EMPLOYEES TABLE

EMP2 TABLE

TB01 TABLE

9 rows selected.

Sql> select * from TB01;

Id

----------

1

2

3

sql> INSERT INTO TB01 values (4);

1 row created.

sql> INSERT into TB01 values (5);

1 row created.

sql> INSERT INTO TB01 values (6);

1 row created.

Sql> commit;

Commit complete.

Sql> select * from TB01;

Id

----------

1

2

3

4

5

6

6 rows selected.

sql> shutdown abort;

ORACLE instance shut down.

Sql>!

[ORACLE@SOLARIS10 ~] $rm/u01/app/oracle/oradata/anny/test*.dbf--Delete data file in Guanqu state

(2) Start the database

Sql> Startup

ORACLE instance started.

Total System Global area 314572800 bytes

Fixed Size 1279964 bytes

Variable Size 58722340 bytes

Database buffers 251658240 bytes

Redo buffers 2912256 bytes

Database mounted.

Ora-01157:cannot identify/lock data file 5-see DBWR trace file

Ora-01110:data file 5: '/U01/APP/ORACLE/ORADATA/ANNY/TEST01.DBF '

Sql> select File#,error from V$recover_file;

file# ERROR

---------- -----------------------------------------------------------------

5 FILE not FOUND

One FILE not FOUND

(3) Dump data files

[Oracle@solaris10 Cold_bak] $CP/disk1/backup/anny/cold_bak/test*.dbf/u01/app/oracle/oradata/anny/

(4) Data file offline

This article URL address: http://www.bianceng.cn/database/Oracle/201410/45393.htm

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.