DBMS UTILITY

From Oracle FAQ
⧼orafaq-jumptonavigation⧽⧼orafaq-jumptosearch⧽

DBMS_UTILITY is a PL/SQL package in the Oracle database that constains various utility functions and procedures. Some examples:

Check if DB is in RAC mode

BEGIN
  IF dbms_utility.is_cluster_database THEN
      dbms_output.put_line('Running in SHARED/RAC mode.');
  ELSE
      dbms_output.put_line('Running in EXCLUSIVE mode.');
  END IF;
END;
/

Get current instance number

SELECT dbms_utility.current_instance FROM dual;

Get OS and TWO TASK PROTOCOL version

SELECT dbms_utility.port_string FROM dual;

Get OS's endianness

SELECT dbms_utility.get_endianness FROM dual;