Maximum Analysis of ORACLE Redo logfile files

Source: Internet
Author: User

During the Asktom and Eygle Shanghai discussion at ORACLE, eygle proposed: "What is the maximum size of ORACLE Redo logfile ". This issue is rarely noticed. Because redo logfile is used cyclically, there is no need to configure a large number of logs. You only need to have the appropriate number of log groups and the size of log files. Due to rowid restrictions, ORACLE uses 22 Bits of ROWID to represent the block number. Therefore, a data file can contain a maximum of 4194304 power (2, 22) = blocks. Www.2cto.com: for a 4 k block, the maximum size of a single data file is power (2, 22) * 4 k = 16G. For 8 k blocks, the maximum size of a single data file is power () * 8 k = 32G. For a 16 k block, the maximum size of a single data file is power () * 8 k = 64G. For a 32 k block, the maximum size of a single data file is power (128) * 8 k = GB. The large file tablespace introduced by ORACLE uses 32 bits to represent the BLOCK number. The maximum size of a single data file can be 128 TB. How big can redo logfile be? We can also infer using the same method: in ORACLE, RBA is used to represent the physical location of the redo log file. In alert logfile, we often see the following RBA information: Thread 1 advanced to log sequence 20 (LGWR switch) Current log #10 seq #20 mem #0: /cpic/cpicredo_u01/cpic/redo10a. log Current log #10 seq #20 mem #1:/cpic/cpicundo_u01/cpic/redo10b. logFri Mar 30 09:06:45 2012 Completed checkpoint up to RBA [0x14. 2.10], SCN: 9064462393884Fri Mar 30 09:21:36 2012 Incremental checkpoint up to RBA [0x14. 1e5. 0], current log tail at RBA [0x14. 1f3. 0] RBA information consists of three parts: Four-byte Log file serial number (log sequence number) Four-byte BLOCK number (Block number within Log file) the offset of two bytes (Byte offset within block) RBA information is expressed in hexadecimal notation: RBA [0x14. 1e5. 0] indicates the position: the log serial number is 20, the block number is 485, And the offset is 0. Since ORACLE uses four bytes to represent the block number in the redo log file, the maximum block number of a log file is power) = 4294967296 the block size of the log file www.2cto.com can be queried using the following method: SQL> select distinct block_size from v $ archived_log; BLOCK_SIZE ---------- 512 or [oracle @ sxffdb1 ~] $ Dbfsize/cpic/cpicredo_u01/cpic/redo10a. log Database file:/cpic/cpicredo_u01/cpic/redo10a. logDatabase file type: file systemDatabase file size: 2097152 512 byte blocks From the above we can see the maximum size of a single log file: 4294967296*512/1024/1024/1024 = 2048 (G) is 2 T. Author: TOMSYAN

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.