STAT3 API

Oracle Clusterware 11g release 2 (11.2) manages several entities, such as resources, server pools, and so on. However, the interfaces in that release only allowed retrieving (reading) entities by type, which meant that a single retrieval could only return entities of a single type. Therefore, clients that needed to get different types of entities and needed to have a consistent view of the data structures to make further decisions needed to rely on a work around using a special event sequence ID and, if necessary, reissue query requests several times (in theory, in a system with ever changing state/configuration such a solution is time-unbounded).

Oracle Clusterware 12c provides a mechanism to perform a consistent read of entities of several kinds. The mechanism works on entities transparently, such that addition of new managed entities do not require any changes to the mechanism.

This is achieved by the clscrs_stat3 API.

clscrs_stat3

The clscrs_stat3 API obtains information about the Oracle Clusterware entities identified in qlist. Information is returned in out_entitylist. Queries are executed such that the subsequent output set is consistent.

You create clscrs_query objects and append them to the clscrs_querylist object before passing the object to this function. Any attributes required for each entity type must be present in the clscrs_query object. If the attribute list is empty, then Oracle Clusterware returns all attributes.

The out_entitylist must be created and passed as an empty list. Any errors for an entity are returned in the out_entitylist.

The output is returned as a nested entity list. Results for individual queries are returned as respective entities in the out_entitylist. The output for individual queries is returned as an entity list for that specific entity. The type of results in the entity can be verified by calling clscrs_crsentity_get_type, to get the Oracle Clusterware entity type of the entity that is part of the out_entitylist.

For example, If you have two queries, one for resources and the other for resource types, then out_entitylist will contain two entity objects, one for each of the aforementioned Oracle Clusterware entity types. The entity list for each of these entity objects will contain the results of the queries. To determine what type of entity object a particular object is, you must call the clscrs_crsentity_get_type function on that entity object. If the query returns zero matches, then the size of the entity list for that entity object will be zero.

Note:

Oracle supports only one clscrs_query object per entity type. If more than one clscrs_query object is created for the same entity type, then Oracle does not guarantee the stat3 API behavior.

Parameters

Input:

qlist: The list of Oracle Clusterware entities you want to query.

Output:

out_entitylist: The entity list that holds the returned entity information.

Returns

  • CLSCRS_STAT_SUCCESS: Indicates that the API successfully queried Oracle Clusterware.
  • CLSCRS_STAT_FAILURE: Displays if there is an error querying Oracle Clusterware.
  • CLSCRS_STAT_CONNECTION: Displays if there is a communication error.

CLSCRS_STAT

clscrs_stat3(clscrs_querylist *qlist,
             uword flags,
             clscrs_crsentitylist *out_entitylist);