Introduction to Processes (106)
All connected Oracle users must run two modules of code to access an Oracle databaseinstance.■ Application or Oracle tool: A database user runs a database application (such as aprecompiler program) or an Oracle tool (such as SQL*Plus), which issues SQLstatements to an Oracle database.■ Oracle database server code: Each user has some Oracle database code executingon his or her behalf, which interprets and processes the application’s SQLstatements.These code modules are run by processes. A proc
哈佛图书馆自习室墙上的训言
摘自左岸1. This moment will nap, you will have a dream; But this moment study,you will interpret a dream. 此刻打盹,你将做梦;而此刻学习,你将圆梦。2. I leave uncultivated today, was precisely yesterday perishestomorrow which person of the body implored. 我荒废的今日,正是昨日殒身之人祈求的明日。3. Thought is already is late, exactly is the earliest time. 觉得为时已晚的时候,恰恰是最早的时候。4. Not matter of the today will drag tomorrow. 勿将今日之事拖到明日。5. Time the study pain is temporar
Software Code Areas (105)
Software Code Areas (105)Software code areas are portions of memory used to store code that is being run or canbe run. Oracle code is stored in a software area that is typically at a different locationfrom users’ programs—a more exclusive or protected location.Software areas are usually static in size, changing only when software is updated orreinstalled. The required size of these areas varies by operating system.Software areas are read only and can be installed shared or nonshared. When poss
Dedicated and Shared Servers (104)
Memory allocation depends, in some specifics, on whether the system uses dedicatedor shared server architecture. Differences in Memory Allocation Between Dedicated and Shared ServersMemory Area Dedicated Server Shared ServerNature of session memory Private SharedLocation of the persistent area PGA SGALocation of part of the runtime area for SELECT stat
PGA memory statistics associated view (103)
There are fixed views and columns that provide PGA memory use statistics. Most ofthese statistics are enabled when PGA_AGGREGATE_TARGET is set.■ Statistics on allocation and use of work area memory can be viewed in thefollowing dynamic performance views:V$SYSSTATV$SESSTATV$PGASTATV$SQL_WORKAREAV$SQL_WORKAREA_ACTIVE■ The following three columns in the V$PROCESS view report the PGA memoryallocated and used by an Oracle process:PGA_USED_MEMPGA_ALLOCATED_MEMPGA_MAX_MEM1. pga的统计数据可从V$SYSST
PGA Memory Management for Dedicated Mode (102)
You can automatically and globally manage the size of SQL work areas. The databaseadministrator simply needs to specify the total size dedicated to PGA memory for theOracle instance by setting the initialization parameter PGA_AGGREGATE_TARGET. Thespecified number (for example, 2G) is a global target for the Oracle instance, andOracle tries to ensure that the total amount of PGA memory allocated across alldatabase server processes never exceeds this target.With PGA_AGGREGATE_TARGET, sizing of wor
SQL Work Areas(101)
For complex queries (for example, decision-support queries), a big portion of theruntime area is dedicated to work areas allocated by memory-intensive operators suchas the following:■ Sort-based operators (order by, group-by, rollup, window function)■ Hash-join■ Bitmap merge■ Bitmap createFor example, a sort operator uses a work area (sometimes called the sort area) toperform the in-memory sort of a set of rows. Similarly, a hash-join operator uses awork area (also called the hash area) to b
Session Memory (100)
Session memory is the memory allocated to hold a session’s variables (logoninformation) and other information related to the session. For a shared server, thesession memory is shared and not private.会话内存1. 保存会话变量(登入信息)和其他有关该会话的信息2. 在共享服务模式下, 会话内存是共享的而不是私有的[@more@]
Cursors and SQL Areas (99)
The application developer of an Oracle precompiler program orOCI program can explicitly open cursors, or handles to specific private SQL areas, anduse them as a named resource throughout the execution of the program. Recursivecursors that Oracle issues implicitly for some SQL statements also use shared SQLareas.The management of private SQL areas is the responsibility of the user process. Theallocation and deallocation of private SQL areas depends largely on which applicationtool you are using,
Content of the PGA (98)
The content of the PGA memory varies, depending on whether the instance is runningthe shared server option. But generally speaking, the PGA memory can be classified asfollows.Private SQL AreaA private SQL area contains data such as bind information and runtime memorystructures. Each session that issues a SQL statement has a private SQL area. Each userthat submits the same SQL statement has his or her own private SQL area that uses asingle shared SQL area. Thus, many private SQL areas can be asso
Overview of the Program Global Areas (97)
A program global area (PGA) is a memory region that contains data and controlinformation for a server process. It is a nonshared memory created by Oracle when aserver process is started. Access to it is exclusive to that server process and is read andwritten only by Oracle code acting on behalf of it. The total PGA memory allocated byeach server process attached to an Oracle instance is also referred to as the aggregatedPGA memory allocated by the instance. 程序全局区1. 是指包含服务的数据
Other SGA Initialization Parameters (96)
You can use several initialization parameters to control how the SGA uses memory.Physical MemoryThe LOCK_SGA parameter locks the SGA into physical memory.SGA Starting AddressThe SHARED_MEMORY_ADDRESS and HI_SHARED_MEMORY_ADDRESS parametersspecify the SGA's starting address at runtime. These parameters are rarely used. For64-bit platforms, HI_SHARED_MEMORY_ADDRESS specifies the high order 32 bits of the64-bit address.Extended Buffer Cache MechanismThe USE_INDIRECT_DATA_BUFFERS parameter enables t
Control of the SGA’s Use of Memory (95)
Dynamic SGA provides external controls for increasing and decreasing Oracle’s use ofphysical memory. Together with the dynamic buffer cache, shared pool, and largepool, dynamic SGA allows the following:■ The SGA can grow in response to a database administrator statement, up to anoperating system specified maximum and the SGA_MAX_SIZE specification.■ The SGA can shrink in response to a database administrator statement, to anOracle prescribed minimum, usually an operating system preferred limit
Streams Pool (94)
In a single database, you can specify that Streams memory be allocated from a pool inthe SGA called the Streams pool. To configure the Streams pool, specify the size of thepool in bytes using the STREAMS_POOL_SIZE initialization parameter. If a Streamspool is not defined, then one is created automatically when Streams is first used.If SGA_TARGET is set, then the SGA memory for the Streams pool comes from theglobal pool of SGA. If SGA_TARGET is not set, then SGA for the Streams pool istransferred
Java Pool (93)
Java pool memory is used in server memory for all session-specific Java code and datawithin the JVM. Java pool memory is used in different ways, depending on what modethe Oracle server is running in.The Java Pool Advisor statistics provide information about library cache memory usedfor Java and predict how changes in the size of the Java pool can affect the parse rate.The Java Pool Advisor is internally turned on when statistics_level is set toTYPICAL or higher. These statistics reset when the a
Large Pool (92)
The database administrator can configure an optional memory area called the largepool to provide large memory allocations for:■ Session memory for the shared server and the Oracle XA interface (used wheretransactions interact with more than one database)■ I/O server processes■ Oracle backup and restore operationsBy allocating session memory from the large pool for shared server, Oracle XA, orparallel query buffers, Oracle can use the shared pool primarily for caching sharedSQL and avoid the p
Allocation and Reuse of Memory in the Shared Pool(91)
In general, any item (shared SQL area or dictionary row) in the shared pool remainsuntil it is flushed according to a modified LRU algorithm. The memory for items thatare not being used regularly is freed if space is required for new items that must beallocated some space in the shared pool. A modified LRU algorithm allows sharedpool items that are used by many sessions to remain in memory as long as they areuseful, even if the process that originally created the item terminates. As a result, th
what is 2PC
如视图dba_2pc_pending中的2pc是什么意思? 以下摘自orafaq Oracle's Two-Phase Commit protocol. 2PC is used to ensure that all databases involved in atransaction either commits or roll-back together, leaving a distributed database in a consistentstate. Two-Phase Commit A strategy in which changes to a database are temporarily applied. Once it has been determined that all parts of a change can be made successfully, the changes are permanently posted to the database.[@more@]
Dictionary Cache (90)
The data dictionary is a collection of database tables and views containing referenceinformation about the database, its structures, and its users. Oracle accesses the datadictionary frequently during SQL statement parsing. This access is essential to thecontinuing operation of Oracle.The data dictionary is accessed so often by Oracle that two special locations inmemory are designated to hold dictionary data. One area is called the data dictionarycache, also known as the row cache because it hol
PL/SQL Program Units and the Shared Pool (89)
Oracle processes PL/SQL program units (procedures, functions, packages, anonymousblocks, and database triggers) much the same way it processes individual SQLstatements. Oracle allocates a shared area to hold the parsed, compiled form of aprogram unit. Oracle allocates a private area to hold values specific to the session thatruns the program unit, including local, global, and package variables (also known aspackage instantiation) and buffers for executing SQL. If more than one user runs thesame