(Les01 venture trure IV Storage Structure) [20180116], les01venture trure

Source: Internet
Author: User
Tags dedicated server

(Les01 venture trure IV Storage Structure) [20180116], les01venture trure
Process initiation sequence: Oracle Grid Infrastructure: the OS initialization daemon starts the operating system initialization daemon process (init)-> Grid Infrastructure packaging script (init. ohasd)-> Grid Infrastructure daemon and process (ohasd. bin, oraagent. bin, orarootagent. bin, diskmon. bin, cssdagent, ocssd. bin)-> the ASM instance, listener, DB instance, and user-defined application database storage Architecture constitute the file category control file of the Oracle database: database physical structure information and backup-related metadata. Data Files: database user or application data, as well as metadata and data dictionary. Online redo log file: used for database instance recovery. Parameter file: defines the configuration when the instance is started. Password File: allows users to remotely connect to and manage instances using the sysdba, sysoper, and sysasm roles. Backup File: used for database recovery. Archive redo log file: contains real-time historical records of instance data changes (redo. You can use these files and Database backups to restore lost data files. Trace file: each server and background process can write an associated trace file. When a process detects an internal error, it dumps information about the error to the corresponding trace file. Warning Log File: The file contains special tracking entries. The database warning log is a log that records messages and errors in chronological order. Logical and physical database structure logical structure (used to display the composition of physical files of oracle in the operating system ): database-> tablespace-> segment-> zone-> physical structure of Oracle data blocks (used to describe the way oracle internally organizes and manages data): Data Files-> storage system (SAN, NFS, NAS, ASM, Exadata, RAW, and file system Data Blocks (Data Blocks): The smallest logical unit in the Oracle logical storage structure and the smallest storage unit for executing database input and output. Oracle data blocks are an integer multiple of the operating system blocks. Oracle data blocks have a certain standard size (DB_BLOCK_SIZE). In addition, Oracle supports using multiple blocks of different sizes in the same database, non-standard blocks are different from standard blocks. Oracle Data Block Structure: block header, table directory, row directory, free space, and row data block header: stores the basic information of data blocks, for example, the physical address of a block and the type of the block. Table Directory: Stores Table information. Row Directory: If the block contains row data, the information of these rows will be recorded in the row Directory, which includes the address of the row. Free Space: the free space is an unused area in a block. This area is used for inserting new rows and updating existing rows. Row data: used to store table data and index data. This space is occupied by data rows. Generally, the header, table directory, and row directory are combined to call the header information. The header information area does not store data and stores the guidance information of the entire block, to guide the system to read data. Therefore, if the header information is damaged, the Oracle system cannot read this part of data. The free space and row data constitute a block storage area for storing real data. Data zone (Extent): An Oracle storage structure composed of a group of continuous Oracle data blocks. One or more data blocks form a data zone, one or more segments are grouped into one Segment. When the Segment space is insufficient, the Oracle system automatically allocates a new data zone for the Segment. The data zone is the minimum unit for Oracle storage allocation. The purpose of using a data zone: to save data of a specific data type. A Data zone is the basic unit for data growth in a table. In an Oracle database, the storage space allocated is measured in the Data zone. An Oracle object contains at least one data zone. Set the storage parameters of a table or index to include the size of its data zone. Segment: A Segment is composed of one or more data zones. It is not the unit of storage space allocation, but an independent logical storage structure, it is used to store data objects that occupy space such as tables, indexes, and clusters. Oracle also calls the data objects that occupy space as segments. Segments are a series of data zones allocated for specific data objects (such as tables, indexes, and rollback. The data areas in the Data Segment can be discontinuous and span multiple files. Purpose: To save a specific object. Data Segment: the data records in the table are saved in the data segment. When creating a data table, the Oracle system creates a data segment for the table. When the amount of data in a table increases, the size of the Data Segment naturally changes. The increasing process of the data segment is achieved by adding a Data Partition to it. When a table is created, the system automatically creates a data segment named after the table. Index segment: The index segment contains the index used to improve system performance. Once an index is created, the system automatically creates an index segment named after the index. Rollback segment: it is also called the Undo segment. It stores rollback entries, and Oracle stores the old values before modification in the rollback segment. Temporary section: When you create an index or query, Oracle may use some temporary storage space, it is used to temporarily save parsed query statements and temporary data generated during sorting. When executing several types of SQL statements, such as "Create Index", "Select Order By", "Select Distinct", and "Select Group, the Oracle system allocates a temporary segment for these statement operations in the Temporary tablespace. In the database management process, if you often need to execute the preceding SQL statements, it is best to adjust the sort_area_size initialization parameter to increase the sorting area, so that the sorting operation should be completed in the memory as much as possible, in order to get better efficiency, but at the same time this puts forward greater requirements for the memory space of the database server. Tablespaces and data file databases are divided into multiple "tablespaces". tablespaces are logical storage units that can be used to combine relevant logical structures. Each database is logically divided into two or more tablespaces: SYSTEM and SYSAUX tablespaces. Create one or more data files explicitly in each tablespace to physically store data in all logical structures in the tablespace. Note: You can create a large file tablespace, which has only one. The file size can be the maximum size allowed by the architecture. The maximum size is the block size of the tablespace multiplied by 2 ^ 36. If the block size is 32 KB, the maximum size is 128 TB. SYSTEM and SYSAUX tablespaces are required when you create a database. These tablespaces must be online. SYSTEM tablespace is used for core functions (such as data dictionaries) Auxiliary SYSAUX tablespaces are used for additional database components (such as Oracle Enterprise Manager Repository). We do not recommend using SYSTEM and SYSAUX tablespaces to store application data. Note: The SYSAUX tablespace can be restored offline, but the SYSTEM tablespace cannot. Neither of the two tablespaces can be set to read-only. Automatic Storage Management (ASM) provides vertical integration of file systems and volume Management for Oracle DB files. -Portable High-Performance cluster file system-manage Oracle DB files-use the ASM Cluster File System (ACFS) manage Application Files-distribute data to disks to balance loads-create data images to prevent faults-improve reliability and performance, you do not need to manually interact with the ASM storage component files one by one-> ASM (1 times of the AU size, 4 times, 16 times)-> ASM allocation Unit (1, 2, 4, 8, 16, 32 or 64 MB) ASM disk group-> interaction between ASM disk and Oracle DB: memory, process, and storage 1. start the database instance on the Oracle DB node. 2. the user starts an application and derives a user process. This user process tries to establish a connection with the server. 3. The server runs the corresponding Oracle Net service for listening. The listener detects the connection request sent by the application and creates a dedicated server process that represents the user process. 4. You can run dml SQL statements and submit transactions. 5. The server process receives the statement and checks whether the shared SQL region contains the same SQL statement in the shared pool. If the shared SQL area is found, the server process checks the user's access permissions to the requested data, and then processes the statement using the existing shared SQL area. If the shared SQL area is not found, a new shared SQL area is assigned to the statement for analysis and processing. 6. The server process retrieves the required data values from the values stored in the actual data file (table) or database buffer cache. 7. The server process modifies the data in the SGA. Commit the transaction and call the log write process (LGWR) to immediately write information about the redo log buffer to the redo log file. The database write process (DBWn) permanently writes the modified block to the disk at an efficient time. 8. If the transaction is processed successfully, the server process will send a message to the application over the network. If the transaction fails to be processed, an error message is sent. 9. Other background processes are also running throughout the process. The monitoring process (PMON) monitors whether intervention is required. In addition, the database server also manages transactions of other users and prevents contention between transactions that request the same data. Summary: Oracle Server-Oracle Instance-Oracle Memory-Memory en global area: a Memory area shared by all user processes. -Shared pool: stores the data dictionary information of the recently executed SQL statements and pl/SQL programs. Memory area for syntax analysis, compilation, and execution. -Library cache (database cache)-Shared SQL area-Private SQL area (Shared Server Only)-Data dictionary cache (Data dictionary cache)-Server result cache (Service result cache) -Other-Database buffer cache (Data High-speed buffer): used to store data read from disk data files. -Redo log buffer: used to store database modification operation information. -Large pool: provides a Large buffer for database backup and recovery operations. -Java pool: The program buffer is retained by the Java program. -Streams pool: The-10 Gb added for stream replication. If streams_pool_size is not set, it will obtain a maximum of 10% of the shared pool from sga. -Sort area: memory space provided by the Oracle System for temporary data generated by sorting operations. -Program global area: the memory area of the data and control information of a single user or server, it connects to the oracle database in the User process and creates a session automatically allocated by oracle-Stack Space (Stack zone)-User global area-User session data (session information zone) -Cursor status (Cursor status area)-Sort area (sorting area) http://docs.oracle.com/cd/B28359_01/server.111/b28318/memory.htm-Background Process-DBWn (DataBase Write Process ): the background process of the data buffer zone writes the data in the buffer zone to the data file on the disk. -PMON (Process Monitor program monitoring Process): Used to restore a user's Process when a fault occurs. -SMON (System Monitor System monitoring process): When the instance is started, the instance recovers and is responsible for clearing unused temporary segments. -LGWR (Log Write process): manages the background processes that redo the Log buffer, and writes the Log data in the redo Log buffer to the online redo Log file on the disk. --> Confirm process-CKPT (Check Point Checkpoint Process): Check that all data in the modified data buffer is written into the disk data file. -ARCN (Archvie Process archiving log Process): Copies online redo log files that are full of logs to archive log files. -RECO: automatically resolves transaction faults in distributed databases. -LCKn (Lock process): it exists in a parallel server system and is used to block Multiple instances. -Dnnn (Dispatchers scheduling process): connects user processes to server processes in the multi-threaded server architecture. -Snnn (Shared Servers)-Server process-User process-Oracle Database-Physical Structure (Physical storage Structure): displays the composition of Physical files of oracle in the operating system. -Control file (control. ctl Control file): a binary file that describes the physical structure of a database. The location where data files and log files are stored in the database. -Data file (*. dbf Data file): A physical file that stores database Data. -Online log file (*. log Online log file): records all changes in the database to ensure data security. A database has at least two log group files and each log group has at least one log member. -Archive log file (*. arc Archive log file): copies and saves fully-written log files. -Pfile and spfile (init $ SID. ora spfile $ SID. ora parameter file): records the basic information of the oracle database, such as the database name, control file storage location, and memory. -Password file (orapwd $ SID password file): used to authenticate Oracle users with sysdba permissions. -Alert and treacrt file (warning and tracking file): tracking of database operation logs and error information. -Backup file: Used to Restore database data. -Logical Structure: describes how data is organized and managed in oracle. -Tablespace: Maximum logical Storage Structure-Table-Index-View-Segment ): -Data Segment-index segment-rollback segment-temporary segment-Extent-Data blocks-block header-Table directory-row directory-free space-row Data


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.