1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM.

Slides:



Advertisements
Similar presentations
12 Copyright © 2006, Oracle. All rights reserved. Automatic Storage Management.
Advertisements

ITEC474 INTRODUCTION.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Introduction to Oracle Automatic Storage Management (ASM) Copyright System Managers LLC 2008.
The Architecture of Oracle
Module 2: Database Architecture
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
Automatic Storage Management The New Best Practice Steve Adams Ixora Rich Long Oracle Corporation Session id:
15 Copyright © 2004, Oracle. All rights reserved. Monitoring and Managing Memory.
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Oracle Architectural Components
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Oracle Database Instance Management Oracle 10g. Ebtisam Alabdulqader Outline Management Framework. Managing Oracle instance through the Enterprise Manager.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
Simplify your Job – Automatic Storage Management Angelo Session id:
14 Copyright © 2004, Oracle. All rights reserved. Automatic Storage Management.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Database Architecture An Oracle server: –Is a database management system that provides an open, comprehensive, integrated approach to information.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
A Guide to Oracle9i1 Database Instance startup and shutdown.
Backup and Recovery Overview Supinfo Oracle Lab. 6.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
ASM General Architecture
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
Instance and Media Recovery Structures Supinfo Oracle Lab. 7.
Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
14 Copyright © 2005, Oracle. All rights reserved. Backup and Recovery Concepts.
Physical Database Structure .
6 Copyright © Oracle Corporation, All rights reserved. Backup and Recovery Overview.
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
13 Copyright © 2004, Oracle. All rights reserved. Optimizing Database Performance.
2 Copyright © 2006, Oracle. All rights reserved. RAC and Shared Storage.
9 Copyright © 2004, Oracle. All rights reserved. Incomplete Recovery.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
4 Copyright © 2004, Oracle. All rights reserved. Managing the Oracle Instance.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
Oracle 10g Administration Database Architecture, Creation and Interfaces Copyright ©2006, Custom Training Institute.
Initialization Parameters
Core Concepts and Tools of the Oracle Database
Managing the ASM Instance
Index Index.
ASM File Group Parity Protection New to ASM for Oracle Database 19c
ASM Database Clones New to ASM for Oracle Database 18c
Database administration
Presentation transcript:

1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM

Copyright © 2008, Oracle. All rights reserved Objectives After completing this lesson, you should be able to: Describe the Oracle Database architecture Describe Automatic Storage Management (ASM) Set up initialization parameter files for ASM and database instances Start up and shut down ASM instances Administer ASM disk groups

Copyright © 2008, Oracle. All rights reserved The Oracle Database The Oracle Relational Database Management System (RDBMS) is a database management system that provides an open, comprehensive, integrated approach to information management.

Copyright © 2008, Oracle. All rights reserved Database Data files Online redo log files Control files Oracle Database Architecture: Overview Database buffer cache Shared pool Data dictionary cache Library cache PMONSMON Others Server process PGA Archived log files User process Instance ARCn SGA DBWn Redo log buffer LGWRCKPT

Copyright © 2008, Oracle. All rights reserved Connecting to the Database Connection: Communication between a user process and an instance Session: Specific connection of a user to an instance through a user process SQL> Select … Session Connection USER User

Copyright © 2008, Oracle. All rights reserved Database Oracle Database Server Structures PMONSMONOthers Data files Online redo log files Control files Instance ARCn DBWn LGWRCKPT Storage structures User process Server process Memory structures Processes Database buffer cache Shared pool Data dict. cache Library cache SGA Redo log buffer

Copyright © 2008, Oracle. All rights reserved Oracle Memory Architecture SGA Database buffer cache Redo log buffer Java pool Streams pool Shared pool Large pool PGA Background process Server process 1 Server process 2 Shared SQL area Library cache Data Dictionary cache Other I/O Buffer Response queue Request queue Free memory

Copyright © 2008, Oracle. All rights reserved Oracle Memory Architecture Full Notes Page

