You will learn what con-stitutes the Oracle Database 11g—an overview of the memory structures, the processes that manage the database, and how data is stored in the database.. As the DB
Trang 15 You create a view based on the EMPLOYEES table using the following SQL.
CREATE VIEW MYVIEW AS SELECT * FROM EMPLOYEES;
You modify the table to add a column named EMP_SSN What do you need to do to have this
new column appear in the view?
A Nothing Since the view definition is selecting all columns, the new column will appear
in the view automatically
B Recompile the view using ALTER VIEW MYVIEW RECOMPILE.
C Re-create the view using CREATE OR REPLACE VIEW.
D Add the column to the view using ALTER VIEW MYVIEW ADD EMP_SSN.
6 Which is a valid status of a constraint created on a view?
A DISABLE VALIDATE
B DISABLE NOVALIDATE
C ENABLE NOVALIDATE
D All of the above
7 The SALARY column of the EMPLOYEE table is defined as NUMBER(8,2), and the
COMMIS-SION_PCT column is defined as NUMBER(2,2) A view is created with the following code:
CREATE VIEW EMP_COMM ASSELECT LAST_NAME,SALARY * NVL(COMMISSION_PCT,0) CommissionFROM EMPLOYEES;
What is the datatype of the COMMISSION column in the view?
Trang 2382 Chapter 7 N Creating Schema Objects
9 The EMPLOYEE table has the following columns:
EMP_ID NUMBER (4)EMP_NAME VARCHAR2 (30)SALARY NUMBER (6,2)DEPT_ID VARCHAR2 (2)Which query will show the top five highest-paid employees?
Trang 310 The EMPLOYEE table has the following columns:
EMP_ID NUMBER (4) PRIMARY KEYEMP_NAME VARCHAR2 (30)
SALARY NUMBER (6,2)DEPT_ID VARCHAR2 (2)
A view is defined using the following SQL:
CREATE VIEW EMP_IN_DEPT10 ASSELECT * FROM EMPLOYEEWHERE DEPT_ID = ‘HR’;
Which INSERT statement will succeed through the view?
A INSERT INTO EMP_IN_DEPT10 VALUES (1000, ‘JOHN’,1500,’HR’);
B INSERT INTO EMP_IN_DEPT10 VALUES (1001, NULL,1700,’AM’);
C INSERT INTO EMP_IN_DEPT10 VALUES (1002, ‘BILL’,2500,’AC’);
D All of the above
11 To be able to modify a join view, the view definition should not contain which of the
fol-lowing in the top-level query? (Choose all that apply.)
A create sequence desc_seq start with 0 increment by -1 maxvalue 1;
B create sequence desc_seq increment by -1;
C create sequence desc_seq start with 0 increment by -1;
D Sequences can only increase.
13 Which statement is most correct in describing what happens to a synonym when the
under-lying object is dropped?
A The synonym’s status is changed to INVALID.
B You can’t drop the underlying object if a synonym exists unless the CASCADE clause is
used in the DROP statement
C The synonym is automatically dropped with the underlying object.
D Nothing happens to the synonym.
Trang 4384 Chapter 7 N Creating Schema Objects
14 There is a public synonym named PLAN_TABLE for SYSTEM.PLAN_TABLE Which of the
fol-lowing statements will remove this public synonym from the database?
A drop table system.plan_table;
B drop synonym plan_table;
C drop table system.plan_table cascade;
D drop public synonym plan_table;
15 A developer reports that she is receiving the following error:
SELECT key_seq.currval FROM dual;
ERROR at line 1:
ORA-08002: sequence KEY_SEQ.CURRVAL is not yet definedWhich of the following statements does the developer need to run to fix this condition?
A create sequence key_seq;
B create synonym key_seq;
C select key_seq.nextval from dual;
D grant create sequence to public;
16 Bitmapped indexes are best suited to which type of environment?
A High-cardinality columns
B Online transaction processing (OLTP) applications
C Full-table scan access
D Low- to medium-cardinality columns
17 Which clauses in a SELECT statement can an index be used for? (Choose all that apply.)
A SELECT
B FROM
C WHERE
D HAVING
Trang 518 You need to generate artificial keys for each row inserted into the PRODUCTS table You
want the first row to use a sequence value of 1000, and you want to make sure that no sequence value is skipped Which of the following statements will meet these requirements?
A CREATE SEQUENCE product_key2
START WITH 1000 INCREMENT BY 1 NOCACHE;
B CREATE SEQUENCE product_key2
START WITH 1000 NOCACHE;
C CREATE SEQUENCE product_key2
START WITH 1000 NEXTVAL 1 NOCACHE;
D Options A and B meet the requirements.
E None of the above statements meet all the requirements.
19 Which statement will display the last number generated from the EMP_SEQ sequence?
A select emp_seq.curr_val from dual;
B select emp_seq.currval from dual;
C select emp_seq.lastval from dual;
D select last_number from all_sequences where sequence_name =’EMP_SEQ’;
E You cannot get the last sequence number generated.
20 Which statement will create a sequence that will rotate through 100 values in a round-robin
manner?
A create sequence roundrobin cycle maxvalue 100;
B create sequence roundrobin cycle to 100;
C create sequence max_value 100 roundrobin cycle;
D create rotating sequence roundrobin min 1 max 100;
Trang 6386 Chapter 7 N Creating Schema Objects
Answers to Review Questions
1 B A view is dropped using the DROP VIEW view_name; command.
2 A You can perform an INSERT, UPDATE, or DELETE operation on the columns involving
only one base table at a time There are also some restrictions on the DML operations you perform on a join view
3 D Since the view definition includes a DISTINCT clause, only queries are allowed on the
view
4 B, E The OR REPLACE option in the CREATE VIEW statement is used to modify the
defini-tion of the view The FORCE opdefini-tion can be used to create the view with errors The ALTER VIEW statement is used to compile a view or to add or modify constraints on the view
5 C When you modify the base table, the view becomes invalid Oracle will recompile the
view the first time it is accessed Recompiling the view will make it valid, but the new umn will not be available in the view This is because when you create the view using *, Oracle expands the column names and stores the column names in the dictionary
col-6 B Since the constraints on the view are not enforced by Oracle, the only valid status of a
constraint can be DISABLE NOVALIDATE You must specify this status when creating straints on a view
con-7 C When numeric operations are performed using numeric datatypes in the view definition,
the resulting column will be a floating datatype, which is NUMBER without any precision
or scale
8 D The FOR UPDATE OF clause is not supported in the view definition The FOR UPDATE
clause locks the rows, so it is not allowed
9 C You can find the top five salaries using an inline view with the ORDER BY clause The
Oracle 11g Optimizer understands the top-n rows query Option B would have been correct
if you had ROWNUM <= 5 in the WHERE clause
10 D The view is based on a single table, and the only constraint on the table is the primary
key Although the view is defined with a WHERE clause, you have not enforced that check while using DML statements through the WITH CHECK OPTION clause
11 A, C, E, F To be able to update a base table using the view, the view definition should not
have a DISTINCT clause, a GROUP BY clause, a START WITH clause, a CONNECT BY clause, ROWNUM, set operators (UNION, UNION ALL, INTERSECT, or MINUS), or a subquery in the SELECT clause
12 A For a descending sequence, the default START WITH value is –1, and the default MAXVALUE
value is –1 To start the sequence with 0, you must explicitly override both of these defaults
13 A When the underlying object is dropped, the synonym will become INVALID You can see
the status of the synonym by querying the USER_OBJECTS dictionary view
Trang 714 D To remove a public synonym, use the DROP PUBLIC SYNONYM statement The DROP
TABLE statement will remove a table from the database but will not drop any synonyms on the table The synonym will become invalid
15 C A sequence is not yet initialized if NEXTVAL has not yet been selected from it within the
current session It has nothing to do with creating a sequence, creating a synonym, or ing privileges
grant-16 D Bitmapped indexes are not suited for high-cardinality columns (those with highly
selec-tive data) OLTP applications tend to need row-level locking, which is not available with bitmap indexes Full-table scans do not use indexes Bitmap indexes are best suited to multiple combinations of low- to medium-cardinality columns
17 A, C The obvious answer is C, but an index also can be used for the SELECT clause If an
index contains all the columns needed to satisfy the query, the table does not need to be accessed
18 D Both options A and B produce identical results, because the INCREMENT BY 1 clause is
the default if it is not specified Option C is invalid because NEXTVAL is not a valid keyword within a CREATE SEQUENCE statement
19 B Option D is close, but it shows the greatest number in the cache, not the latest generated
The correct answer is from the sequence itself, using the pseudocolumn CURRVAL
20 A The keyword CYCLE will cause the sequence to wrap and reuse numbers The keyword
MAXVALUE will set the largest value the sequence will cycle to The name roundrobin is there to confuse to you
Trang 9Database 11g:
Administration I
Trang 118 Database 11g
Components and Architecture
Explain the Memory Structures Û
N Describe the Process Structures Û
N Overview of Storage Structures Û
N
Preparing the Database Environment
ÛÛ
Identify the tools for Administering an Oracle Database Û
N Plan an Oracle Database installation Û
N Install the Oracle software by using Oracle Universal Û
N Installer (OUI)
Trang 12With this chapter, you’ll start learning Oracle Database 11g (Oracle 11g) database administration This chapter and the
remaining chapters of the book will discuss the objectives for
the Oracle 11g Administration I OCA certification exam.
With the release of Oracle 11g, Oracle Corporation has delivered a powerful and
feature-rich database that can meet the performance, availability, recoverability, application-testing, and security requirements of any mission-critical application As the Oracle DBA, you are
responsible for managing and maintaining the Oracle Database 11g throughout its life
cycle, from initial installation, creation, and configuration to final deployment ing these tasks requires a solid understanding of Oracle’s product offerings so that you can apply the proper tools and features to the application You must also use relational database concepts to design, implement, and maintain the tables that store the application data At the heart of these activities is the need for a thorough understanding of the Oracle architecture and the tools and techniques used to monitor and manage the components of this architecture
Perform-I will begin the chapter by reviewing the Oracle Database basics You will learn what
con-stitutes the Oracle Database 11g—an overview of the memory structures, the processes that
manage the database, and how data is stored in the database I will also discuss the tools used
to administer the Oracle Database 11g and how to install the Oracle 11g software.
Exam objectives are subject to change at any time without prior notice and at Oracle’s sole discretion Please visit Oracle’s Training and Certifica-
db_pages.getpage?page_id=41&p_exam_id=1Z0_052 for the most current exam-objectives listing.
Oracle Database Fundamentals
Databases store data The data itself is composed of related logical units of information
The database management system (DBMS) facilitates the storage, modification, and
retrieval of this data Some early database technologies used flat files or hierarchical file structures to store application data Others used networks of connections between sets
of data to store and locate information The early DBMS architecture mixed the physical manipulation of data with its logical manipulation When the location of data changed, the
Trang 13application referencing the data had to be updated Relational databases brought a tionary change to this architecture Relational DBMS introduced data independence, which separated the physical model of the data from its logical model Oracle is a relational DBMS
revolu-All releases of Oracle’s database products have used a relational DBMS model to store data in the database This relational model is based on the groundbreaking work of Dr
Edgar Codd, which was first published in 1970 in his paper “A Relational Model of Data for Large Shared Data Banks.” IBM Corporation, which was then an early adopter of Dr
Codd’s model, helped develop the computer language that is used to access all relational databases today—Structured Query Language (SQL) The great thing about SQL is that you can use it to easily interact with relational databases without having to write complex computer programs and without needing to know where or how the data is physically stored on disk You saw several SQL statements in the previous chapters
Relational Databases
The concept of a relational database management system (RDBMS) is that the data
con-sists of a set of relational objects The basic storage of data in a database is a table The relations are implemented in tables, where data is stored in rows and columns Figure 8.1 shows such a relationship
F I g u r e 8 1 Relational tables
EMP (Employee Table) EMPNO
7369 7499 7521 7566 7654 7698 7844
ENAME SMITH ALLEN WARD JONES MARTIN BLAKE URNER
JOB CLERK SALESMAN SALESMAN MANAGER SALESMAN MANAGER SALESMAN
MGR 7902 7698 7698 7839 7698 7839 7698
HIREDATE 17-DEC -8 20-FEB-8 22-FEB-8 02-APR-8 28-SEP-8 07-MAY-8 08-SEP-8
0800 11600 11250 12975 11250 12850 11500
20 30 30 20 30 30 30
300 500 1400
Primary Key Column
Primary Key Column
Foreign Key Column DEPT (Department Table)
DNAME ACCOUNTING RESEARCH SALES OPERATIONS
DEPTNO 10 20 30 40
LOC NEW YORK DALLAS CHICAGO BOSTON
SAL
Trang 14394 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
The DEPT table in the lower part of the figure stores information about departments
in the company Each department is identified by the department ID Along with the ID, the name and location of the department are also stored in the table The EMP table stores information about the employees in the company Each employee is identified by a unique employee ID This table includes employee information such as hire date, salary, manager, and so on The DEPTNO column in both tables then provides a relationship between the tables A department may have many employees, but an employee can work for only one department
Since the user accessing this data doesn’t need to know how or where the row is stored
in the database, there must be a way to uniquely identify the rows in the tables In our example, the department is uniquely identified by department number, and an employee is identified by an employee ID The column (or set of columns) that uniquely identifies a row
is known as the primary key According to relational theory, each table in a relational
data-base must have a primary key
When relating tables together, the primary key of one table is placed in another table
For example, the primary key of the DEPT table is a column in the EMP table In RDBMS
terminology, this is known as a foreign key A foreign key states that the data value in the
column exists in another table and should continue to exist in the other table to keep the relationship between tables The table where the column is a primary key is known as the
parent table, and the table where the foreign key column exists is known as the child table
Oracle enforces the parent-child relationship between tables using constraints.
Oracle Database 11g Objects
Every RDBMS supports a variety of database objects Oracle 11g supports the entire set of
database objects required for a relational database, such as tables, views, constraints, and
so on It also supports a wide range of objects specific to the Oracle Database 11g, such as
packages, sequences, materialized views, and so on Table 8.1 lists the objects available in
Oracle 11g I also discussed many of these in Chapter 6, “Creating Tables and Constraints,”
and Chapter 7, “Creating Schema Objects.”
tA b l e 8 1 Oracle Database 11g Objects
Object Type Description
stores rows of data.
similar to views but take up storage space to store data.
Trang 15Object Type Description
Index-organized
numbers.
occurs.
user-defined functions to return a value.
You use SQL to create database objects and to interact with application data In the next
section, I will discuss the tools available to access and administer Oracle 11g database.
Interacting with Oracle 11g
SQL is the language used to interact with the Oracle 11g database Many tools are available for the DBA to administer an Oracle 11g database The common tools are as follows:
SQL*Plus, which is a command-line interface utility
Û N
SQL Developer, a GUI tool
Û N
Oracle Enterprise Manager Database Control, a GUI tool
Û N
tA b l e 8 1 Oracle Database 11g Objects (continued)
Trang 16396 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
Using SQL*Plus and SQL Developer, you interact directly with the Oracle 11g database
using SQL statements and a superset of commands such as STARTUP, SHUTDOWN, and so on
Using Enterprise Manager, you interact indirectly with the Oracle 11g database.
SQL*Plus
SQL*Plus is the primary tool for an Oracle DBA to administer the database using SQL
commands Before you can run SQL statements, you must connect to the Oracle 11g
data-base You can start SQL*Plus from a Windows command prompt using the SQLPLUS.EXE
executable or using the $ORACLE_HOME/bin/sqlplus executable on the Unix/Linux form Figure 8.2 shows connecting to SQL*Plus from a Linux workstation
plat-F I g u r e 8 2 SQL*Plus login in Linux
To get an overview of SQL*Plus and how to connect to the database using SQL*Plus, please refer to Chapter 1, “Introducing SQL.”
SQL Developer
SQL Developer is a free GUI database-development tool With SQL Developer, you can create and view the database objects, make changes to the objects, run SQL statements, run PL/SQL programs, create and edit PL/SQL programs, and perform PL/SQL debugging
Trang 17SQL Developer also includes a migration utility to migrate Microsoft Access and Microsoft
SQL Server databases to Oracle 11g Figure 8.3 shows the object browser screen of SQL
Enterprise Manager Database Control
Oracle Enterprise Manager Database Control is a web-based database management tool
that is bundled with the Oracle 11g database This is a graphical tool specifically designed
to administer the Oracle database The Enterprise Manager Database Control is used to age a single database, whereas the Enterprise Manager Grid Control can manage multiple databases and other services and applications, such as OAS, and even non-Oracle applica-tions at the same time Figure 8.4 shows the Enterprise Manager Database Control home screen, where an overview of the database is shown
Trang 18man-398 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
F I g u r e 8 4 Enterprise Manager home screen
For all the database-administration examples in this chapter, you may use either SQL*Plus
to perform the SQL command line or use the GUI tool Enterprise Manager (EM) Database
Control Before learning to administer the Oracle 11g database, let’s start with the basics
In the next section, you’ll learn about Oracle 11g architecture.
Oracle 11g Architecture
Each database-administration and -development tool described previously allows a user
to interact with the database Using these tools requires that user accounts be created in the database and that connectivity to the database be in place across the network Users must also have adequate storage capacity for the data they insert, and they need recovery mechanisms for restoring the transactions they are performing in the event of a hardware
Trang 19failure As the DBA, you take care of each of these tasks, as well as others, which include the following:
Selecting the server hardware on which the database software will run
Û N
Installing and configuring the Oracle 11
Û
Creating the Oracle 11
Û
Creating and managing the tables and other objects used to manage the application data
Û N
Creating and managing database users
Û N
Establishing reliable backup and recovery processes for the database
Û N
Monitoring and tuning database performance
Û N
The remainder of this book is dedicated to helping you understand how to perform these and other important Oracle database-administration tasks But first, to succeed as an Oracle DBA, you need to completely understand Oracle’s underlying architecture and its mechanisms
Understanding the relationship between Oracle’s memory structures, background processes, and I/O activities is critical before learning how to manage these areas
The Oracle server architecture can be described in three categories:
User-related processes
Û N
Logical memory structures that are collectively called an
data-Database is a confusing term that is often used to represent different things on different
platforms; the only commonality is that it is something related to storing data In Oracle,
however, the term database represents the physical files that store data An instance is
com-posed of the memory structures and background processes Each database should have at least one instance associated with it It is possible for multiple instances to access a single
database; such a configuration is known as Real Application Clusters (RAC) In this book,
however, you’ll concentrate only on single-instance databases because RAC is not part of the certification exam
Figure 8.5 shows all the parts of an Oracle instance and database
Although the architecture in Figure 8.5 may at first seem complex, each of these tecture components is described in more detail in the following sections, beginning with the user-related processes, and is actually fairly simple This figure is an important piece of
archi-fundamental information when learning about the Oracle 11g architecture.
The key database components are memory structures, process structures, and storage structures Process and memory structures together are called
an instance; the storage structure is called a database Taken together, the instance and the database are called an Oracle server.
Trang 20400 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
F I g u r e 8 5 The Oracle 11g architecture
Server
Tablespace 1
SGA
Server Process 2
Background Processes
PGA
Instance
Physical Database Structure
Database Data
Database
Archive Log Files Password Files Parameter Files
Logical Database Structure
SYSTEM
User Processes
At the user level, two types of processes allow a user to interact with the instance and,
ulti-mately, with the database: the user process and the server process
Whenever a user runs an application, such as a human-resources or order-taking tion, Oracle starts a user process to support the user’s connection to the instance Depending
applica-on the technical architecture of the applicatiapplica-on, the user process exists either applica-on the user’s own computer or on the middle-tier application server The user process then initiates a con-nection to the instance Oracle calls the process of initiating and maintaining communication
between the user process and the instance a connection Once the connection is made, the user establishes a session in the instance.
After establishing a session, each user starts a server process on the host server itself
It is this server process that is responsible for performing the tasks that actually allow the user to interact with the database
Trang 21Examples of these interactions include sending SQL statements to the database, retrieving needed data from the database’s physical files, and returning that data to the user.
Server processes generally have a one-to-one relationship with user processes—in other words, each user process connects to one and only one server process However, in some Oracle configurations, multiple user processes can share a single server process We will discuss Oracle connection configurations in Chapter 11, “Understanding Network Architecture.”
In addition to the user and server processes that are associated with each user
connec-tion, an additional memory structure called the program global area (PGA) is also created
for each user The PGA stores user-specific session information such as bind variables and session variables Every server process on the server has a PGA memory area Figure 8.6 shows the relationship between a user process, server processes, and the PGA
F I g u r e 8 6 The relationship between user and server processes and the PGA
User Process
The user process communicates with the server process on the host server using the PGA to store session-specific information.
The user starts the Oracle-based application on their computer, creating a user process.
Host Server
PGA Oracle Instance Session
Server Process
PGA memory is not shared Each server process has a PGA associated with it and is exclusive As a DBA, you set the total memory that can be allocated to all the PGA memory allocated to all server and background processes
The server process communicates with the Oracle instance on behalf of the user The Oracle instance is examined in the next section
Trang 22402 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
The Oracle Instance
An Oracle database instance consists of Oracle’s main memory structure, called the system
global area (SGA), and several Oracle background processes It is with the SGA that the
server process communicates when the user accesses the data in the database Figure 8.7 shows the components of the SGA
F I g u r e 8 7 SGA components
Background Processes
SGA
Redo Buffer Large Pool Java Pool Streams Pool
Data Dictionary Cache
Result Cache
Control Structures
Shared SQL Area
Shared PL/SQL Area Library Cache
The components of the instance are described in the following sections
Oracle Memory Structures
The SGA is a shared memory area All the users of the database share the information maintained in this area Oracle allocates memory for the SGA when the instance is started and deallocates it when the instance is shut down The SGA consists of three required com-ponents and four optional components Table 8.2 describes the required components
Trang 23tA b l e 8 2 Required SGA Components
SGA Component Description
issued by database users Database buffer cache Caches the data that has been most recently accessed by data-
base users
Table 8.3 describes the optional components
tA b l e 8 3 Optional SGA Components
SGA Component Description
when Oracle’s JVM option is used.
backup and restore activities and Shared Server components.
Oracle’s Advanced Queuing option is used.
results of SQL queries and PL/SQL functions for better performance.
Oracle 11g can manage the components of the SGA dynamically, without exceeding the
value specified by the DBA for the parameter SGA_MAX_SIZE, but only for ASSM Memory in
the SGA is allocated in units of contiguous memory called granules The size of a granule
depends on the parameter MEMORY_MAX_TARGET If MEMORY_MAX_TARGET is larger than 1024MB, the granule size is either 16MB or 4MB MEMORY_MAX_TARGET is discussed in detail in Chap-ter 14, “Maintaining the Database and Managing Performance.” A minimum of three granules must be allocated to SGA—one each for the required components in Table 8.2
The sizes of these SGA components can be managed in two ways: manually or matically If you choose to manage these components manually, you must specify the size
auto-of each SGA component and then increase or decrease the size auto-of each component ing to the needs of the application If these components are managed automatically, the instance itself will monitor the utilization of each SGA component and adjust their sizes accordingly, relative to a predefined maximum allowable aggregate SGA size
Trang 24accord-404 Chapter 8 N Introducing Oracle Database 11g Components and Architecture
Oracle 11g provides several dynamic performance views to see the components and sizes
of SGA; you can use V$SGA and V$SGAINFO, as shown here:
SQL> SELECT * FROM v$sga;
NAME VALUE - -Fixed Size 1303916Variable Size 570428052Database Buffers 377487360Redo Buffers 4935680SQL>
Alternatively, you may use the SHOW SGA command from SQL*Plus, as shown here:
SQL> SHOW SGA
Total System Global Area 954155008 bytesFixed Size 1303916 bytesVariable Size 570428052 bytesDatabase Buffers 377487360 bytesRedo Buffers 4935680 bytesSQL>
The output from this query shows that the total size of the SGA is 954,155,008 bytes
This total size is composed of the variable space that is composed of the shared pool, the large pool, the Java pool (570428052 bytes), the database buffer cache (377487360 bytes), the redo log buffer (4935680 bytes), and some additional space (1,303,916 bytes) that stores information used by the instance’s background processes The V$SGAINFO view displays additional details about the allocation of space within the SGA, as shown in the following query:
SQL> SELECT * FROM v$sgainfo;
NAME BYTES RESIZEABLE - - -Fixed SGA Size 1303916 No
Redo Buffers 4935680 NoBuffer Cache Size 352321536 YesShared Pool Size 339738624 YesLarge Pool Size 4194304 YesJava Pool Size 12582912 YesStreams Pool Size 0 YesShared IO Pool Size 0 Yes
Trang 25Granule Size 4194304 NoMaximum SGA Size 954155008 NoStartup overhead in Shared Pool 46137344 NoFree SGA Memory Available 239075328
12 rows selected
SQL>
The results of this query show in detail how much space is occupied by each component
in the shared pool The components with the RESIZEABLE column with a value of Yes can
be managed dynamically by Oracle 11g.
You can also use EM Database Control to view the sizes of each of the SGA components,
as shown in Figure 8.8 From the home screen, go to the Server tab and click Memory sors to see this
Advi-F I g u r e 8 8 EM Database Control showing SGA components
You’ll learn more about the components in the SGA in the next sections
Database Buffer Cache
The database buffer cache is the area in SGA that caches the database data, holding blocks
from the data files that have been read recently The database buffer cache is shared among all the users connected to the database There are three types of buffers:
Oracle uses a least recently used algorithm (LRU algorithm) to manage the contents of
the shared pool and database buffer cache When a user’s server process needs to put a SQL