Oracle block upt Bad blocks

Source: Internet
Author: User

Oracle block upt Bad blocks

In general, Oracle's Bad blocks can be divided into two scenarios: physical damage and logical damage. The physical damage is caused by storage and other reasons. As a result, Oracle finds that the checksum of the block is inconsistent when processing the data block. Most of the logical damages are caused by Oracle bugs or memory errors. By checking the checksum of data blocks, no problems are found, but these blocks are logically damaged.

Oracle uses two parameters to control the detection of physical and logical damages:

SQL> show parameter db_block_check

NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_block_checking string FALSE
Db_block_checksum string TRUE

Db_block_checking checks the logical integrity and Correctness When the block changes. This parameter can avoid corruption of data blocks in the memory. The check of the block will affect the system performance from 1% to 10%. Depends on the settings of the db_block_checking parameter. Frequent DML results in more overhead for block checks. We recommend that you set it to full when the system load permits. This parameter is always in the "open" status for the SYSTEM tablespace, regardless of whether the parameter is set to OFF. The following is a reference for setting this parameter. FALSE and TRUE are used for compatibility with earlier versions.

Property Description

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

Parameter type String

Syntax DB_BLOCK_CHECKING = {FALSE | OFF | LOW | MEDIUM | TRUE | FULL} --> OFF (= FALSE), FULL (= TRUE)

Defaultvalue FALSE

Modifiable ALTER SYSTEM

Basic No

Note that db_block_checking works only when data blocks are modified. For example

SQL> show parameter db_block_check

NAME TYPE VALUE
-----------------------------------------------------------------------------
Db_block_checking string FALSE
Db_block_checksum string TRUE
SQL> alter system flush buffer_cache;

System altered.

SQL> select * from scott. s2; // No problem during Query

T1 T2
------------------------------
51809 lllll
51888 SC
51574 PK_DEPT
51573 DEPT
1575EMP, 5
51576 PK_EMP
51578 SALGRADE

7 rows selected.

SQL> update scott. s2 set t2 = 'aaa' where t1 = '000000'; // No problem with Modification

1 row updated.

SQL> commit;

Commit complete.

SQL> alter system flush buffer_cache;

System altered.

SQL> alter system set db_block_checking = true;

System altered.

SQL> select * from scott. s2; // the query is correct.

T1 T2
------------------------------
51809 aaaa
51888 SC
51574 PK_DEPT
51573 DEPT
1575EMP, 5
51576 PK_EMP
51578 SALGRADE

7 rows selected.

SQL> update scott. s2 set t2 = 'bbbbbb' where t1 = '000000'; // logic detection is triggered when the modification is made.
Update scott. s2 set t2 = 'bbbbbb' where t1 = '201312'
*
ERROR at line 1:
ORA-00607: Internal error occurred while making a change to a data block
ORA-00600: internal error code, arguments: [kddummy_blkchk], [5], [20], [6113],
[], [], [], []


SQL> select * from scott. s2; // after a logical error is found, oracle marks the block as a bad block. In this case, the data block cannot be accessed.
Select * from scott. s2
*
ERROR at line 1:
ORA-01578: ORACLE data block upted (file #5, block #20)
ORA-01110: data file 5: '/home/app/oraten/oradata/oraten/tbs201.dbf'

When db_block_checksum is used for writing data blocks of DBWn and direct loader to a disk, a check value is calculated based on all bytes in the block and written into the block header. When this parameter is set to typical and full, the verification comparison is re-calculated during the read and write operations. If they are different, the block is damaged. If it is set to FULL mode, the check value will be recalculated and written after the update/delete application statement-level change occurs. At the same time, before writing a log block, the verification value is also generated and written to the block header. This parameter mainly prevents errors in I/O hardware and I/O subsystems. If it is set to OFF, it is only valid for the system tablespace. The following is a reference for setting this parameter. FALSE and TRUE are used for compatibility with earlier versions.

Property Description

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

Parameter type String

Syntax DB_BLOCK_CHECKSUM = {OFF | FALSE | TYPICAL | TRUE | FULL} --> OFF (= FALSE), FULL (= TRUE)

Defaultvalue TYPICAL

Modifiable alter session, ALTER SYSTEM

Basic No

For performance differences, when the two block parameters are set to true, more CPU resources are required to generate the check value and verify the memory block. At the same time, this operation may increase the hold time of redo copy latch and cause competition of this latch. Regardless of the values of db_block_checking and db_block_checksum, the SYSTEM tablespace performs checking and checksum. You can use the implicit parameter _ db_always_check_system_ts to set it to FALSE, but to ensure the data security of the SYSTEM tablespace, we do not recommend that you set this implicit parameter value to FALSE.

Oracle 11g installation manual on RedHat Linux 5.8 _ x64 Platform

Installing Oracle 12C in Linux-6-64

Install Oracle 11gR2 (x64) in CentOS 6.4)

Steps for installing Oracle 11gR2 in vmwarevm

Install Oracle 11g XE R2 In Debian

For more details, please continue to read the highlights on the next page:

  • 1
  • 2
  • Next Page

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.