Copyright © 2008, Oracle. All rights reserved Process Architecture User process –Is started when a database user or a batch process connects to 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 PMONSMONOthers Instance ARCn DBWn LGWRCKPT PGA User process Server process Background processes Database buffer cache Shared pool Data dictionary cache Library cache SGA Redo log buffer

Copyright © 2008, Oracle. All rights reserved Process Structures …Server n processes SGA …Oracle background processes PMONSMON Others RECOARCn DBWn LGWRCKPT Server Database buffer cache Shared pool Data dict. cache Library cache SGA Redo log buffer

Copyright © 2008, Oracle. All rights reserved Process Structures Full Notes Page

Copyright © 2008, Oracle. All rights reserved Database Storage Architecture Online redo log files Password file Parameter fileArchived redo log files Control files Data files Alert log and trace files Backup files

Copyright © 2008, Oracle. All rights reserved Database Storage Architecture Full Notes Page

Copyright © 2008, Oracle. All rights reserved Logical and Physical Database Structures Database LogicalPhysical Tablespace Data file OS block Segment Extent Oracle data block Schema

Copyright © 2008, Oracle. All rights reserved Database Structures Full Notes Page

Copyright © 2008, Oracle. All rights reserved Tablespaces and Data Files Tablespaces consist of one or more data files. Data files belong to only one tablespace. USERS tablespace Data file 1 Data file 2

Copyright © 2008, Oracle. All rights reserved SYSTEM and SYSAUX Tablespaces The SYSTEM and SYSAUX tablespaces are mandatory tablespaces. They are created at the time of database creation. The SYSTEM tablespace is used for core functionality (for example, data dictionary tables). The auxiliary SYSAUX tablespace is used for additional database components (such as the Enterprise Manager Repository).

Copyright © 2008, Oracle. All rights reserved Segments, Extents, and Blocks Segments exist within a tablespace. Segments are made up of a collection of extents. Extents are a collection of data blocks. Data blocks are mapped to disk blocks. SegmentExtentsData blocks Disk blocks

Copyright © 2008, Oracle. All rights reserved Database Architecture: Summary of Structural Components Memory structures: –System Global Area (SGA): Database buffer cache, redo buffer, and various pools –Program Global Area (PGA) Process structures: –User process and server process –Background processes: SMON, PMON, DBWn, CKPT, LGWR, ARCn, and so on Storage structures: –Logical: Database, schema, tablespace, segment, extent, and Oracle block –Physical: data files, control files, and redo log files

Copyright © 2008, Oracle. All rights reserved Automatic Storage Management: Review Portable and high-performance cluster file system Manages Oracle database files Data spread across disks to balance load Integrated mirroring across disks Solves many storage management challenges ASM File system Volume manager Operating system Application Database

Copyright © 2008, Oracle. All rights reserved Automatic Storage Management: Review Full Notes Page

Copyright © 2008, Oracle. All rights reserved ASM: General Architecture ASM instance SID=+ASM ASM disks ASM disk group 1 DB instance SID= SALES ASMB RBAL ARB 0 ARB A … ASM disks ASM disk group 2 ASM disks DBW 0 RBAL FG GMON

Copyright © 2008, Oracle. All rights reserved Creating an ASM Instance

Copyright © 2008, Oracle. All rights reserved ASM Instance Initialization Parameters INSTANCE_TYPE = ASM DB_UNIQUE_NAME = +ASM ASM_POWER_LIMIT = 1 ASM_DISKSTRING = '/dev/rdsk/*s2', '/dev/rdsk/c1*' ASM_DISKGROUPS = dgroupA, dgroupB SPFILE = '$ORACLE_HOME/dbs/spfile+ASM.ora'

Copyright © 2008, Oracle. All rights reserved Starting Up an ASM Instance $ export ORACLE_SID='+ASM' $ sqlplus /nolog SQL> CONNECT / AS sysasm Connected to an idle instance. SQL> STARTUP; Total System Global Area bytes Fixed Size bytes Variable Size bytes ASM Cache bytes ASM diskgroups mounted

