DBMS UTILITY

From Oracle FAQ
Jump to: navigation, search

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[edit]

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[edit]

SELECT dbms_utility.current_instance FROM dual;

Get OS and TWO TASK PROTOCOL version[edit]

SELECT dbms_utility.port_string FROM dual;

Get OS's endianness[edit]

SELECT dbms_utility.get_endianness FROM dual;