-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy paths01_celliorm.sql
46 lines (40 loc) · 1.73 KB
/
s01_celliorm.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
------------------------------------------------------------------------------------------------------------------------
--
-- File name: celliorm.sql (v1.0)
--
-- Purpose: Report Exadata cell IORM status from V$CELL_CONFIG
--
-- Author: Tanel Poder
--
-- Copyright: (c) http://blog.tanelpoder.com - All rights reserved.
--
-- Disclaimer: This script is provided "as is", no warranties nor guarantees are
-- made. Use at your own risk :)
--
-- Usage: @celliorm.sql
--
------------------------------------------------------------------------------------------------------------------------
COLUMN name NEW_VALUE _instname NOPRINT
select lower(instance_name) name from v$instance;
set termout off
set markup html on
spool storage_01_celliorm-&_instname..html
COL cv_cellname HEAD CELLNAME FOR A20
COL cv_cellversion HEAD CELLSRV_VERSION FOR A20
COL cv_flashcachemode HEAD FLASH_CACHE_MODE FOR A20
PROMPT Show Exadata cell versions from V$CELL_CONFIG....
SELECT
cellname cv_cellname
, CAST(extract(xmltype(confval), '/cli-output/interdatabaseplan/objective/text()') AS VARCHAR2(20)) objective
, CAST(extract(xmltype(confval), '/cli-output/interdatabaseplan/status/text()') AS VARCHAR2(15)) status
, CAST(extract(xmltype(confval), '/cli-output/interdatabaseplan/name/text()') AS VARCHAR2(30)) interdb_plan
, CAST(extract(xmltype(confval), '/cli-output/interdatabaseplan/catPlan/text()') AS VARCHAR2(30)) cat_plan
, CAST(extract(xmltype(confval), '/cli-output/interdatabaseplan/dbPlan/text()') AS VARCHAR2(30)) db_plan
FROM
v$cell_config -- gv$ isn't needed, all cells should be visible in all instances
WHERE
conftype = 'IORM'
ORDER BY
cv_cellname
/
spool off