Oracle PL/SQL Programming Guide to Oracle 8i Features

Oracle PL/SQL Programming Guide to Oracle 8i FeaturesSearch this book
Previous: 7.6 New DBMS_AQ and DBMS_AQADM FeaturesChapter 7
New and Enhanced Built-in Packages in Oracle8i
Next: 8. Deploying Fine-Grained Access Control
 

7.7 New DBMS_UTILITY Features

Oracle has added two functions to the DBMS_UTILITY package that allow you to obtain information about the currently connected instance as well as active instances.

7.7.1 CURRENT_INSTANCE: Returning the Instance Number

The CURRENT_INSTANCE function returns the currently connected instance number. Its header is:

FUNCTION DBMS_UTILITY.CURRENT_INSTANCE RETURN NUMBER;

This function returns NULL if the connected instance is unavailable (down).

7.7.2 ACTIVE_INSTANCES: Returning a List of Active Instances

The ACTIVE_INSTANCES procedure returns a list of all of the active instances. Its header is:

PROCEDURE DBMS_UTILITY.ACTIVE_INSTANCES (
   instance_table OUT DBMS_UTILITY.instance_table,
   instance_count OUT NUMBER);

instance_table will contain the returned list, and instance_count is the number of active instances. DBMS_UTILITY.INSTANCE_TABLE is defined as follows:

TYPE DBMS_UTILITY.INSTANCE_RECORD IS RECORD (
    inst_number NUMBER,
    inst_name   VARCHAR2(60));
  
TYPE DBMS_UTILITY.INSTANCE_TABLE IS 
   TABLE OF instance_record INDEX BY BINARY_INTEGER;

This procedure behaves as follows:


Previous: 7.6 New DBMS_AQ and DBMS_AQADM FeaturesOracle PL/SQL Programming Guide to Oracle 8i FeaturesNext: 8. Deploying Fine-Grained Access Control
7.6 New DBMS_AQ and DBMS_AQADM FeaturesBook Index8. Deploying Fine-Grained Access Control

The Oracle Library Navigation

Copyright (c) 2000 O'Reilly & Associates. All rights reserved.

Library Home Oracle PL/SQL Programming, 2nd. Ed. Guide to Oracle 8i Features Oracle Built-in Packages Advanced PL/SQL Programming with Packages Oracle Web Applications Oracle PL/SQL Language Pocket Reference Oracle PL/SQL Built-ins Pocket Reference