14 Copyright © 2004, Oracle. All rights reserved. Automatic Storage Management.

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.
2 Copyright © 2005, Oracle. All rights reserved. Installing the Oracle Database Software.
INTRODUCTION TO ORACLE Lynnwood Brown System Managers LLC Backup and Recovery Copyright System Managers LLC 2008 all rights reserved.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
4 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
1 Copyright © 2008, Oracle. All rights reserved. Database Architecture and ASM.
Oracle Architecture. Instances and Databases (1/2)
ITEC474 Control File Maintenance
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
Harvard University Oracle Database Administration Session 2 System Level.
5 Copyright © 2006, Oracle. All rights reserved. Database Recovery.
RMAN Restore and Recovery
Backup and Recovery Part 1.
Configuring Recovery Manager
4 Copyright © 2008, Oracle. All rights reserved. Configuring Backup Specifications.
7 Maintaining Redo Log Files. 7-2 Objectives Explaining the use of online redo log files Obtaining log and archive information Controlling log switches.
Backup Concepts. Introduction Backup and recovery procedures protect your database against data loss and reconstruct the data, should loss occur. The.
Using RMAN to Perform Recovery
Simplify your Job – Automatic Storage Management Angelo Session id:
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
20 Copyright © 2004, Oracle. All rights reserved. Database Recovery.
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Re-defining Database Storage Management
13 Copyright © Oracle Corporation, All rights reserved. RMAN Complete Recovery.
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
5 Copyright © 2004, Oracle. All rights reserved. Using Recovery Manager.
5 Copyright © 2008, Oracle. All rights reserved. Using RMAN to Create Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
11 Copyright © Oracle Corporation, All rights reserved. RMAN Backups.
Chapter 9 Scripting RMAN. Background Authors felt that scripting was a topic not covered well Authors wanted to cover both Unix/Linux and Windows environments.
Backup & Recovery Backup and Recovery Strategies on Windows Server 2003.
16 Copyright © 2007, Oracle. All rights reserved. Performing Database Recovery.
5 Copyright © 2004, Oracle. All rights reserved. Controlling the Database.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
17 Copyright © Oracle Corporation, All rights reserved. Recovery Catalog Creation and Maintenance.
15 Copyright © Oracle Corporation, All rights reserved. RMAN Incomplete Recovery.
5 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
8 Copyright © Oracle Corporation, All rights reserved. Configuring the Database Archiving Mode.
44 Creating a Database. 4-2 Objectives Preparing the operating system Preparing the parameter file Creating the database Preparing the operating system.
ASM General Architecture
6 Copyright © 2007, Oracle. All rights reserved. Managing Database Storage Structures.
Week 2 Lecture 1 Creating an Oracle Instance. Learning Objectives  Learn the steps for creating a database  Understand the prerequisites for creating.
Creating an Oracle Database. Considerations before creating a DB Planning for Database Creation –Select the standard database block size. –Use an undo.
3 Copyright © 2006, Oracle. All rights reserved. Using Recovery Manager.
Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g.
12 Copyright © Oracle Corporation, All rights reserved. User-Managed Complete Recovery.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
2 Copyright © 2007, Oracle. All rights reserved. Configuring for Recoverability.
2 Copyright © 2006, Oracle. All rights reserved. Configuring Recovery Manager.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
3 Copyright © 2007, Oracle. All rights reserved. Using the RMAN Recovery Catalog.
Week 2 Lecture 2 Data Dictionary Views and Control Files.
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.
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.
Control File Information The database name The timestamp of database creation The names and locations of associated datafiles and redo log files Tablespace.
Oracle Database Architectural Components
Oracle 10g Administration Database Architecture, Creation and Interfaces Copyright ©2006, Custom Training Institute.
Maintaining Online Redo Log Files
Duplicating a Database
Managing the ASM Instance
ASM File Group Parity Protection New to ASM for Oracle Database 19c
ASM Database Clones New to ASM for Oracle Database 18c
Performing Database Recovery
Presentation transcript:

14 Copyright © 2004, Oracle. All rights reserved. Automatic Storage Management

