Data files in the storage structure and oracle storage structures in the tablespace can be divided into physical and logical structures. The latter is born to facilitate management of the former.
Oracle stores data in tablespaces logically and physically in data files. Www.2cto.com has two views, which we may often use: dba_data_files: information about the data file dba_tablespaces: information about the tablespace. Here we will talk about three questions first. Tablespace type? 1) Permanent tablespaces, such as system, sysaux, and user, are used to store data for non-core functions. For example, the OEM can check the data for non-core functions: select occupant_name, occupant_desc, schema_name from v $ sysaux_occupants; 2) Temporary tablespace is used for sorting. We recommend that you create an index for oracle and create a temporary tablespace for each user. 10 Gb introduces the temporary tablespace group www.2cto.com 3) although the undo tablespace has multiple undo tablespaces, only one undo tablespace is activated at any time point. Different types of tablespaces generate different writing methods and timing points permanent tablespaces DBWn writing there are two ways of multiple timing points one: LRU mechanism: LRU list: save recently accessed data blocks; Dirty list: data blocks modified but not written to the data file; timing: 1) When Dirty buffer reaches the threshold value 2) when there is no free buffer (server process cannot find enough free buffer in the LRU list) 3) every 3 seconds, DBWn checks the dirty list. If the dirty list does not reach the field value, read the LRU list and move the dirty buffer to the dirty list. If the dirty list is full, the data file is written.
Method 2: Checkpoint event: Time Point: 1) when a log is switched, a checkpoint is required, that is, the dirty buffer is flushed to the data file. That is, DBWn moves dirty buffer from LRU list to dirty list, and flush dirty block in dirty list to the data file. 2) When the tablespace is offline or hot standby, 3) when an object is dropped, 4) when the database is closed, what is the composition of the tablespace? Segment: the database object that occupies the storage space. For example, the emp table is also called the emp segment. Data files can be crossed, but not tablespaces. Area: consecutive allocated space. Data Files cannot be crossed. Note: The continuity here may bring about space fragmentation blocks: www.2cto.com 1) A database allows different block sizes, mainly used to transmit tablespaces. 2) Generally, five different block sizes in the database: default and non-default. In special cases, there are also non-standard (not a power of 2 ). Note: The default block size is always used in the system tablespace. The size of all blocks in a tablespace is the same. 3) Block Composition: block Overhead: block header, table directory, row directory (pointing to each record) idle Space Data Space 4) block header: data block address, data block type, transaction table (ITL) ITL: The implementation basis of Row-Level Lock and read consistency. Each record includes UBA (undo block address), transaction number, and SCN consistent read: oracle records the starting SCN number for each user query, which is used to compare with the SCN number in the data block. If the SCN number in the data block is greater than the query SCN, oracle uses the UBA information to construct the CR block, and then compares the SCN number in the CR block and the query SCN. If the value is greater than the query SCN, the structure must be continued, until the SCN in the CR block is smaller than or equal to the query SCN, if still cannot be found, the ora-01555 error will be reported. Author: linwaterbin