Oracle Rman Full Recovery case (iii) Table space data files are all missing

Source: Internet
Author: User
Tags commit

Case 3:

--All of the table space data files are lost, restore data files (open)

1) test environment

07:37:23 sql> INSERT INTO scott.test values (6);

1 row created.

07:39:18 sql> INSERT INTO scott.test values (7);

1 row created.

07:39:20 sql> INSERT INTO scott.test values (8);

1 row created.

07:39:21 sql> commit;

Commit complete.

07:39:23 sql> SELECT * from Scott.test;

Id

----------

6

7

8

1

2

3

4

5

8 rows selected.

07:40:06 sql>

----datafile is corrupted in open state

[Oracle@work ~]$ rm/u01/app/oracle/oradata/prod/test0*.dbf

[Oracle@work ~]$

07:41:19 sql> alter system flush Buffer_cache;

System altered.

07:41:25 sql> Conn Scott/tiger

Connected.

07:41:28 sql>

This column more highlights: http://www.bianceng.cn/database/Oracle/

07:41:28 sql> INSERT INTO scott.test values (10);

INSERT into scott.test values (10)

*

ERROR at line 1:

Ora-01116:error in opening database file 8

Ora-01110:data file 8: '/U01/APP/ORACLE/ORADATA/PROD/TEST02.DBF '

Ora-27041:unable to open File

Linux error:2: No such file or directory

Additional Information:3

07:41:31 sql>

2) Recovery using Rman

Rman> Run {

2> SQL ' ALTER DATABASE datafile 6,8 offline ';

3> Restore datafile 6, 8;

4> Recover datafile 6, 8;

5> SQL ' ALTER DATABASE datafile 6,8 online ';

6>}

3) Verify

07:41:31 sql> INSERT INTO scott.test values (10);

1 row created.

07:45:58 sql> commit;

Commit complete.

07:46:01 sql> SELECT * from test;

Id

----------

10

6

7

8

9

1

2

3

4

5

Ten rows selected.

07:46:04 sql>

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.