P. 1
Chapter01 Oracle Architecture

Chapter01 Oracle Architecture

|Views: 494|Likes:
Published by Oscar Rivera

More info:

Published by: Oscar Rivera on Mar 16, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

04/09/2013

pdf

text

original

Trace Files: Background processes always write to a trace file when appropriate. In the
case of the ARCn background process, it is possible, through an initialisation parameter,
to control the amount and type of trace information that is produced.

Trace files are written on behalf of server processes whenever internal errors occur.
Additionally, setting the initialisation parameter SQL_TRACE = TRUE causes the SQL
trace facility to generate performance statistics for the processing of all SQL statements
for an instance and write them to the USER_DUMP_DEST directory.

Optionally, trace files can be generated for server processes at user request. Regardless of
the current value of the SQL_TRACE initialisation parameter, each session can enable or

© Copyright 2006, Tata Consultancy Services Limited (TCS).

38

Exploring Oracle Database Administration Oracle Architectural Components and Database Creation

disable trace logging on behalf of the associated server process by using the SQL
statement ALTER SESSION SET SQL_TRACE. This example enables the SQL trace
facility for a specific session:

ALTER SESSION SET SQL_TRACE TRUE;

The DBMS_SESSION and DBMS_SYSTEM packages can also be used to control SQL
tracing for a session.

© Copyright 2006, Tata Consultancy Services Limited (TCS).

39

Exploring Oracle Database Administration Oracle Architectural Components and Database Creation

SUMMARY

An Oracle Data base is comprised of physical files, memory and

processes.

A system global area (SGA) is a group of shared memory structures that
contain data and control information for one Oracle database instance.

The database buffer cache is the portion of the SGA that holds copies of

data blocks read from data files.

The redo log buffer is a circular buffer in the SGA that holds information

about changes made to the database.

The total size of the shared pool is determined by the initialisation

parameter SHARED_POOL_SIZE.

A shared SQL area contains the parse tree and execution plan for a given

SQL statement.

A program global area (PGA) is a memory region, which contains data
and control information for a server process.

The database writer process (DBWn) writes the contents of buffers to
data files. The DBWn processes are responsible for writing modified (dirty) buffers in
the database buffer cache to disk

The log writer process (LGWR) is responsible for redo log buffer
management writing the redo log buffer to a redo log file on disk.

The system monitor process (SMON) performs crash recovery, if

necessary, at instance startup.

The process monitor (PMON) performs process recovery when a user

process fails.

The recoverer process (RECO) is a background process used with the
distributed database configuration that automatically resolves failures involving
distributed transactions.

The archiver process (ARCn) copies online redo log files to a designated
storage device after a log switch has occurred. ARCn processes are present only when
the database is in ARCHIVELOG mode, and automatic archiving is enabled.

The queue monitor process is an optional background process for Oracle
Advanced Queuing, which monitors the message queues.

Oracle allocates a memory area called the System Global Area (SGA) and
starts one or more Oracle processes. This combination of the SGA and the Oracle
processes is called an Oracle instance.

The command for starting an instance without mounting the database is

STARTUP NOMOUNT.

The command for starting an instance and mounting the database is

STARTUP MOUNT.

To shut down the database in normal conditions the command used is

SHUTDOWN NORMAL.

To shutdown the database immediately use SHUTDOWN IMMEDIATE

command.

The parameters which control the location and size of trace files are:

© Copyright 2006, Tata Consultancy Services Limited (TCS).

40

Exploring Oracle Database Administration Oracle Architectural Components and Database Creation

BACKGROUND_DUMP_DEST

USER_DUMP_DEST

MAX_DUMP_FILE_SIZE

Password file can be created by a utility called ORAPWD.

Oracle Universal Installer is a Java-based graphical user interface (GUI)
tool that enables you to install Oracle components from your CD-ROM.

The DB_BLOCK_SIZE initialisation parameter specifies the standard
block size for the database. This block size is used in creation of SYSTEM table
space and by default in other table spaces.

The PROCESSES initialisation parameter determines the maximum
number of operating system processes that can be connected to Oracle concurrently.

© Copyright 2006, Tata Consultancy Services Limited (TCS).

41

Exploring Oracle Database Administration Oracle Architectural Components and Database Creation

SELF-ASSESSMENT

Fill in the blanks:

1. --SGA------ contains data and control information of an Oracle Instance.
2. --SGA------- and –ORACLE PROCESS-- constitute an Oracle Instance.
3. The size of the cache of the data blocks is determined by ---DB_BLOCK_SIZE-
parameter
4. –REDO LOG BUFFER -- holds information about changes made to the database.
5. –DATA DICTIONARY---- is a collection of database tables and views.

State whether the following are True/False

1. Log Writer Process writes contents of buffers to data files (T/F).
2. Database writer process writes data in redo log buffer to redo log file (T/F).
3. PMON process performs Crash Recovery (T/F).
4. SMON performs process recovery (T/F).
5. The recoverer process (RECO) is a background process used with the distributed
database configuration that automatically resolves failures involving distributed
transactions (T/F).
6. The init.ora parameter JOB_QUEUE_PROCESSES represents the maximum
number of job queue processes that can concurrently run on an instance (T/F).

Answer the following Questions:

1. What is SGA and what does it comprise of?
2. What does background process RECO do?
3. What is an Oracle Instance?
4. What are various options of starting and shutting down a database ?
5. What is the role of alert file?
6. Write short notes on ORAPWD?
7. When are Oracle Managed files used?
8. What are the prerequisites for data base creation?

© Copyright 2006, Tata Consultancy Services Limited (TCS).

42

Exploring Oracle Database Administration Oracle Architectural Components and Database Creation

LAB EXERCISES

1. Write a script for creation of database with the following configuration:
i. Database name and Instance name: TESTDB
ii. One control file named control01.con located in the directory
"/home1/oracle9i/testdb/control/control01.ctl"
iii. Two redo log file groups each one 150K member named log1a.rdo and
log2a.rdo located in the directory '/home1/oracle9i/testdb/redo01.log'
The maximum number of five logs files groups and five log file Members for
each group
iv. A 20M data file named system01.dbf and located in
/home1/oracle9i/testdb/system01.dbf' directory
v. Maximum of 30 data files that can be created for the database
vi. A maximum number of 100 archived redo logs for automatic media
recovery
vii. The Character set WE8ISO8859P1
viii. The Trace file location should be in the BDUMP and CDUMP
directory.

2. Create additional table spaces called users and indx
3. Create the data dictionary views.
4. Where is the existing control file and what is its name
5. Try to start the database without the control file. What happens?

© Copyright 2006, Tata Consultancy Services Limited (TCS).

43

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->