Copyright © 2008, Oracle. All rights reserved SYSASM Role SYSASM role to manage ASM instances avoids overlap between DBAs and storage administrators For ASM instances, SYSDBA will be deprecated in the future: –Oracle Database 11g Release 1 behaves as in 10g –In future releases SYSDBA privileges restricted in ASM instances SQL> CONNECT / AS SYSASM SQL> CREATE USER ossysasmusername IDENTIFIED by passwd; SQL> GRANT SYSASM TO ossysasmusername; SQL> DROP USER ossysasmusername; SQL> CONNECT ossysasmusername / passwd AS SYSASM;

Copyright © 2008, Oracle. All rights reserved Accessing an ASM Instance Disk group Storage system As SYSASM or SYSDBA As SYSOPER ASM instance All operationsLimited operations

Copyright © 2008, Oracle. All rights reserved Using Enterprise Manager to Manage ASM Users

Copyright © 2008, Oracle. All rights reserved Shutting Down an ASM Instance SHUTDOWN NORMAL ASM instance Database instance ADatabase instance B

Copyright © 2008, Oracle. All rights reserved ASM Storage: Concepts Database Tablespace Segment Extent Oracle block Data file Physical block ASM disk group ASM disk ASM file Allocation unit File-system file or raw device

Copyright © 2008, Oracle. All rights reserved ASM Disk Group Is a pool of disks managed as a logical unit Partitions total disk space into uniform sized units Spreads each file evenly across all disks Uses coarse- or fine-grain striping on the basis of file type Administers disk groups, not files Disk group ASM instance

Copyright © 2008, Oracle. All rights reserved ASM Disk Group Full Notes Page

Copyright © 2008, Oracle. All rights reserved Failure Group Controller 1Controller 2 Failure group 1Failure group 2 Disk group A Controller 3 Failure group

Copyright © 2008, Oracle. All rights reserved Disk Group Mirroring Mirror at extent level Mix primary and mirror AUs on each disk External redundancy: Defers to hardware mirroring Normal redundancy: –Two-way mirroring –At least two failure groups High redundancy: –Three-way mirroring –At least three failure groups

Copyright © 2008, Oracle. All rights reserved Disk Group Dynamic Rebalancing Automatic online rebalance whenever storage configuration changes Moving only the amount of data that is proportional to the storage added No need for manual I/O tuning Online migration to new storage Configurable load on system using ASM_POWER_LIMIT

Copyright © 2008, Oracle. All rights reserved Managing Disk Groups CREATE DISKGROUP ALTER DISKGROUP DROP DISKGROUP ASM instance Database instance

Copyright © 2008, Oracle. All rights reserved Creating and Dropping Disk Groups CREATE DISKGROUP dgroupA NORMAL REDUNDANCY FAILGROUP controller1 DISK '/devices/A1' NAME diskA1 SIZE 120G FORCE, '/devices/A2', '/devices/A3' FAILGROUP controller2 DISK '/devices/B1', '/devices/B2', '/devices/B3'; DROP DISKGROUP dgroupA INCLUDING CONTENTS;

Copyright © 2008, Oracle. All rights reserved Adding Disks to Disk Groups ALTER DISKGROUP dgroupA ADD DISK '/dev/rdsk/c0t4d0s2' NAME A5, '/dev/rdsk/c0t5d0s2' NAME A6, '/dev/rdsk/c0t6d0s2' NAME A7, '/dev/rdsk/c0t7d0s2' NAME A8; ALTER DISKGROUP dgroupA ADD DISK '/devices/A*'; Disk formatting Disk group rebalancing

Copyright © 2008, Oracle. All rights reserved ASM Disk Group Compatibility Compatibility of each disk group is separately controllable: –ASM compatibility controls ASM metadata on-disk structure –RDBMS compatibility controls minimum consumer client level –Useful with heterogeneous environments Setting disk group compatibility is irreversible. DB instance COMPATIBLE.RDBMS COMPATIBLE ASM disk group >= <= COMPATIBLE.ASM ASM instance <= COMPATIBLE

Copyright © 2008, Oracle. All rights reserved ASM Disk Group Compatibility Full Notes Page

