Oracle architecture basics 1. physical structures (consisting of control files, data files, redo log files, parameter files, archive files, and password files) data in a database is stored in physical files on disks, when used, it is transferred to the memory. The control file, data file, redo log file, trace file and warning log (trace files, alert files) belong to the database file, and the parameter file (parameter file) password file) non-database file 1.1 data file: The file that stores the data. data Files typically represent the volume of an Oracle database determined by the disk space and quantity they use. For performance reasons, each type of data is stored in a corresponding file or a series of files, which are placed on different disks. Types :. data dictionary. data. redo data. index. temporary data, etc. 1.2 control file: contains the necessary information to maintain and verify the integrity of the database, for example, the control file is used to identify data files and redo log files, a database requires at least one control file. control file content. Database Name. Tablespace information. The name and location of all data files. The name and location of all redo log files. The current log serial number. Checkpoint information. The process control file for redo logs and archived current state information is used to direct Oracle to other parts of the database file. When an instance is started, Oracle reads the name and location of the control file from the parameter file. When the database is installed, Oracle opens the control file. When the database is finally opened, Oracle reads the list of data files from the control file and opens each file. 1.3 redo log file: contains the changes made to the database, so that data recovery can be enabled in case of a fault. A database requires at least two redo log files. 1.4 Trace Files and warning Files are connected to each background process running in the instance. Trace file records the information of major events encountered by background processes. Alert Log is a special trace file. Each database has a trace file that synchronously records database messages and errors. 1.5 parameter file: contains a large number of settings that affect the functions of Oracle database instances, such as the following settings :. Location of the Database Control File. The amount of memory in which Oracle caches data read from the disk. Select the default optimizer. perform two important functions related to database files. 1> point control files for the database. 2> point out the archive log target for the database. 1.6 archive files: offline copies of redo log files, these replicas may be necessary to recover from a media failure. 1.7 Password File: Authenticate which users have the permission to start and close Oracle routines. 2. Logical Structure (tablespace, segment, partition, block) tablespace: it is a set of basic logical structures and a series of data files in the database. Segment: the space occupied by objects in the database. ZONE: A large storage space reserved for data at one time. block: the most basic storage unit of ORACLE, which is specified when a database is created. 3. Memory Allocation (SGA and PGA) SGA is the memory zone used to store database information, which is shared by database processes. It contains data and control information of the Oracle server. It is allocated in the actual memory of the computer where the Oracle server resides. If the actual memory is insufficient, it is written into the virtual memory. PGA: contains the data and control information of a single server process or a single background process. Unlike the SGA shared by several processes, PGA is only used by one process, PGA is allocated when a process is created and recycled when the process is terminated. 4. background processes include Database Writer, DBWR, Log Writer, LGWR, System Monitor, and SMON, PMON), Checkpoint Process (CKPT), archiving Process, service Process, user Process) Data Writing Process: write changed data from the database buffer cache to the data file log write process: Write changes in the redo log buffer into the online redo log file system monitoring: check Database Consistency. If necessary, the recovery process monitoring of the database will be started when the database is opened: responsible for clearing the resource Checkpoint Process when an Oracle process fails: is responsible for permanently recording changes in the buffer cache in the database Update the database status information in the control file and data file. The process changes the title of all data files at the check point to indicate the checkpoint. Generally, this task is executed by LGWR. However, if the checkpoint significantly reduces system performance, the CKPT process can run to separate the work of the checkpoint originally executed by the LGWR process, which is implemented by the CKPT process. For many applications, the CKPT process is unnecessary. CKPT runs only when the database has many data files and the LGWR significantly reduces the performance at the check point. The CKPT process does not write blocks to the disk. This task is completed by DBWR. The CHECKPOINT_PROCESS parameter in the init. ora file controls the Enable or enable CKPT process. The default value is FALSE. Archiving process: Back up or archive a full log group during each log switch: User process service. User process: On the client, the user is responsible for passing the user's SQL statement to the service process and retrieving the query data from the server segment. 5. SCN (System ChangeNumber): System Change number, a serial number maintained by the System. It is automatically added when the system needs to be updated. It is an important indicator of maintaining data consistency and sequential recovery in the system.