Repair data block corruption in Oracle

Source: Internet
Author: User

1. Create a tablespace for the experiment.

Create tablespace block datafile size 1 M extent management local;-because it is 11 GB, AMS is used.

Alter user ff default tablespace block;

Alter user ff quota unlimited on block;

2. corrupt data files

Close the database, use the editor to modify a few characters, and then start the database.

An error occurs when access to the damaged block.

3. Use dbv to check the data file.

Dbv file = block. dbf blocksize = 8192

Assume that 35th blocks are damaged.

4. Recovery steps

① Select tablespace_name, segment_type, owner, segment_name from dba_extents where file_id = 4 and 35 between block_id and block_id + blocks-1;

If data is lost, OK

Set internal events and skip damaged data blocks during full table scan.

Alter system set events = '10231 trace name context forever, level 10 ′;

Then, you can use exp and imp for import and export and recovery. However, this leads to data loss in dependent blocks.

  • 1
  • 2
  • Next Page

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.