ORASOLU TOOLBOX · SQL & DATABASE

DBA Utilities

Practical Oracle SQL for reviewing database status, instance information, configuration and operational details.

ORASOLU TOOLBOX · SQL & DATABASE

Useful checks for everyday DBA work

These read-only queries provide a quick operational view of an Oracle database before deeper administration or troubleshooting work begins.

01 · DATABASE STATUS

Review database status

Check the database name, open mode, role and protection mode from the database instance.

SELECT
    name,
    db_unique_name,
    open_mode,
    database_role,
    protection_mode,
    log_mode
FROM v$database;
02 · INSTANCE

Review instance information

Review the instance name, host, startup time and current instance status.

SELECT
    instance_number,
    instance_name,
    host_name,
    version,
    status,
    startup_time
FROM v$instance;
03 · VERSION

Check Oracle version information

Review the database version and banner information reported by the Oracle instance.

SELECT
    banner
FROM v$version
WHERE banner LIKE 'Oracle Database%';
04 · PARAMETERS

Review selected initialization parameters

Review initialization parameters that are often useful when establishing the current database configuration.

SELECT
    name,
    value,
    isdefault,
    issys_modifiable
FROM v$parameter
WHERE name IN (
    'memory_target',
    'memory_max_target',
    'sga_target',
    'sga_max_size',
    'pga_aggregate_target',
    'processes',
    'sessions'
)
ORDER BY name;
05 · COMPONENTS

Review installed database components

Review database components and their current status. This can be useful when establishing the software features available in an environment.

SELECT
    comp_id,
    comp_name,
    version,
    status
FROM dba_registry
ORDER BY comp_id;
06 · STARTUP

Review recent instance startup

Check when the current instance started and calculate the approximate uptime from the current system time.

SELECT
    instance_name,
    startup_time,
    ROUND(
        (SYSDATE - startup_time),
        2
    ) AS uptime_days
FROM v$instance;
ORASOLU TOOLBOX · SQL & DATABASE

Establish the environment before changing it.

Operational checks are most useful when they establish the current database state before configuration changes, troubleshooting or maintenance activities are performed. Capture the relevant baseline first and interpret the results in the context of the environment.