14-2 Copyright © 2004, Oracle. All rights reserved. Objectives After completing this lesson, you should be able to: Describe the concepts of Automatic Storage Management (ASM) Set up initialization parameter files for ASM and database instances Execute SQL commands with ASM file names Start up and shut down ASM instances Administer ASM disk groups Use RMAN to migrate your database to ASM

14-3 Copyright © 2004, Oracle. All rights reserved. What Is Automatic Storage Management? Portable and high performance cluster file system Manages Oracle database files Data is spread across disks to balance load Integrated mirroring across disks Solves many storage management challenges ASM File System Volume Manager Operating System Application Database

14-4 Copyright © 2004, Oracle. All rights reserved. ASM Key Features and Benefits Stripes files, not logical volumes Online disk reconfiguration and dynamic rebalancing Adjustable rebalancing speed Provide redundancy on a file basis ASM only supports Oracle database files Cluster aware Automatically installed

14-5 Copyright © 2004, Oracle. All rights reserved. ASM 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

14-6 Copyright © 2004, Oracle. All rights reserved. ASM General Architecture ASM Instance SID=ant ASM Instance SID=bee ASM Disks ASM Diskgroup TomASM Diskgroup DickASM Diskgroup Harry DB Instance SID= sales DB Instance SID=test DB Instance SID= sales DB Instance SID=test ASMB FG Node2Node1 Group Services tom=ant dick=ant harry=ant Group Services tom=bee dick=bee harry=bee DBW 0 ASMB RBAL ARB 0 ARB A … ARB 0 ARB A … ASMB RBAL

14-7 Copyright © 2004, Oracle. All rights reserved.

14-8 Copyright © 2004, Oracle. All rights reserved. ASM Instance Functionalities CREATE DISKGROUP ALTER DISKGROUPDROP DISKGROUP ALTER SYSTEM RESTRICTED SESSION ASM instance Database instance

14-9 Copyright © 2004, Oracle. All rights reserved. ASM Instance Creation

14-10 Copyright © 2004, 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 LARGE_POOL_SIZE = 8MB

14-11 Copyright © 2004, Oracle. All rights reserved. Accessing an ASM Instance Disk group Storage system AS SYSDBA AS SYSOPER ASM instance All operationsNondestructive operations

14-12 Copyright © 2004, Oracle. All rights reserved. Dynamic Performance View Additions Storage system V$ASM_DISKGROUP V$ASM_CLIENT V$ASM_DISK V$ASM_FILE V$ASM_TEMPLATE V$ASM_ALIAS V$ASM_OPERATION Disk group ADisk group B

14-13 Copyright © 2004, Oracle. All rights reserved.

14-14 Copyright © 2004, Oracle. All rights reserved. ASM Home Page

14-15 Copyright © 2004, Oracle. All rights reserved. ASM Performance Page

14-16 Copyright © 2004, Oracle. All rights reserved. ASM Configuration Page

14-17 Copyright © 2004, Oracle. All rights reserved. Starting Up an ASM Instance $ sqlplus /nolog SQL> CONNECT / AS sysdba Connected to an idle instance. SQL> STARTUP; ASM instance started Total System Global Area bytes Fixed Size bytes Variable Size bytes Database Buffers bytes Redo Buffers bytes ASM diskgroups mounted

14-18 Copyright © 2004, Oracle. All rights reserved. Shutting Down an ASM Instance SHUTDOWN NORMAL ASM Instance Database Instance ADatabase Instance B

14-19 Copyright © 2004, Oracle. All rights reserved. ASM Disk Groups 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 based on file type Administer disk groups not files Disk Group ASM Instance

14-20 Copyright © 2004, Oracle. All rights reserved. Failure Group Controller 1Controller 2 Failure group 1Failure group 2 Disk group A Controller 3 Failure group

14-21 Copyright © 2004, Oracle. All rights reserved. Disk Group Mirroring Mirror at extent level Mix primary and mirror extents 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

14-22 Copyright © 2004, Oracle. All rights reserved. Disk Group Dynamic Rebalancing Automatic online rebalance whenever storage configuration changes Only move data proportional to storage added No need for manual I/O tuning Online migration to new storage

