1 Core Concepts and Tools of the Oracle Database Copyright © 2009, Oracle. All rights reserved.
Objectives After completing this lesson, you should be able to: • Describe the core concepts of the Oracle Database architecture with Automatic Storage Management (ASM) • Use configuration and management DBA tools • Describe the technical course environment 1 -2 Copyright © 2009, Oracle. All rights reserved.
Naming the Core Components of an Oracle Database Server Instance PGA Server process Memory Structures (System Global Area) Server Process Structures Connection User process Client 1 -3 Database (Storage Structures) Copyright © 2009, Oracle. All rights reserved.
Oracle Database Server Architecture Overview Instance PGA Server process Memory structures (System Global Area) Server Process structures Connection User process Session 1 -4 Client Database (storage structures) Copyright © 2009, Oracle. All rights reserved.
Instance-Database Configurations Clustered system Nonclustered system I 1 I 2 I 3 D 1 D 2 Local storage D Shared storage 1 -6 Copyright © 2009, Oracle. All rights reserved.
Naming the Memory Structures of an Oracle Database Program Global Area (PGA) Assign these names: KEEP buffer pool Recycle buffer pool n. K buffer cache Server process Shared pool User Global Area Redo log Large pool buffer Database buffer cache Java pool Stack System Global Area (SGA) 1 -7 Copyright © 2009, Oracle. All rights reserved. Streams pool Space
Oracle Database Memory Structures Program Global Area (PGA) PGA Stack User Space Global Area Server process 1 Shared pool Large pool Server process 2 Database buffer cache Java pool Redo log buffer Streams pool KEEP buffer pool Recycle buffer pool n. K buffer cache System Global Area (SGA) 1 -8 Copyright © 2009, Oracle. All rights reserved.
Process Architecture • User process – Is the application or tool that connects to the Oracle Database • Database processes – Server process: Connects to the Oracle instance and is started when a user establishes a session – Background processes: Are started when an Oracle instance is started • Daemon/Application processes – Networking listeners – Grid Infrastructure daemons 1 - 10 Copyright © 2009, Oracle. All rights reserved.
Process Structures Instances (ASM and Database separate) System Global Area (SGA) PGA Server process Background processes Required: DBWn CKPT LGWR SMON Optional: ARCn ASMB RBAL Others PMON RECO Listener Grid Infrastructure Processes (ASM and Oracle Restart) 1 - 11 ohasd ocssd diskmon orarootagent User process oraagent cssdagent Copyright © 2009, Oracle. All rights reserved.
Adding Process Names 1. The ______process writes the dirty buffers to the data files. 2. The ______process writes the redo entries to the online redo log files. 3. The ______process writes checkpoint information in the control file and each data file header. 4. The ______process performs recovery on instance startup. 5. The ______process performs process recovery when a user process fails. 6. The ______process resolves in-doubt distributed transactions. 7. The ______processes copy redo log files to a designated storage device. 1 - 13 A. Checkpoint process (CKPT) B. System monitor process (SMON) C. Recoverer process (RECO) D. Log writer process (LGWR) E. Archiver processes (ARCn) F. Process monitor process (PMON) G. Database writer process (DBWn) Copyright © 2009, Oracle. All rights reserved.
Process Startup Sequence • Oracle Grid Infrastructure is started by the OS init daemon. Operating System Grid Infrastructure Init Daemon Wrapper Script Daemons and Processes init • init. ohasd (root) ohasd. bin oraagent. bin orarootagent. bin diskmon. bin cssdagent ocssd. bin ASM instance Listener DB instance User-defined applications Oracle Grid Infrastructure installation modifies the /etc/inittab file to ensure startup every time the machine is started in the corresponding run level. # cat /etc/inittab. . h 1: 35: respawn: /etc/init. d/init. ohasd run >/dev/null 2>&1
Database Storage Architecture Control files Data files Online redo log files Parameter file Backup files Archived redo log files Password file 1 - 15 Alert log and trace files Copyright © 2009, Oracle. All rights reserved.
Logical and Physical Database Structures Logical Physical Database Tablespace Data file Segment Storage system Extent Oracle data block 1 - 17 • SAN • NFS • NAS • ASM • Exadata • RAW • File system Copyright © 2009, Oracle. All rights reserved.
Automatic Storage Management • • • Is a portable and high-performance cluster file system Oracle Application Manages Oracle database files Database Manages application files with ASM Cluster File System (ACFS) ASM Cluster File ASM Files Spreads data across disks System for Oracle to balance load Database ASM Dynamic Mirrors data in case of failures Volume Manager Solves storage-management Automatic Storage Management challenges Operating system 1 - 19 Copyright © 2009, Oracle. All rights reserved.
ASM Storage Components ASM Oracle Database Data file ASM disk group ASM extent File system or Raw device 1 - 20 ASM allocation Unit Copyright © 2009, Oracle. All rights reserved. ASM disk
ASM Instance The ASM Instance is the process and memory components for ASM. System Global Area (SGA) – memory Shared pool Large pool ASM cache Free memory Processes – CPU components RBAL MARK ARBn GMON Onnn Other misc. processes ASM instance 1 - 21 PZ 9 n Copyright © 2009, Oracle. All rights reserved.
DBA Configuration Tools Setting up the technical environment for this course included the following tasks and tools: • Installing and configuring the Oracle Grid Infrastructure for a stand-alone server with the OUI, including: – Configuring a listener – Creating an ASM instance (+ASM) and configuring the +DATA disk group – Configuring Oracle Restart • Creating and configuring additional ASM disk groups (such as +FRA) with asmca • Installing the Oracle Database 11 g software with OUI • Creating the orcl Oracle database with dbca Note: These tasks have already been performed for you. 1 - 23 Copyright © 2009, Oracle. All rights reserved.
Management Framework and Related DBA Tools The Oracle database management framework includes: • Database instance • Listener • Management interface: Related tools and commands include: SQL*Plus: SQL> startup SQL> shutdown immediate Listener Control utility: $ lsnrctl status – Management agent (when using Grid Control) Enterprise Manager Control utility: – Database Control $ emctl status dbconsole $ emctl start dbconsole $ emctl stop dbconsole 1 - 25 Copyright © 2009, Oracle. All rights reserved.
Facilitating Database Management with Oracle Restart • • Restarting Oracle components when the host computer restarts or after hardware or software failure Monitoring components and restarting them, if needed For single-instance environments Considering component dependencies: – Mounting disk groups and starting the ASM instance before starting the database instance – Soft dependency between the database instance and the listener • • Starting Oracle Restart with the crsctl utility Managing Oracle Restart components with the srvctl utility $ srvctl stop database –d orcl –o abort 1 - 26 Copyright © 2009, Oracle. All rights reserved.
Quiz Oracle Restart is installed and configured as part of an Oracle Grid Infrastructure for stand-alone server installation. 1. True 2. False 1 - 28 Copyright © 2009, Oracle. All rights reserved.
Summary In this lesson, you should have learned how to: • Describe the core concepts of the Oracle Database architecture with ASM • Determine which DBA configuration and management tools to use for which task • Describe the technical course environment orcl +asm DATA FRA Enterprise Manager Command line 1 - 29 Copyright © 2009, Oracle. All rights reserved.