• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » ASM Metadata And How to collect ASM metadata

ASM Metadata And How to collect ASM metadata

June 20, 2017 by techgoeasy Leave a Comment

ASM Metadata

(1) It is stored in all ASM Disks header and contain information
ASM Disk group name,Physical size of all Disks in the Disk Group,Allocation Unit (AU) Size,Disk Own Size,Failure Group,Name of Disk,Creation Date,Redundancy Type
(2) Metadata is also stored as ASM file on ASM disks. These Files are internal to data and has file_number less than 256. This is the reason when creating Database on ASM have SYSTEM datafile as file_number as 256 and onwards.
(3) ASM Files are Not listed in V$ASM_FILE (file# Details are available in X$KFFIL .In addition the first 2 AUs of each disk are marked as file#=0 in X$KFDAT )

•File#0, AU=0: disk header (disk name, etc), Allocation Table (AT) and Free Space Table (FST) •File#0, AU=1: Partner Status Table (PST)
•File#1: File Directory (files and their extent pointers)
•File#2: Disk Directory
•File#3: Active Change Directory (ACD) –The ACD is analogous to a redo log, where changes to the metadata are logged. –Size=42MB * number of instances
File#4: Continuing Operation Directory (COD). –The COD is analogous to an undo tablespace. It maintains the state of active ASM operations such as disk or datafile drop/add. The COD log record is either committed or rolled back based on the success of the operation.
•File#5: Template directory
•File#6: Alias directory
•11g, File#9: Attribute Directory
•11g, File#12: Staleness registry, created when needed to track offline disks –

 (4) Metadata is always mirrored across three disk ( if Available) even you
are choosing EXTERNAL REDUNDANCY.
(5) Metadata is also stored in SGA of Database Instance copied by ASMB

How to collect ASM metadata

Oracle support often ask for ASM metadata for issues .Here is How to collect ASM metadata

First Report

SPOOL ASM_FIRST.HTML
 SET MARKUP HTML ON
 set echo onset pagesize 200
 alter session set nls_date_format='DD-MON-YYYY HH24:MI:SS';
 select 'THIS ASM REPORT WAS GENERATED AT: ==)>; ' , sysdate " " from dual;
 select 'HOSTNAME ASSOCIATED WITH THIS ASM INSTANCE: ==)> ' , MACHINE " " from v$session where program like '%SMON%';
 select * from v$asm_diskgroup;
 SELECT * FROM V$ASM_DISK ORDER BY GROUP_NUMBER,DISK_NUMBER;
 SELECT * FROM V$ASM_CLIENT;
 select * from V$ASM_ATTRIBUTE;
 select * from v$asm_operation;select * from gv$asm_operation;
 select * from v$version;
 show parameter asm
 show parameter cluster
 show parameter instance_type
 show parameter instance_name
 show parameter spfile
 show sga
 spool off
 exit

Second Report

SPOOL ASM_SECOND.HTML
 SET MARKUP HTML ON
 SET ECHO ON
 SET PAGESIZE 200
 SELECT * FROM V$ASM_CLIENT;
 SELECT * FROM V$ASM_DISK_STAT ORDER BY GROUP_NUMBER,DISK_NUMBER;
 SELECT * FROM V$ASM_DISKGROUP_STAT ORDER BY GROUP_NUMBER;
 SELECT * FROM V$ASM_FILE ORDER BY GROUP_NUMBER,FILE_NUMBER;
 SELECT * FROM V$ASM_ALIAS ORDER BY GROUP_NUMBER,FILE_NUMBER;
 SELECT * FROM V$ASM_TEMPLATE ORDER BY GROUP_NUMBER,ENTRY_NUMBER;
 select * from v$version;
 show parameter asm
 show parameter cluster
 show parameter instance_type
 show parameter instance_name
 show parameter spfile
 SPOOL OFF

It will create the html files in the directory where you executed the script and you can download that script on your PC  and look at the report in html format

Also Read
Automatic Storage Management(ASM) : How ASM works
Oracle Database Administration Tutorials : Nice collection of DBA tutorials

Filed Under: Oracle, Oracle Database Tagged With: How to collect ASM metadata

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • Password Version in oracle
  • How to login as user without changing the password in Oracle database(alter user identified by values)
  • How to check encrypted tablespace in the Database
  • How To Export -Import TDE Master Encryption Key
  • How to Configure Auto Login TDE Wallet

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us