14-23 Copyright © 2004, Oracle. All rights reserved. ASM Administration Page

14-24 Copyright © 2004, Oracle. All rights reserved. Create Disk Group Page

14-25 Copyright © 2004, Oracle. All rights reserved. Create or Delete 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;

14-26 Copyright © 2004, 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

14-27 Copyright © 2004, Oracle. All rights reserved. Miscellaneous Alter Commands ALTER DISKGROUP dgroupA DROP DISK A5; ALTER DISKGROUP dgroupA DROP DISK A6 ADD FAILGROUP fred DISK '/dev/rdsk/c0t8d0s2' NAME A9; ALTER DISKGROUP dgroupB REBALANCE POWER 5; ALTER DISKGROUP dgroupA UNDROP DISKS; ALTER DISKGROUP dgroupA DISMOUNT; ALTER DISKGROUP dgroupA CHECK ALL;

14-28 Copyright © 2004, Oracle. All rights reserved. Notes only slide

14-29 Copyright © 2004, Oracle. All rights reserved. Monitoring Long-Running Operations Using V$ASM_OPERATION ColumnDescription GROUP_NUMBER Disk group OPERATION Type of operation: REBAL STATE State of operation: QUEUED or RUNNING POWER Power requested for this operation ACTUAL Power allocated to this operation SOFAR Number of allocation units moved so far EST_WORK Estimated number of remaining allocation units EST_RATE Estimated number of allocation units moved per minute EST_MINUTES Estimated amount of time (in minutes) for operation termination

14-30 Copyright © 2004, Oracle. All rights reserved. ASM Files Database File ASM File automatically spread inside Disk Group dgroupA CREATE TABLESPACE sample DATAFILE '+dgroupA'; Automatic ASM file Creation RMAN

14-31 Copyright © 2004, Oracle. All rights reserved. ASM Filenames ASM Filename Fully- qualified Incomplete with template NumericAlias Alias with template Incomplete Reference Single-file Creation Multiple-file Creation

14-32 Copyright © 2004, Oracle. All rights reserved. ASM File Name Syntax / / / / /…/ / + + ( ) + / /…/ / ( )

14-33 Copyright © 2004, Oracle. All rights reserved. Notes only slide

14-34 Copyright © 2004, Oracle. All rights reserved. ASM File Name Mapping Oracle File Type Def Template Control filescontrolfileCF/BCFCONTROLFILE Data filesdatafile _ DATAFILE Online logsonline_loglog_ ONLINELOG Archive logsarchive_logparameterARCHIVELOG Temp filestemp _ TEMPFILE Data file backup piecesbackupsetClient SpecifiedBACKUPSET Data file incremental backup pieces backupsetClient SpecifiedBACKUPSET Arch log backup piecebackupsetClient SpecifiedBACKUPSET Data file copydatafile _ DATAFILE Initialization parametersinitspfilePARAMETERFILE Broker configurationsdrc DATAGUARDCONFIG Flashback logsrlog _ FLASHBACK Change tracking bitmapsCTBBITMAPCHANGETRACKING Auto backupAutoBackupClient SpecifiedAUTOBACKUP Data Pump dump setDumpsetdumpDUMPSET Cross-platform converted data files XTRANSPORT

14-35 Copyright © 2004, Oracle. All rights reserved. ASM File Templates System TemplateStripedExternalNormalHigh CONTROLFILEfineunprotected2-way mirror3-way mirror DATAFILEcoarseunprotected2-way mirror3-way mirror ONLINELOGfineunprotected2-way mirror3-way mirror ARCHIVELOGcoarseunprotected2-way mirror3-way mirror TEMPFILEcoarseunprotected2-way mirror3-way mirror BACKUPSETcoarseunprotected2-way mirror3-way mirror XTRANSPORTcoarseunprotected2-way mirror3-way mirror PARAMETERFILEcoarseunprotected2-way mirror3-way mirror DATAGUARDCONFIGcoarseunprotected2-way mirror3-way mirror FLASHBACKfineunprotected2-way mirror3-way mirror CHANGETRACKINGcoarseunprotected2-way mirror3-way mirror AUTOBACKUPcoarseunprotected2-way mirror3-way mirror DUMPSETcoarseunprotected2-way mirror3-way mirror UnprotectedUnprotected 2-wayMirror2-wayMirror 3-wayMirror3-wayMirror

