Scripts
Oracle ASM: Drop a Disk Group with DROP DISKGROUP
Removing a Disk Group Permanently in Oracle Database, The drop diskgroup Command SQL Code 1drop diskgroup <name> including contents 2/ Description of the Oracle Database SQL code Purpose: The primary purpose of this SQL code is to permanently remove an entire disk group, identified by its name, from the Oracle database …
Read MoreOracle ASM: Add a Disk to an Existing Disk Group
Jan 10, 2024 / · 2 min read · Oracle ASM Oracle Disk Information Storage Management diskgroup v$asm_disk ·Expanding Storage Capacity in Oracle Database, Adding a Disk to Diskgroup Data1 SQL Code Note: Wildcards can be used for raw device names (eg. raw* 1alter diskgroup data1 2add disk '/dev/raw/raw4' 3/ Sample Oracle Output 1no rows selected 2SQL> Description of the Oracle Database SQL code Purpose: The primary purpose of …
Read MoreOracle ASM: Create a Disk Group with External Redundancy
Creating an ASM Disk Group with External Redundancy in Oracle SQL Code 1create diskgroup data1 2external redundancy 3disk '/dev/raw/raw1' 4/ Or with multiple raw partitions SQL Code 1create diskgroup data1 2external redundancy 3disk '/dev/raw/raw1', '/dev/raw/raw2' 4/ Or with multiple fail groups... SQL Code 1create …
Read MoreQuerying ASM Disk Information in Oracle
Jan 7, 2024 / · 6 min read · Oracle ASM Oracle Disk Information Storage Management v$asm_disk v$asm_disk_stat v$asm_diskgroup v$asm_file v$asm_operation ·Querying ASM Disk Information in Oracle A disk group that reports plenty of free space can still be one disk failure away from trouble, and a LUN the storage team says is ready can still be invisible to ASM. Both show up in one query against v$asm_disk: the per-disk free space, and the group 0 rows for disks not yet in …
Read MoreVisualizing Disk Groups in Oracle ASM with SQL
Jan 6, 2024 / · 5 min read · disk space analysis oracle storage capacity monitoring asm disk utilization asm v$asm_disk v$asm_diskgroup v$asm_file v$asm_operation v$asm_disk_stat ·Visualizing Disk Groups in Oracle ASM with SQL Purpose V$ASM_DISK is the view that lists every disk the Oracle ASM instance finds, including disks that are not part of any disk group. The query below reads six of its columns and sorts the rows by disk group number. The result is a plain text listing in SQL*Plus, one …
Read MoreChecking Cluster Health with crsctl check cssd SQL Command 1crsctl check cssd Purpose: To verify the status and health of the Cluster Synchronization Services (CSS) daemon (cssd), a crucial component of Oracle Clusterware. It's typically used in Oracle Real Application Clusters (RAC) and Oracle Automatic Storage …
Read Moredba_role_privs: List Oracle Roles Granted to a User
Jan 4, 2024 / · 10 min read · Privileges User dba_role_privs user_role_privs role_role_privs role_sys_privs session_roles ·dba_role_privs: List Oracle Roles Granted to a User Purpose Which roles does an Oracle user hold, and can that user pass them on to others? The view DBA_ROLE_PRIVS answers both questions. It describes the roles granted to all users and roles in the database. One row is one grant. The query below filters that view for …
Read MoreFind an Oracle role using the view dba_roles This page explores an Oracle SQL code snippet that retrieves information about database roles based on user-provided search criteria. SQL Code 1select * 2from dba_roles 3where role like '&role' 4/ Purpose: This code retrieves information about a specific database role, based …
Read MoreOracle Table Privileges Granted to a Role via role_tab_privs
Jan 4, 2024 / · 12 min read · role privileges show_table_role_privileges oracle role_tab_privs Oracle DBA Security Audit Data Dictionary Oracle Administration dba_roles dba_role_privs ·Oracle Table Privileges Granted to a Role via role_tab_privs Purpose ROLE_TAB_PRIVS lists the object privileges granted to roles — every table, view, and sequence grant, the precise privilege type, and whether the right covers the entire object or is scoped to a single column. Oracle's reference notes that "Information …
Read MoreAssessing Database Storage Utilization in Oracle Database
Dec 31, 2023 / · 3 min read · Database Size Free Space Used Space v$datafile v$tempfile v$log dba_free_space ·How large is the Oracle Database? Gain a comprehensive overview of database size, free space, and used space to proactively manage storage resources and plan for future growth. SQL Code 1col "Database Size" format a20 2col "Free space" format a20 3col "Used space" format a20 4select round(sum(used.bytes) / 1024 / 1024 …
Read More