Oracle memory problems
In Oracle, the memory structure mainly includes two categories: SGA and PGA. SGA represents the system global zone, and PGA represents the program global zone.
Oracle memory mainly stores the execution program code (PL/SQL, JAVA); Information about connected sessions, including all currently active and inactive sessions; required information when running the program; for example, quer
offline copy of the redo log file. When the redo log file is full, it will be overwritten cyclically. The archived log file will record all the redo logs.4. the physical structure includes three file types: control file. files with the suffix ctl) and data files with. dbf Files with the suffix, data dictionary files are also data files), redo log files (files with the suffix of log)Ii. Memory Structure1. The memory structure of oracle consists of two memory zones: the system global zone (SGA) a
SGA_MAX_SIZE on each Oracle instance running on the system.
You can also use the search function of the official document to search for error codes and find corresponding explanations and solutions.
Setting Memory Target at Instance Startup on Linux
Starting with Oracle Database 11g Release 1 (11.1), Oracle provides the option of automatically managing SGA and PGA with a combinedMEMORY_TARGETParameter without having to setSGA_TARGETAndPGA_AGGREG
Oracle Parsing process (SQL Parsing Flow digoal)
When a user sends an SQL statement to the oracle database, runs the anonymous statement, or runs the SQL statement deployed in the database, the database works according to a certain working mechanism to understand the working mechanism, it can help developers write efficient code or understand some running symptoms.
This is provided by Oracle on its official website metalink. We can describe the SQL processing process as follows:
Oracle SQL parsi
In the dedicated connection mode, the server establishes a connection with the client for every client request to connect to the database server. This connection is used to process all requests of the client, until the user actively disconnects or the network is interrupted. When the connection is idle, the background process pmon tests the user's connection status at intervals. If the connection is disconnected, pmon cleans up the site and releases related resources. A dedicated connection is e
integrity of the database. For example, a control file is used to identify data files and redo log files. A database requires at least one control file.
Data File: The file that stores the data.
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.
Parameter file: defines the features of Oracle routines. For example, it contains parameters for adjusting the memory structure of SGA.
Arch
When creating an Oracle database, you should see this option in the database creation assistant wizard, which is the connection mode of the database. In Oracle9i or 10g, we can see two connection modes: a dedicated server connection (dedicated server) and a shared server connection (Shared Server ). Next we will classify the differences between the two connection methods.
Dedicated server mode means that each time you access Oracle, the listener of the Oracle server will get this access reques
When creating an Oracle database, you should see this option in the database creation assistant wizard, which is the connection mode of the database. In Oracle9i or 10g, we can see two connection modes: a dedicated server connection (dedicated server) and a shared server connection (Shared Server ). Next we will classify the differences between the two connection methods.
Dedicated server mode means that each time you access Oracle, the listener of the Oracle server will get this access reques
Oracle memory structure, oracle Structure
The memory structure of Oracle is divided into SGA and PGA. SGA is dynamically allocated. It is configured by the sga_max_size parameter and allocated when the oracle database instance is started, share an SGA for all session connections; For PGA, each user creates a PAG memory zone for session connections.
Shared Pool: stores the execution structure (Execution Pla
When creating an Oracle database, you should see this option in the database creation assistant wizard, which is the connection mode of the database. In Oracle9i or 10g, we can see two connection modes: a dedicated server connection (dedicated server) and a shared server connection (shared server ). Next we will classify the differences between the two connection methods.
Dedicated server mode means that each time you access Oracle, the Listener of the Oracle server will get this access request
, which may be necessary to recover from a media failure.◆ Password File: Authenticate which users have the permission to start and close Oracle routines.
2. Logical Structure tablespaces, segments, partitions, and blocks)◆ Tablespace: it is the basic logical structure in the database and a collection of data files.◆ 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
database cache and a data dictionary cache. The size of the Shared Pool directly affects the database performance.
Data Buffer Zone
It is used to store the data read from the disk data file, which is shared by all users. The server process saves the read data in the data buffer. When subsequent requests need the data, they can be found in the memory and no longer need to read the data from the disk, improving the reading speed. The size of the data buffer has a direct impact on the reading spee
read data in the data buffer. When subsequent requests need the data, they can be found in the memory and no longer need to read the data from the disk, improving the reading speed.
The size of the data buffer has a direct impact on the reading speed of the database.
Log Buffer
Logs record all modification information of the database. The log information is first generated in the log buffer zone.
When the number of log data in the log buffer reaches a certain level, the background process
files and redo log files, a database requires at least one control file Data files: File redo log files that store data: Records of changes made to the database so that data recovery can be enabled in the event of a failure. A database requires at least two redo log file parameter files: Defines the attributes of an Oracle routine, such as a parameter archive that adjusts the size of some memory structures in the SGA: an offline copy of the redo log files that may be necessary for recovery from
database requires at least one control file
Data files: Files that store data
Redo log file: Contains a record of changes made to the database so that data recovery can be enabled in the event of a failure. A database requires at least two redo log files
Parameter file: Defines the attributes of an Oracle routine, for example, it contains parameters to resize some memory structures in the SGA
Archive: An offline copy of the redo log files that may be necessary for recovery from media failure.
P
the CentOS version under Kernel2.6 to carry out the experiment.
[Oracle@361way ~]$ Uname-r2.6.18-128.el5At this point, the Oracle instance is 11GR2 (11.2.0.3), running in AMM memory management mode. The shared memory segment information is as follows.
[Oracle@361way ~]$ Ipcs-m------Shared Memory Segments--------Key shmid owner perms bytes nattch Status0x00000000 32768 Oracle 640 4096 00x00000000 65537 Oracle 640 4096 00X01606D30 98306 Oracle 640 4096 0[Oracle@361way ~]$ grep huge/proc/meminfo
Area: A large storage space reserved for data one-time
Block: Oracle's most basic storage unit, specified when establishing a database
3. Memory allocation (SGA and PGA)
SGA: The memory area that is used to store database information that is shared by the database process. It contains data and control information for the Oracle server, which is allocated in real memory on the computer where the Oracle server resides, if the actual memory is not enou
storage space that is reserved for data at one one-time.Block: Oracle's most basic storage unit, specified when establishing a database.
3. Memory allocation (SGA and PGA)
SGA: The memory area that is used to store database information that is shared by the database process. It contains data and control information for the Oracle server, which is allocated in real memory on the computer where the Oracle server resides, if the actual memory is not eno
database.
Area: A large storage space that is reserved for data at one one-time.
Block: Oracle's most basic storage unit, specified when establishing a database.
3. Memory allocation (SGA and PGA)
SGA: The memory area that is used to store database information that is shared by the database process. It contains data and control information for the Oracle server, which is allocated in real memory on the computer where the Oracle server resides, if
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.