Copyright © 2008, Oracle. All rights reserved ASM Disk Group Attributes NamePropertyValuesDescription au_sizeC 1 | 2 | 4 | 8 | 16 | 32 | 64MB Size of allocation units in the disk group compatible.rdbmsAC Valid database versionFormat of messages exchanged between DB and ASM compatible.asmAC Valid ASM instance versionFormat of ASM metadata structures on disk disk_repair_timeAC 0 M to 2 32 DLength of time before removing a disk once OFFLINE template. tname. redundancy A UNPROTECT | MIRROR | HIGH Redundancy of specified template template. tname. stripe A COARSE | FINE Striping attribute of specified template CREATE DISKGROUP DATA NORMAL REDUNDANCY DISK '/dev/raw/raw1','/dev/raw/raw2' ATTRIBUTE 'compatible.asm'='11.1'; C: CREATE A: ALTER

Copyright © 2008, Oracle. All rights reserved Using Enterprise Manager to Edit Disk Group Attributes

Copyright © 2008, Oracle. All rights reserved ASM Fast Mirror Resync Overview Disk access failure Failure time < DISK_REPAIR_TIME ASM redundancy is used Disk again accessible: Only need to resync modified extents Oracle Database 11 g Primary extent Secondary extent

Copyright © 2008, Oracle. All rights reserved Using EM to Perform Fast Mirror Resync

Copyright © 2008, Oracle. All rights reserved Miscellaneous ALTER Commands Remove a disk from dgroupA : Add and drop a disk in a single command: Cancel a disk drop operation: ALTER DISKGROUP dgroupA DROP DISK A5; ALTER DISKGROUP dgroupA DROP DISK A6 ADD FAILGROUP fred DISK '/dev/rdsk/c0t8d0s2' NAME A9; ALTER DISKGROUP dgroupA UNDROP DISKS;

Copyright © 2008, Oracle. All rights reserved ASMCMD Utility $ export ORACLE_SID=+ASM $ asmcmd ASMCMD> ls -l DGROUP1/ORCL/DATAFILE Type Redund Striped Time Sys Name DATAFILE MIRROR COARSE OCT 05 21:00:00 Y HRAPPS DATAFILE MIRROR COARSE OCT 05 21:00:00 Y TBSASM ASMCMD> SQL> CREATE TABLESPACE tbsasm DATAFILE '+DGROUP1' SIZE 100M; Tablespace created. SQL> CREATE TABLESPACE hrapps DATAFILE '+DGROUP1' SIZE 10M; Tablespace created.

Copyright © 2008, Oracle. All rights reserved ASMCMD Utility $ asmcmd help md_backupmd_restorelsdsk full nodg newdg User created directories Templates Disk group compatibility Disk group name Disk names and failure groups ASMCMD> md_backup –b /tmp/dgbackup –g admdsk1 –g asmdsk2 ASMCMD> md_restore –t full –g asmdsk1 –i backup_file ASMCMD> lsdsk -k DATA *_0001 repair/remap

Copyright © 2008, Oracle. All rights reserved ASM Scalability and Performance Extent size grows automatically according to file size. ASM support variable extents size to: –Raise maximum possible file size –Reduce memory utilization in shared pool ASM imposes the following limits: –63 disk groups in a storage system –10,000 ASM disks in a storage system –4 petabyte maximum storage for each ASM disk –40 exabyte maximum storage for each storage system –1 million files for each disk group

Copyright © 2008, Oracle. All rights reserved ASM Scalability and Performance Full Notes Page

Copyright © 2008, Oracle. All rights reserved Summary In this lesson, you should have learned how to: Describe the Oracle Database architecture Describe Automatic Storage Management (ASM) Set up initialization parameter files for ASM and database instances Start up and shut down ASM instances Administer ASM disk groups

Copyright © 2008, Oracle. All rights reserved Practice 1 Overview: Database Architecture and ASM This practice covers the following topics: Creating and starting an ASM instance Creating and using ASM disk groups Managing an ASM instance Dynamic disk group rebalancing

Copyright © 2008, Oracle. All rights reserved