OracleSome files and other knowledge in the database are required. This article introduces several Oracle database files andTablespaceFor more information, see section, interval, and Oracle data block.
1. Control File Control files)
Parameter file init. ora records the location of the control file. The control file is a very small binary file that can be increased to 64 MB at most. The control file contains the following main information: history all data files, online log files and archived Log File Information. Oracle knows that these files are data files and what are the current redo log files. These are the basic conditions for system startup and operation, therefore, it is the root of Oracle operation. It is impossible to start a file system without control. Control files are very important. Generally, multiple mirror copies are used to protect control files, or RAID is used to protect control files. The loss of control files will complicate database recovery. Control file information can be queried from V $ Controlfile
2. Data files)
You can view the data file as follows:
SQL> select name from v $ datafile;
Data files are the most important physical files in Oracle and directly record user data. Data files can be divided into the following categories based on their usage: roll back the data file and restore the user data file
3. Redo log files)
Any operations you perform on the database are recorded in the redo log file. Before learning about redo logs, you must understand the concepts of redo logs. redo log groups and redo log group members (Member). A database must have at least two log group files, after writing a group, write it to another group in turn. Each log group has at least one log member. Multiple log members in one log group are mirror-related, which is conducive to log file protection because log files are damaged, in particular, the current online log corruption has a huge impact on the database. In the case of archiving, the logs to be archived cannot be archived, and online logs need to be reused.
4. Archived files)
Oracle can run in two modes: Archive mode and non-archive mode. If you do not use the archive mode, you will not have archive logs. However, your system will not be a practical system, especially for production systems, because you may lose data. However, in archive mode, in order to save all the modifications made by users, the system will save them into a series of continuous files after switching the redo log files and overwrite them, this file series is an archive log file.
Someone may say that archiving log files occupies a large amount of hard disk space. In fact, you are willing to waste some disk space to protect your data, are you willing to lose your data? Obviously, we need to ensure the security of our data. In fact, archiving does not occupy your disk space all the time. You can back up her to the tape or delete all the log files before the last full backup. You can use v $ archived_log and v $ log_history to view the archived log file information.
5. Table space)
Before 8 I, there was only one type of tablespace management, called the dictionary management tablespace DMT), that is, managing the allocation of space in the tablespace in the data dictionary. In 8i
In later versions, to reduce the dictionary overhead, the local tablespace LMT is introduced). In this type of tablespace, the bitmap stored in each data file is used to manage space allocation. You do not need to use v $ tablespace to query table space. DBA_TABLESPACE can query detailed table space information.
6. Segment (Segment)
You can specify the data file to be extended. Segments can be divided into the following four types:
- Data Segment)
- Index Segment)
- Rollback Segment)
- Temporary Segment (Temporary Segment)
You can use DBA/ALL/USER_SEGMENTS to query detailed segment information.
7. Range (Extent)
When Extent intervals are used up, the database will continue to apply for a new reserved storage space, that is, the new interval, until the maximum number of intervals in the segment (Max Extent) or no available disk space can be applied.
In Oracle8i or a later version, theoretically a segment can have infinite intervals, but multiple intervals have an impact on Oracle performance. Oracle
We recommend that you distribute data in as few intervals as possible to reduce Oracle management and move the head over DBA/ALL/USER_EXTENTS to query detailed interval information.
8. Oracle data blocks)
The most basic storage unit of Oracle, which is specified during database creation. It is visible in the initialization file but cannot be modified. To ensure the access speed, it is an integer multiple of the OS data blocks. Oracle operations are based on blocks. A single interval can contain multiple blocks. If the interval is not an integer multiple of the block size, the internal structure of the Oracle block and the data access method are both complex. Taking the block of the table segment as an example, the internal structure of the block can be divided into the following parts: public headers, table directories, row directories, and accessible spaces.
Here is an introduction to the control files and redo log files of the Oracle database. I hope this introduction will be helpful to you!