asmfiles.sql

--==================================================================
--
-- Title       :   asmfiles.sql
-- Description :   To display ASM file and disk group information.
--
-- Usage/Notes :
--
-- Author      :   Adrian Preston MCSE+I MCDBA OCP
-- Date        :   18 July 2008
--
-- Version     :   1.00
--
-- Amendment   :
-- History
--
-- Copyright   :   ABCdba.com 2008
--
--==================================================================
 
SET TERMOUT OFF
STORE SET save_env.sql REPLACE
SET TERMOUT ON
 
CLEAR BREAKS
CLEAR COLUMNS
CLEAR COMPUTES
 
SET PAGESIZE 20
 
COL gbyte HEA 'File Size'       FOR 99999.999
COL fname HEA '  File Name'     FOR a35
COL ftype HEA '   File Type   ' FOR a14
COL dname HEA 'Disk Group'      FOR a10
 
SELECT
   c.name dname, a.name fname,
   ( b.bytes / ( 1024*1024 ) ) gbyte, b.type ftype
FROM
   v$asm_alias a, v$asm_file b, v$asm_diskgroup c
WHERE
   b.file_number = a.file_number
AND
   b.group_number = c.group_number
ORDER BY
  c.name, a.name
/
 
SET TERMOUT OFF
@save_env.sql
host rm save_env.sql
SET TERMOUT ON

© copyright 2001-2014 ABCdba.com | all rights reserved