Skip to main content

OEM 12 C OEM -- DISKGROUP STATUS

--Jayesh Pande
SELECT a.target_name, t.host_name, a.diskgroup, a.redundancy, a.percent_used, a.total_gb, a.free_gb
FROM
(
    SELECT
        target_name,
        diskgroup,
        MAX (DECODE (seq, 7, VALUE)) REDUNDANCY,
        round(MAX (DECODE (seq, 4, VALUE))) PERCENT_USED,
        MAX (DECODE (seq, 6, ceil(VALUE/1024))) TOTAL_GB,
        MAX (DECODE (seq, 3, ceil(VALUE/1024))) FREE_GB
        FROM (
                SELECT
                    m.target_name,
                      m.key_value diskgroup,
                      m.VALUE,
                      m.metric_column,
                      ROW_NUMBER ()
                      OVER (PARTITION BY m.target_name, m.key_value
                                ORDER BY m.metric_column
                            ) AS seq
                        FROM MGMT$METRIC_CURRENT m
                        WHERE
                            m.target_type in ('osm_instance','osm_cluster')
                            AND
                            m.metric_column IN
                               ('rebalInProgress',
                                    'free_mb',
                                    'type',
                                    'computedImbalance',
                                    'usable_total_mb',
                                    'percent_used','diskCnt'
                                )
                            OR (m.metric_column = 'total_mb'
                                    AND
                                    m.metric_name = 'DiskGroup_Usage'
                                )
            ) WHERE
                    diskgroup NOT LIKE  '%FRA%'
            GROUP BY target_name, diskgroup 
            HAVING ROUND(MAX (DECODE (seq, 4, VALUE))) > 90
                --ORDER by 1,2
) a, mgmt$target t
WHERE
a.target_name=t.target_name

Comments

Popular posts from this blog

Hard dependency with ip address Oracle RAC Cluster.

Command error out due to hard dependency with ip address [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource RDBMS_DB -n Node2 CRS-2527: Unable to start 'RDBMS_DB' because it has a 'hard' dependency on 'sDB' CRS-2525: All instances of the resource 'sDB' are already running; relocate is not allowed because the force option was not specified CRS-4000: Command Relocate failed, or completed with errors. [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource sDB  -n Node2 CRS-2529: Unable to act on 'DB' because that would require stopping or relocating 'LISTENER_DB', but the force option was not specified CRS-4000: Command Relocate failed, or completed with errors. [-Node1]/app/grid/oracle/product/11.2.0/grid/bin>./crsctl relocate resource LISTENER_DB  -n Node2 CRS-2527: Unable to start 'LISTENER_DB' because it has a 'hard' dependency on 'sD...

19C NID ( Rename Database)

 [oracle@localhost ~]$ nid DBNEWID: Release 19.0.0.0.0 - Production on Thu Dec 23 00:05:36 2021 Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved. Keyword     Description                    (Default) ---------------------------------------------------- TARGET      Username/Password              (NONE) DBNAME      New database name              (NONE) LOGFILE     Output Log                     (NONE) REVERT      Revert failed change           NO SETNAME     Set a new database name only   NO APPEND      Append to output log           NO HELP        Displays these messages    ...

ORA-01017/ORA-28000 with AUDIT_TRAIL

With default profile in Oracle 11g, accounts are automatically locked 1 day ( PASSWORD_LOCK_TIME ) after 10 failed login attempt ( FAILED_LOGIN_ATTEMPTS ): SQL > SET lines 200 SQL > SET pages 200 SQL > SELECT * FROM dba_profiles WHERE PROFILE = 'DEFAULT' ORDER BY resource_name; PROFILE                         RESOURCE_NAME                      RESOURCE LIMIT ------------------------------ -------------------------------- -------- ---------------------------------------- DEFAULT                         COMPOSITE_LIMIT                 ...