asmdb.sql

--==================================================================
--
-- Title       :   asmdb.sql
-- Description :   To display ASM disk group and attached database 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 instance_name    HEA 'Instance'     FOR a8
COL db_name          HEA 'Database'     FOR a8
COL status           HEA '  Status  '   FOR a10
COL software_version HEA '  Version   ' FOR a12
COL dname            HEA 'Disk Group'   FOR a10
 
BREAK ON instance_name ON db_name ON REPORT
 
SELECT
   a.instance_name, a.db_name, b.name dname,
   a.status, a.software_version
FROM
   v$asm_client a, v$asm_diskgroup b
WHERE
   a.group_number = b.group_number
ORDER BY
   a.instance_name, a.db_name, b.name
/
 
SET TERMOUT OFF
@save_env.sql
host rm save_env.sql
SET TERMOUT ON

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