14-36 Copyright © 2004, Oracle. All rights reserved. ALTER DISKGROUP dgroupA ADD TEMPLATE reliable ATTRIBUTES (MIRROR); ALTER DISKGROUP dgroupA DROP TEMPLATE reliable; ALTER DISKGROUP dgroupA DROP FILE '+dgroupA '; ALTER DISKGROUP dgroupA ADD DIRECTORY '+dgroupA/mydir'; ALTER DISKGROUP dgroupA ADD ALIAS '+dgroupA/mydir/datafile.dbf' FOR '+dgroupA '; ALTER DISKGROUP dgroupA DROP ALIAS '+dgroupA/mydir/datafile.dbf'; Template and Alias Examples

14-37 Copyright © 2004, Oracle. All rights reserved. Retrieving Aliases SELECT reference_index INTO :alias_id FROM V$ASM_ALIAS WHERE name = '+dgroupA'; SELECT reference_index INTO :alias_id FROM V$ASM_ALIAS WHERE parent_index = :alias_id AND name = 'mydir'; SELECT name FROM V$ASM_ALIAS WHERE parent_index = :alias_id;

14-38 Copyright © 2004, Oracle. All rights reserved. SQL Commands and File Naming CREATE CONTROLFILE DATABASE sample RESETLOGS ARCHIVELOG MAXLOGFILES 5 MAXLOGHISTORY 100 MAXDATAFILES 10 MAXINSTANCES 2 LOGFILE GROUP 1 ('+dgroupA','+dgroupB') SIZE 100M, GROUP 2 ('+dgroupA','+dgroupB') SIZE 100M DATAFILE '+dgroupA ' SIZE 100M DATAFILE '+dgroupA ' SIZE 100M;

14-39 Copyright © 2004, Oracle. All rights reserved. DBCA and Storage Options

14-40 Copyright © 2004, Oracle. All rights reserved. Database Instance Parameter Changes … INSTANCE_TYPE = RDBMS LOG_ARCHIVE_FORMAT DB_BLOCK_SIZE DB_CREATE_ONLINE_LOG_DEST_n DB_CREATE_FILE_DEST DB_RECOVERY_FILE_DEST CONTROL_FILES LOG_ARCHIVE_DEST_n LOG_ARCHIVE_DEST STANDBY_ARCHIVE_DEST LARGE_POOL_SIZE = 8MB …

14-41 Copyright © 2004, Oracle. All rights reserved. Migrating Your Database to ASM Storage 1.Shut down your database cleanly 2.Shutdown the database and modify your server parameter file to use Oracle Managed Files (OMF) 3.Edit and execute the following RMAN script: STARTUP NOMOUNT; RESTORE CONTROLFILE FROM '/u1/c1.ctl'; ALTER DATABASE MOUNT; BACKUP AS COPY DATABASE FORMAT '+dgroup1'; SWITCH DATABASE TO COPY; SQL "ALTER DATABASE RENAME '/u1/log1' TO '+dgroup1' "; # Repeat RENAME command for all online redo log members... ALTER DATABASE OPEN RESETLOGS; SQL "ALTER DATABASE TEMPFILE '/u1/temp1' DROP";

14-42 Copyright © 2004, Oracle. All rights reserved. Summary In this lesson, you should have learned how to: Describe the concepts of Automatic Storage Management (ASM) Set up initialization parameter files for ASM and database instances Execute SQL commands with ASM file names Start up and shut down ASM instances Administer ASM disk groups Use RMAN to migrate your database to ASM

14-43 Copyright © 2004, Oracle. All rights reserved. Practice 14 Overview: Using ASM This practice covers the following topics: Creating an ASM instance Creating tablespaces that use ASM storage Viewing ASM information Migrating a tablespace to use ASM storage

14-44 Copyright © 2004, Oracle. All rights reserved.

14-45 Copyright © 2004, Oracle. All rights reserved.

14-46 Copyright © 2004, Oracle. All rights reserved.