Oracle® Clusterware Administration and Deployment Guide 11g Release 1 (11.1) Part Number B28255-01 |
|
|
View PDF |
This appendix describes the Oracle Clusterware application program interface (API) command reference and includes the following topics:
Functions for Managing Resource Structures
See Also:
Chapter 5, "Making Applications Highly Available Using Oracle Clusterware" for detailed information about using Oracle Clusterware to make applications highly availableThis section explains how to use the Oracle Clusterware commands to manage applications and application resources under the Oracle Clusterware framework.
The examples in this appendix show the command syntaxes that you use in application profiles. Lines starting with a pound sign (#
) are comment lines and are not processed as part of a profile. A backslash (\
) at the end of a line indicates that the next line is a continuation of the previous line. See the section titled "Using the crs_profile Command to Create An Application Resource Profile" to see a profile example.
Oracle Clusterware uses security similar to Linux or UNIX systems, where permissions may be specified for the owner, nodes of a group, or holders of specific privileges. There may also be default permissions for other users. These permissions are read
, write
, and run
on Windows systems, and rwx
on Linux or UNIX systems. Default ownership and permissions are set when you create an application profile. Table D-1 shows the Oracle Clusterware commands and their owners and describes which commands require write permission and which commands require run permission.
Table D-1 Oracle Clusterware Command Owner and Permissions Matrix
Note:
On platforms that do not have a group concept, the group permissions areNULL
or not set.Note:
Do not use the Oracle Clusterware commands prefixed withcrs_
(except for crs_stat
) on resources that have names beginning with the prefix ora
unless either Oracle Support asks you to, or unless Oracle has certified you as described in https://metalink.oracle.com
. Server Control (SRVCTL) is the correct utility to use on Oracle resources. You can create resources that depend on resources that Oracle has defined. You can also use the Oracle Clusterware commands to inspect the configuration and status.Table D-2 alphabetically lists the Oracle Clusterware commands that this appendix describes. Note that the -q
option is available for all commands and enables the command to run in quiet mode. This means that no messages are displayed on the console.
Table D-2 Oracle Clusterware Commands Summary
Command | Description |
---|---|
Lists the permissions associated with a resource. |
|
Creates, validates, deletes, and updates an Oracle Clusterware application profile |
|
|
Registers configuration information for an application with the OCR. |
|
Relocates an application profile to another node. |
|
Sets permissions associated with a resource. |
|
Lists the status of an application profile. |
|
Starts applications that have been registered. |
|
Stops an Oracle Clusterware application. |
|
Removes the configuration information for an application profile from the OCR. |
Note:
On platforms that do not have a group concept, the group permissions areNULL
or not set.Lists the permissions defined for the resource. If any user other than root
needs access to a resource that was created by the root
user, you need to explicitly give them access. However, resources registered by users other than root
are owned by the registering user, and can see their own resources. The access definitions are similar to Unix.
See Also:
The crs_setperm command to modify the permissions associated with a resourceUse the crs_getperm
command with the following syntax:
crs_getperm resource_name [-u user|-g group] [-q]
To obtain the permissions associated with a resource, use the following syntax:
crs_getperm resource_name
To list the permissions associated with the postman
application, use the following command:
crs_getperm postman ==================== Name: postman owner:root:rwx,pgrp:oinstall:r-x,other::r--,user:oracle:r-x, =====================
Table D-3 crs_getperm Options
Option | Description |
---|---|
|
Obtains the permissions associated with the specified (operating system) group. |
|
Runs the command in quiet mode (no messages are displayed on the console). |
|
Obtains the permissions associated with a specific resource. |
|
Obtains the permissions associated with the specified user. |
Creates, validates, deletes, and updates an Oracle Clusterware application profile. It works on the user's copy of a profile.
You can also use crs_profile
to generate a template script. The crs_profile
command creates new application profiles and validates, updates, deletes, or lists existing profiles. An application profile assigns values to attributes that define how a resource should be managed or monitored in a cluster. For the root
user, profiles are written to the CRS_home
/crs/profile
directory. For nonprivileged users, the profile is written to the CRS_home
/crs/public
directory. Values in the profile that are left blank are ignored and may be omitted if not required. Omitted profile variables that are required for a resource type can cause validation or registration to fail.
After you have created an application profile and registered the application with Oracle Clusterware using the crs_register
command, you can use other Oracle Clusterware commands, such as crs_stat
, crs_start
, crs_stop
, crs_relocate
, and crs_unregister
, on the application. You must register applications using the crs_register
command before the other Oracle Clusterware commands are available to manage the application. The crs_profile
command may have other options for defining user-defined attributes in a profile.
Use the crs_profile
command with the following syntax to create an application profile template:
crs_profile -create resource_name -t application [-a action_script] [-B executable_pathname] [-dir directory] [-d description] [-p placement_policy] [-h hosting_nodes] [-r required_resources] [-l optional_resources] [-o option,[...]] [attribute_flag attribute_value] [...] [-f] [-q] crs_profile -create resource_name -t application [-dir directory_path] [-a action_script] [-B binary_pathname] [-d description] [-h hosting_members] [-r required_resources] [-l optional_resources] [-p placement_policy] [-o as=auto_start,ci=check_interval,ft=failure_threshold, fi=failure_interval,ra=restart_attempts,fd=failover_delay, st=script_timeout,ap=active_placement,bt=rebalance, ut=uptime_threshold,rt=start_timeout,pt=stop_timeout] [-f] [-q]
To create an application profile from an application profile template you use crs_profile
to create a template (a cap) file. This file is then read automatically by the crs_register command which reads the data from the cap file and puts it in the OCR. For example:
crs_profile -create resource_name -I template_file [-f] [-q]
To validate the application profile syntax of a profile, enter the following command:
crs_profile -validate resource_name [-q]
To list one or more application profiles:
crs_profile -print [resource_name [...]] [-q]
To create an application profile template from an existing application profile:
crs_profile -template resource_name [-O template_file] [-q]
To update an application profile:
crs_profile -update resource_name [option [...]] [-q]
To delete an application profile and its associated action program:
crs_profile -delete resource_name [-q]
Note:
Thecrs_profile -delete
command deletes the resource profile file but does not delete the action script file.Table D-4 Options for the crs_profile Command
Option | Description |
---|---|
[ |
All crs_profile attribute_flag attribute_value This command sets the specified attribute (whose flag is specified by crs_profile -validate resource_name |
[ |
Specifies the action program for the application. An action program has start, stop, and check entry points that are called by Oracle Clusterware. You can specify either a full path name for the script file or its filename. |
[ |
Specifies the location of the application executable and causes the |
|
Creates a resource profile for the indicated application according to the specified options. A |
[ |
Specifies the description of the application. Enclose the description in double quotation marks ( |
[ |
Specifies the file location where the profile is located. |
[ |
Specifies an ordered list of nodes, separated by white space, that can host the application. If there is more than one node, then the list must be enclosed in double quotation marks ( |
[ |
Specifies an ordered list of optional resources, separated by white space. If there are multiple optional resources specified, then the list must be enclosed in double quotation marks ( |
[ |
Specifies a comma-delimited list of attribute option names and their values. To see the list of attribute option names, see Table D-5, "Options for the -o Flag" or run the |
[ |
Specifies the policy according to which Oracle Clusterware selects the node on which to start or restart the application. You can specify |
|
Runs the command in quiet mode (no messages are displayed on the console). |
[ |
Specifies an ordered list of resources, separated by spaces, on which the application depends. These resources must be active on any node on which the application is running. If there are multiple required resources, then the list must be enclosed in double quotation marks ( |
|
Indicates an application or application resource type. |
|
Validates the application profile syntax of a profile. |
Table D-5 Options for the -o Flag
Option | Description |
---|---|
|
When set to |
|
When set to |
Sets the time (in seconds) at which the check entry point of the application's action program runs. The check interval is the maximum amount of time that an application can be unavailable to clients before Oracle Clusterware attempts to restart it. The default check interval is 60 seconds. |
|
|
Specifies the number of seconds that Oracle Clusterware waits before attempting to relocate the application resource. An application resource that was running on a cluster node that failed restarts immediately on that node if it becomes available again within the failover delay period. If application resources are dependent on each other due to required resources defined in application profiles, then all interdependent application resources wait for the largest failover delay that you have defined for any of the resources. The default failover delay is |
|
Specify the time (in seconds) during which the failure threshold is calculated and applied. The default failure interval is |
|
Specifies the number of times that Oracle Clusterware may detect an application or application resource failure within the failure interval before it marks the application or application resource as unavailable and stops monitoring it. The value must be in the range |
|
Specifies the number of times that Oracle Clusterware attempts to restart the application or application resource on the current node before attempting to relocate it. The default number of restart attempts is |
|
Sets the maximum number of seconds within which an action program can run. The Oracle Clusterware commands and daemon return an error message and post an event to Event Manager (EVM) when they invoke action program entry points and the script does not complete its execution within this time. The default is 60 seconds. |
The following is an example of using the crs_profile
command to create the application profile for the postman
application:
crs_profile -create postman \ -t application \ -a postman.sh \ -o ci=5,ra=2"
The following is an example of using the crs_profile
command to validate the application profile named dtcalc
:
crs_profile -validate dtcalc
If you do not specify either the -a
or -B
options, then the profile is created without an action program value. You should create a readable, executable script and update the profile with this script's value before attempting to start the application. If you specify the -a
option alone, then the action program specified must exist at the specified location or in the default directory if no path is specified. Otherwise, the command fails.
The crs_register
command registers one or more applications specified with the resource_name
parameter for each application. This command requires write access to the target application. This command only succeeds if the profile is found either in the default location or in the directory specified by the -dir
option. An application must be registered for Oracle Clusterware to monitor the resource or to start, restart, or relocate a highly available application associated with an application resource. An application registration must be updated for any changes to an application profile to take effect. Also, see the "Security and Permissions" section for information about the privileges required for this command.
An application can be registered or updated only if the CRS daemon is active and an Oracle Clusterware application profile exists in the profile directory for this application. If fields are missing from an application profile, then the profile is merged with the default profile template and Oracle uses the values in the default profile template.
The ownership and default permissions for the application are set during the registration process. You can register any .cap
file as long as the permissions for the file permit read
and write
, for example, crs_profile
and crs_register
must be able to read the file. By default, the user who registers the application is the owner of the application. If the profile cannot be registered, then Oracle Clusterware displays messages explaining why. Use the crs_stat
command to verify that the application is registered.
You can use the crs_register
command to register and update applications. Use the following crs_register
syntax to register an application:
crs_register resource_name [-dir directory_path] [...] [-u] [-f] [-q] crs_register resource_name -update [-a action_script] [-d description] [-h hosting_members] [-r required_resources] [-l optional_resources] [-p placement_policy] [-o as=auto_start,ci=check_interval,ft=failure_threshold, fi=failure_interval,ra=restart_attempts,fd=failover_delay, st=script_timeout,ap=active_placement,bt=rebalance, ut=uptime_threshold,rt=start_timeout,pt=stop_timeout] [-q]
The resource_name
[...]
parameter can be the name of one or more application resources as specified in an application profile. If you do not specify any options, then the crs_relocate
command relocates each specified application resource according to its placement policy and required resource lists. Oracle Clusterware does not relocate a resource if there are interdependent application resources unless you specify the -f
option. A profile must exist for the application that you are registering.
Table D-6 Options on the crs_register Command
Option | Description |
---|---|
[ |
Specifies the directory where the |
|
Enables you to register a resource even though you have no execute permission on one or more required resources. |
|
Ensures the changes take effect immediately. Use |
[ |
All crs_profile commands take the following format: crs_profile attribute_flag attribute_value This command sets the specified attribute (whose flag is specified by crs_profile -validate resource_name |
[ |
Specifies the action program for the application. An action program has start, stop, and check entry points that are called by Oracle Clusterware. You can specify either a full path name for the script file or its filename. |
[ |
Specifies the description of the application. Enclose the description in double quotation marks ( |
[ |
Specifies an ordered list of nodes, separated by white space, that can host the application. If there is more than one node, then the list must be enclosed in double quotation marks ( |
[ |
Specifies an ordered list of optional resources, separated by white space. If there are multiple optional resources specified, then the list must be enclosed in double quotation marks ( |
[ |
Specifies a comma-delimited list of attribute option names and their values. To see the list of attribute option names, see Table D-5, "Options for the -o Flag" or run the |
[ |
Specifies the policy according to which Oracle Clusterware selects the node on which to start or restart the application. You can specify |
|
Runs the command in quiet mode (no messages are displayed on the console). |
[ |
Specifies an ordered list of resources, separated by spaces, on which the application depends. These resources must be active on any node on which the application is running. If there are multiple required resources, then the list must be enclosed in double quotation marks ( |
Use the following crs_register
command syntax to update a registered application:
crs_register resource_name -update [option ...] [-o option,...] [-q]
The following example registers an application named postman
for which an application profile exists in the CRS_home
/crs/profile
directory:
CRS_home/bin/crs_register postman
Note:
The profile will be in thecrs/profile
directory if the profile is created by the root
user. The profile will be in the crs/public
directory if the profile is created by any other user.The crs_relocate
command relocates applications and application resources as specified by the command options that you use and the entries in your application profile. The specified application or application resource must be registered and running under Oracle Clusterware in the cluster environment before you can relocate it. The command displays a message if you specify a cluster node that is unavailable or if the attempt to relocate failed. Also, see the "Security and Permissions" section for information about the privileges required for this command.
When you issue a crs_relocate
command, Oracle Clusterware first runs the stop entry point of the action program on the node on which it is currently running. Oracle Clusterware then performs the start entry point of the action program to start it on a new node.
If Oracle Clusterware fails to stop the application or application resource on the current node due to an action program error, then it marks it as UNKNOWN
. You cannot issue the crs_relocate
command on a resource in this state. Instead, run a crs_stop
-f
command on the resource and restart it by issuing he crs_start
command to return it to the ONLINE
state before you attempt to relocate it again. If Oracle Clusterware fails to restart an application resource, then you may need to check the resource action program.
If the action program start entry point fails to run successfully, then the stop entry point is run. If the stop entry point fails to run successfully, then the state is marked as UNKNOWN
and relocation attempts are stopped. If the stop entry point succeeds, then the state is set to OFFLINE
. The target state remains ONLINE
however, so subsequent cluster node failures or restarts can cause Oracle Clusterware to attempt to restart the application. If you have not specified the node to which to relocate it and if there are available cluster nodes that satisfy the placement criteria, then Oracle Clusterware attempts to start the application on one of these available nodes.
If one or more user-defined attributes have been defined for application resources, then you can specify values for these attributes when relocating an application with the crs_relocate
command. The specified value is passed to the action program as an environment variable with the attribute name.
The actions that Oracle Clusterware takes while relocating an application resource are echoed on the command line. You can also monitor them using the Event Manager (EVM). Standard error and standard output from a resource action program that is started by the crs_relocate
command are redirected to the standard error and standard output for the crs_relocate
command. Note that if the Oracle Clusterware daemon starts an application, then standard error and standard output of the action program is lost. In an action program, you can check for user invocation of the action program using reason codes.
Use the crs_relocate
command with the following syntax:
crs_relocate resource_name [...] [-c cluster_node] [-f] [-q] crs_relocate resource_name [-c cluster_node] [-q] crs_relocate [USR_attribute_name=value] [...] resource_name [-c cluster_node] [-q] crs_relocate -s source_node [-c cluster_node] [-q]
Table D-7 Options on the crs_relocate Command
Option | Description |
---|---|
|
Relocates each indicated application or application resource to the specified node regardless of its placement policy. If required resources are not available on the destination node or if the application resource is restricted from that node, then the |
|
Forces relocation of the specified applications, all applications dependent on them and all applications that they are dependent upon. This option is necessary for relocating any application that requires another application or one that is required by any |
|
Relocates all running applications or application resources from the |
|
Lists information for all resources in a tabular form. |
|
Runs the command in quiet mode (no messages are displayed on the console). |
[ |
When starting the resource, this option sets the named attribute to the given value in the CRS resource's environment. |
The following example relocates an application resource to the node known as rac1
:
crs_relocate postman -c rac1 Attempting to stop `postman` on node `rac2` Stop of `postman` on node `rac1` succeeded Attempting to start `postman` on node `rac1` Start of `postman` on node `rac1` succeeded
The following example attempts to relocate all application resources from node rac2
to node rac1
:
crs_relocate -s rac2 -c rac1 Attempting to stop `postman` on node `rac2` Stop of `postman` on node `rac2` succeeded. Attempting to start `postman` on node `rac1` Start of `postman` on node `rac1` succeeded. Attempting to stop `calc` on node `rac2` Stop of `calc` on node `rac2` succeeded. Attempting to start `calc` on node `rac1` Start of `calc` on node `rac1` succeeded.
If a user-defined attribute USR_DEBUG
has been defined, then the following example runs the stop and start entry point of the action program with the USR_DEBUG
environment variable set to FALSE
. This overrides any value set in the application profile. In the corresponding action program, if you add the following line to the appropriate section of the action program, then you can view the value:
echo $USR_DEBUG
Then issue the following command:
# crs_relocate USR_DEBUG=false database
Modifies the permissions associated with a resource. This command is similar to the chmod
command for Linux and UNIX systems or the Windows desktop options, in this order: File, Properties, Security, and Permissions.
See Also:
The crs_getperm command to obtain the permissions associated with a resourceUse the crs_setperm
command with the following syntax:
crs_setperm resource_name -u aclstring [-q] crs_setperm resource_name -x aclstring [-q] crs_setperm resource_name -o user_name [-q] crs_setperm resource_name -g group_name [-q]
Table D-8 Options on the crs_setperm Command
Option | Description |
---|---|
|
Updates the ACL string. |
|
Deletes the ACL string. |
|
Changes the owner of the resource. Note: Only the |
|
Changes the primary group of the resource. |
|
Runs the command in quiet mode (no messages are displayed on the console). |
|
Is one of the following: user: username :rwxgroup: groupname :r-xother::r-- |
The crs_stat
command provides status information for resources on the cluster nodes. To query resources with the crs_stat
command, the CRS resource permissions must have read and execute permissions (r
and x
permissions on Linux and UNIX systems). An exception is the -g
option, that anyone can use to verify whether a resource exists.
Resources are either ONLINE
or OFFLINE
as shown in the STATE
attribute. An application resource in the ONLINE
state is running successfully on a cluster node. This cluster node is shown indicating its state.
The TARGET
value shows the state to which Oracle Clusterware attempts to set the resource. If the TARGET
value is ONLINE
and a cluster node fails, then Oracle Clusterware attempts to restart the application on another node if possible. If there is a condition forcing a resource STATE
to be OFFLINE
, such as a required resource that is OFFLINE
, then the TARGET
value remains ONLINE
and Oracle Clusterware attempts to start the application or application resource once the condition is corrected.
A TARGET
value for all non-application resources should be ONLINE
unless the resource has a failure count higher than the failure threshold, in which case the TARGET
is changed to OFFLINE
. Oracle Clusterware then treats the resource as if its STATE
were OFFLINE
. If the STATE
is ONLINE
and the TARGET
is OFFLINE
, then you can reset the target value to ONLINE
using the crs_start
command.
The verbose status -v
gives additional information that may be useful, especially for troubleshooting. The RESTART_COUNT
value shows how many times an application resource has been restarted on a single cluster node. The maximum number of restarts before Oracle Clusterware stops restarting the application is equal to RESTART_ATTEMPTS
. FAILURE_COUNT
shows the number of times that a resource has failed within the FAILURE_INTERVAL
defined in the application profile. The maximum number of failures before Oracle Clusterware stops attempting to restart an application is equal to the value set for the FAILURE_THRESHOLD
parameter. If a cluster node fails and applications are waiting to be relocated due to the profile FAILOVER_DELAY
attribute, then the verbose status also shows the FAILOVER_STATUS
field. The FAILOVER_STATUS
field is not shown at any other time. The FAILOVER_STATUS
field shows the node the application failed on and how much time is left waiting for that node to restart before restarting on another node.
Use the crs_stat
command with the following syntax:
crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_node] crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_node] crs_stat -p [resource_name [...]] [-q] crs_stat [-a] resource_name -g crs_stat [-a] resource_name -r [-c cluster_node] crs_stat -f [resource_name [...]] [-q] [-c cluster_node] crs_stat -ls resource_name
To view information about all resources, enter the command with no arguments.
Table D-9 Options on the crs_stat Command
Option | Description |
---|---|
|
Used with the |
|
Displays information about applications or application resources on the specified cluster node. |
|
Displays all information about the resource including extended information ( |
|
Returns |
|
Displays the status in a list (nontabular) format. This is the default format. |
|
Lists resources, owners, and permissions for all resources. |
|
Lists resources, owners, and permissions for a specified resource. |
|
Displays the status of the in-memory profile for the specified resources. If no resources are specified, then the status of the in-memory profile for all registered resources is displayed. If a resource is not registered, its status is not displayed. |
|
Runs the command in quiet mode (no messages are displayed on the console). |
|
Returns |
|
Lists information for all resources in a tabular form. |
|
Lists how many times a resource has been restarted or has failed within the resource failure interval, the maximum number of times that a resource can be restarted or can fail, and the target state of the application. Also, this option lists normal status information. This option displays extended information about the status of resources. Extra attributes shown include |
The following example displays the status information for the postman
application:
crs_stat postman NAME=postman TYPE=application TARGET=ONLINE STATE=ONLINE on rac2
The following example displays the status information in a tabular form:
crs_stat -t Name Type Target State Host ---------------------------------------------------------------- cluster_lockd application ONLINE ONLINE rac2 dhcp application OFFLINE OFFLINE
The following example shows the output for the crs_stat
command with the -v
option for the node rac2
:
crs_stat -v NAME=cluster_lockd TYPE=application RESTART_ATTEMPTS=30 RESTART_COUNT=0 FAILURE_THRESHOLD=0 FAILURE_COUNT=0 TARGET=ONLINE STATE=ONLINE on rac2
The crs_start
command sets an application or application resource target state to ONLINE
and attempts to start specified registered applications or application resources. The target state is the state that Oracle Clusterware attempts to achieve. Also, see the "Security and Permissions" section for information about the privileges required for this command.
There are several user-defined attributes available for starting an application with crs_start
. The specified value is passed to the action program as an environment variable with the attribute name.
If you do not specify one node on which to start the application and there are available cluster nodes that satisfy the placement criteria, then Oracle Clusterware attempts to start the application on one of the available nodes. You must stop a resource that has failed before restarting it. You should also confirm why your action program is failing.
The crs_start
command starts dependent resources as defined in the application profile REQUIRED_RESOURCE
fields. After a registered resource is started, you must use the crs_stop
command to end its execution.
The crs_start
command displays status messages and if there are problems starting an application, then feedback is displayed. Standard error and standard output from a resource action program invoked by the crs_start
command are redirected to the standard error and standard output for crs_start
. Note that if the CRS daemon starts an application, then standard error and standard output of the action program is lost. Within an action program, you can check for user invocation of the action program using reason codes.
Use the crs_start
command with the following syntax:
crs_start resource_name [...] [-c cluster_node] [-q] [-f] crs_start -all [-q] crs_start [USR_attribute_name=value] [...] resource_name [-c node_name] [-q]
For resource_name
[...], the names are as specified in an application profile of one or more resources to be started. The resource must be registered with Oracle Clusterware.
Table D-10 Options On the crs_start Command
Option | Description |
---|---|
|
Starts all registered Oracle Clusterware applications or application resources on active cluster nodes, according to their placement policies and required resource lists. |
|
Starts each indicated resource on the specified node if the cluster node is enabled by the placement policy and resource dependencies. If the cluster node specified is not enabled by the placement policy and resource dependencies, then the |
|
Forces starting of a specified application or application resource if all of the required resources are available or can be started. Any applications or application resources in the specified application profile's required resource list are started if not currently running or are relocated if they are running on another cluster node. Use this option with only one specified application resource at a time. |
-q |
Runs the command in quiet mode (no messages are displayed on the console). |
[ |
The following example starts an application named postman
:
crs_start postman Attempting to start `postman` on node `rac1` Start of `postman` on node `rac1` succeeded.
The following example starts the application on a specific cluster node rac2
:
crs_start -c rac2 postman Attempting to start `postman` on node `rac2` Start of `postman` on node `rac2` succeeded.
Stops an application on the specified node. You can run the crs_stat
command to verify that the application you specify is stopped.
Use the crs_stop
command with the following syntax:
crs_stop resource_name [...] [-f] [-q] crs_stop -c cluster_node [...] [-q] crs_stop -all [-q] crs_stop [USR_attribute_name=value] [...] resource_name [-q] -c cluster_node [...]
Specifies one or more active cluster nodes on which to stop all of the applications or application resources. You can use the options described in Table D-11:
Table D-11 Options on the crs_stop Command
Option | Description |
---|---|
|
Stops all registered Oracle Clusterware applications or application resources on active cluster nodes. |
|
Stops applications or application resources on the specified cluster node. |
|
Forces termination of the indicated applications or application resources and all application resources dependent on the specified resources. This option is useful to stop all application resources when the |
-q |
Runs the command in quiet mode (no messages are displayed on the console). |
The crs_unregister
command removes the registration information of Oracle Clusterware resources from the binary Oracle Clusterware registry database. Oracle Clusterware will no longer acknowledge this resource. An application associated with a resource that is unregistered is no longer highly available. Also, see the "Security and Permissions" section for information about the privileges required for this command.
Upon successful completion of the crs_unregister
command, the resource is removed from the online Oracle Clusterware environment. You cannot unregister a resource that is a required resource for another resource. You must stop the resource by using the crs_stop
command before unregistering it.
Use the crs_unregister
command with the following syntax:
crs_unregister resource_name [...] [-f] [-q]
You can use the options described in Table D-12:
Table D-12 Options on the crs_unregister Command
Option | Description |
---|---|
|
Forces removal of the indicated applications or application resources and all application resources dependent on the.indicated resource. This option is useful to unregister all application resources when the |
|
Runs the command in quiet mode (no messages are displayed on the console). |
The APIs described in this section provide access to operational control of resources that Oracle Clusterware manages. The API is used to register user applications to the Oracle Clusterware system so that they can be managed by Oracle Clusterware and made highly available. When an application is registered, the application can be started and its state queried. If the application is no longer to be run, it can be stopped and unregistered from Oracle Clusterware. The Oracle Clusterware services are provided by another process, such as the CRSD
process, running outside the database server. These APIs communicate with the CRSD
process using an IPC mechanism.
Note:
You can install the Oracle Clusterware high availability Application Programming Interface (API) from the Oracle Database client installation media.Initializes a context for communications with Oracle Clusterware.
ctx
—Context to initialize, caller allocated storage
errf
—A Callback function for the error info, or NULL
errCtx
—Context for the error callback func, or NULL
flags
—CLSCRS_FLAG_TRACE
, to enable tracing of lower layers
CLSCRS_FLAG_USETHREADS
—Enables using the clscrs
context in multiple threads
Returns the correct node name. If you issue this command within a configured cluster, then this is the name as known to the clusterware. If not in a cluster, then the name is as known through other clusterware means. Getting a node name may require a lot of resources in the first call, especially if CLSCRS
was not initialized with a preexisting CSS context.
Creates a call environment describing the parameters to the Oracle Clusterware calls. The memory is owned by clscrs
which is released by a call to clscrs_env_delete
.
Sets an attribute or value argument in an environment for the Oracle Clusterware calls; the value may be NULL
.
Deletes an environment for the Oracle Clusterware calls. The environment must be created again before use. You cannot delete an environment and then set new parameters.
Direct Oracle Clusterware to start a named set of resources. If a host is specified, then start there, otherwise start according to the placement policy for the resources in question. If the flag is async
, then msgf
is never called and Oracle returns the OK
status after initiating the call to Oracle Clusterware, and the actual starts are performed asynchronously, and msgf
will never be called. If flag is not async
and msgf
is not NULL
, then msgf
will be driven one line at a time with collected output from the start programs.
ctx
—The context
names
—The resource(s) to start
num_names
—The number of resources in names[] to start
host
—The host name on which to start the resource, may be NULL
env
—Environment arguments to start
msgf
—User message callback, may be NULL
msgp
—User callback argument, may be NULL
msgf
—Callback function
msgf
—Callback function
Directs Oracle Clusterware to stop a named set of resources. The flag enables async
stop.
Direct Oracle Clusterware to run the check actions for the identified resources. A delay can be specified to indicate a time to wait in seconds before the check action is performed on the server. This occurs after the call returns. This can be used to let something run before performing the check. For each resource identified by the in_splist
, a status will be returned in the op_status
, indicating whether the resource exists and whether the caller has permission to invoke operations on the resource. A resource that is explicitly named with no pattern matching will have a NOTFOUND
error. A pattern that has no matches will return no error. There will be no valid attributes returned for the resources. There is no way of knowing exactly when the checks will actually be run or be completed. Returns SUCCESS
if the operation status of all of the identified resources is SUCCESS
, otherwise FAILURE
and specific status will be found in the op_status
entries. The caller must create the op_status
list before the call and destroy it when done.
Register the resources in the input resource list. The attributes for the resources are encapsulated in the input resource list. The output op_status
list contains the results of the register operation for each resource and contains no valid resource attributes. The caller must create and populate the in_reslist
and must create the op_status
list. Both the lists must be destroyed by the caller. The op_status
list cannot be reused with another API call, you must create and destroy it for each API call.One or more attributes of an already registered resource can be modified by passing the CLSCRS_FLAG_REG_UPDATE
flag. The flags apply to all resources in the input reslist.
in_reslist [in]
—List of resources to be registered
flags [in]
—CLSCRS_FLAG_REG_UPDATE
or 0
op_status [out]
—Resource list holding the status of the register operation for each resource
Unregisters the resources in the input list of resource names. The output op_status
list contains the results of the unregister operation for each resource. The caller must create and populate the rqlist
and must create the op_status
list. Both the lists must be destroyed by the caller. The op_status
list cannot be reused with another API call. You must create and destroy it for each API call.
rqlist [in]
—List of resources names to be unregistered
flags [in]
—Option flags
op_status [out]
—Resource list holding the status of the unregister operation for each resource
Obtains information about the resources identified in rqlist
. The resources can be restricted to a specific node given in the nodename parameter. The information is returned in the output out_reslist
.If the rqlist
is NULL
, information about all registered resources is returned. If the node name is not NULL
, the result is restricted to resources running on the specific node. Otherwise, all nodes in the cluster are considered.The res_flags
are used to scope the resource domain that is matched. There are no values for this parameter. The res_attrs
identifies the attributes to be returned in the out_reslist
. The caller may create a specific list of attributes of interest or use a predefined list returned by one of the macros CLSCRS_ATTRS_NONE
, CLSCRS_ATTRS_ALL
, CLSCRS_ATTRS_STATE
, CLSCRS_ATTRS_SHORT
. The attribute list applies to all resources identified by the rqlist
. Any errors for a resource are returned in the output out_reslist
.
rqlist [in]
—List of resource names to query
nodename [in]
—Query resources running only on the given node (optional, may be NULL
)
res_attrs [in]
—List to specify the attributes to be returned for each resource
res_flags [in]
—Flags to restrict the resources being matched
out_reslist [out]
—List holding the returned resource information
This section describes functions for creating, managing, and destroying resources and the attributes associated with resources. The following structures are used in this section:
clscrs_sp
—This is a stringpair (sp
) structure. It contains a name and a value string. The value may be NULL
. It is created and destroyed and its contents can be examined and the value replaced. An sp
may be a member of exactly one stringpair list (splist
).
clscrs_splist
—This stringpair list (splist
) is a list of zero or more stringpairs used in various contexts. Sometimes the list contains names and values, sometimes the list contains only names. The list is created and destroyed; members can be retrieved by name, added, deleted, replaced, and the list can be traversed with first
and next
operations.
clscrs_res
—This represents a resource abstraction that contains the name of a resource and additional data about the context in which it is used. Sometimes it contains resource attribute data and other times it contains status and return message about an operation. A resource may be in exactly one resource list.
clscrs_reslist
—This resource list is an abstraction used to contain information about zero or more resources. A resource list is created, appended, iterated over, and destroyed.
This section describes the following export operations:
This section describes the stringpair operations.
Changes the value part of a stringpair. The new value may be NULL
. After the call returns, the memory of the value can be recycled.
Parameters
sp [in]
—Stringpair for which you want to set a value
value [in]
—Value component of the stringpair (may be NULL
)
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the sp argument is NULL
Syntax
clscrsret clscrs_sp_set(clscrs_sp *sp, const oratext *value);
Gets the name and value components of a stringpair.
Parameters
sp [in]
—Stringpair for which the name and value are being obtained
name [out]
—Name component of the stringpair
value [out]
—Value component of the stringpair (may be NULL
)
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADARG
if the sp argument is NULL
Syntax
clscrsret clscrs_sp_get(clscrs_sp *sp, oratext **name, oratext **value);
Gets the value component of a stringpair.
Parameters
sp [in]
—Stringpair for which the name and value are being obtained
value [out]
—Value component of the stringpair (may be NULL
)
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the sp
argument is NULL
Syntax
clscrsret clscrs_sp_get_value(clscrs_sp *sp, oratext **value);
This section describes the splist
operations.
Creates a new stringpair list. The memory for the splist
is allocated by the function.
Parameters
ctx [in]
—clscrs context
splist [out]
—The new stringpair list created
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADCTX
if the context is NULL
Syntax
clscrsret clscrs_splist_create(clscrs_ctx *ctx, clscrs_splist **splist);
Creates a new stringpair list (splist
) and set the name and value for the first stringpair in the list. The memory for the splist
is allocated by the function.
Parameters
ctx [in]
—clscrs context
name [in]
—Name component of the stringpair
value [in]
—Value component of the stringpair (may be NULL
)
sp [out]
—The new stringpair created
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADCTX
if the context is NULL
clscrsretBADARG
if the name argument is NULL
Syntax
clscrsret clscrs_splist_create_and_set(clscrs_ctx *ctx, const oratext *name, const oratext *value, clscrs_splist **splist);
Adds a new stringpair (sp
) to a stringpair list (splist
).
Parameters
splist [in]
—splist
to add the new {name, value}
stringpair.
name [in]
—Name component of the stringpair
value [in]
—Value component of the stringpair (may be NULL
)
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADARG
if the name argument is NULL
Syntax
clscrsret clscrs_splist_append(clscrs_splist *splist, const oratext *name, const oratext *value);
Gets the first stringpair (sp
) from a stringpair list (splist
).
Parameters
name [in]
—splist
to get the first sp
from
sp [out]
—The first sp
from the given splist
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the splist is NULL
clscrsretEMPTY
if there are no stringpair elements in the splist
Syntax
clscrsret clscrs_splist_first(clscrs_splist *splist, clscrs_sp **sp);
Gets the current next stringpair (sp
) from a stringpair list (splist
). This function is called to iterate over the stringpairs in a splist
.
Parameters
name [in]
—splist
to get the next sp
from
sp [out]
—The next sp
{name, value} in the given splist
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the splist is NULL
clscrsretENDLIST
if there are no more stringpair elements in the splist
Syntax
clscrsret clscrs_splist_next(clscrs_splist *splist, clscrs_sp **sp);
Replaces the value for a stringpair (sp
) in a stringpair list (splist
).
Parameters
splist [in]
—Splist
to add the new {name, value} stringpair.
name [in]
—Name for which the value is being replaced.
value [in]
—Replacement value for the name (may be NULL
)
Returns
clscrsretSUCC
on successclscrsretBADARG
if the name argument is NULL
clscrsretBADARG
if the name argument is NULL
clscrsretBADARG
if the name argument is NULL
Syntax
clscrsret clscrs_splist_replace(clscrs_splist *splist, const oratext *name, const oratext *value);
Deletes a stringpair (sp
) from a stringpair list (splist
).
Parameters
splist [in]
—Splist
from which to delete the {name, value}
stringpair.
splist [in]
—Name to be deleted from the given splist
.
Returns
clscrsretSUCC
on success
clscrsretNONAME
if there is no stringpair matching the given name
clscrsretBADARG
if the name argument is NULL
Syntax
clscrsret clscrs_splist_delete_sp(clscrs_splist *splist, const oratext *name);
Finds the value for a stringpair (sp
) in a stringpair list (splist
).
Parameters
splist [in]
—Splist
to look into
name [in]
—Name for which the value is looked up
value [out]
—Value associated with the given name in the given splist
Returns
clscrsretSUCC
on success
clscrsretNONAME
if there is no stringpair matching the given name
clscrsretBADARG
if the name argument is NULL
Syntax
clscrsret clscrs_splist_find(clscrs_splist *splist, const oratext *name, oratext **value);
Counts the number of stringpairs (sp
) in a stringpair list (splist
).
Parameters
splist [in]
—Splist
to count the number of stringpairs.
count [out]
—The number of stringpairs in the given splist
.
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the splist is NULL
Syntax
clscrsret clscrs_splist_count(clscrs_splist *splist, ub4 *count);
Frees the memory for a stringpair list (splist
).
Parameter
splist [in]
—Splist
to destroy
Returns
clscrsretSUCC
on success
Syntax
clscrsret clscrs_splist_destroy(clscrs_splist **splist);
Creates a new resource. The memory for the resource structure is allocated by the function. The memory is freed when a resource list (clscrs_reslist
) is destroyed through clscrs_reslist_destroy()
.
Parameters
ctx [in]
—clscrs
context
resname [in]
—Name of the resource
res [out]
—The new resource created
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADCTX
if the context is NULL
clscrsretBADARG
if the resource name is NULL
Syntax
clscrsret clscrs_res_create(clscrs_ctx *ctx, const oratext *resname, clscrs_res **res);
Gets the name of a resource.
Parameters
res [in]
—Resource for which the name is obtained
name [out]
—Name of the resource
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the resource argument is NULL
Syntax
clscrsret clscrs_res_get_name(clscrs_res *res, oratext **name);
Sets a resource attribute for a resource.
Paramters
res [in]
—Resource for which the attribute is set
attrname [in]
—Name of the resource attribute
value [in]
—Value for the resource attribute (may be NULL
)
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the attribute name is NULL
clscrsretNOMEM
if no memory can be allocated
Syntax
clscrsret clscrs_res_set_attr(clscrs_res *res, const oratext *attrname, const oratext *value);
Gets a resource attribute for a resource.
Parameters
res [in]
—Resource for which the attribute is obtained
attrname [in]
—Name of the resource attribute
value [out]
—Value for the resource attribute
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the attribute name is NULL
clscrsretNOMEM
if no memory can be allocated
Syntax
clscrsret clscrs_res_get_attr(clscrs_res *res, const oratext *attrname, oratext **value);
Gets the attribute list for a resource. The attribute list is a list of stringpairs. The client does not allocate the memory for attribute list.
Paramters
res [in]
—Resource for which the attribute list
attrlist [out]
—List of attributes for the given resource
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the resource is NULL
clscrsretNOMEM
if no memory can be allocated
clscrsretNOATTRS
if there are no attributes set for the resource
Syntax
clscrsret clscrs_res_get_attr_list(clscrs_res *res, clscrs_splist **attrlist);
Sets the attribute list for a resource. The attribute list is a list of stringpairs. The list is created from the clscrs_splist_create
call.
Parameters
res [in]
—Resource for which the attribute list is set
attrlist [in]
—List of attributes to be set for the given resource
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the resource is NULL
Syntax
clscrsret clscrs_res_set_attr_list(clscrs_res *res, clscrs_splist *attrlist);
Gets the number of attributes for a resource.
Parameters
res [in]
—Resource for which number of attributes is obtained
count [out]
—Number of attributes for the given resource
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the resource is NULL
Syntax
clscrsret clscrs_res_attr_count(clscrs_res *res, ub4 *count);
Gets the status of an operation for a resource. The memory for the msg is allocated by the function.
Parameters
res [in]
—Resource for which the operation status is obtained
status [out]
—Status of an operation on the given resource
msg [out]
—Text message for the result of an operation on the resource
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretNOMSG
if there is no msg available
clscrsretBADARG
if the resource is NULL
Syntax
clscrsret clscrs_res_get_op_status(clscrs_res *res, CLSCRS_STAT *status, oratext **msg);
Gets the registration status of a resource.
Parameters
res [in]
—Resource for which the operation status is set
registered [out]
—Boolean indicating whether the resource is registered
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADARG
if the resource is NULL
Syntax
clscrsret clscrs_res_get_registered(clscrs_res *res, boolean *registered);
Gets the nodelist currently hosting the resource, or NULL
if there is no host for the resource or there are no attributes. The caller need not allocate memory for the nodelist.
Parameters
res [in]
—Resource for which the nodelist is obtained
nodelist [out]
—Splist
holding the node(s)
Returns
clscrsretSUCC
on success
clscrsretBADARG
if the resource is NULL
Syntax
clscrsret clscrs_res_get_node_list(clscrs_res *res, clscrs_splist **nodelist);
Frees the memory for a resource.
Parameter
res [in]
—Resource for which the memory is freed
Returns
clscrsretSUCC
on success
Syntax
clscrsret clscrs_res_destroy(clscrs_res **res);
Creates a new resource list. The memory for the resource list is allocated by the function.
Parameters
ctx [in]
—clscrs
context
reslist [out]
—Resource list (empty) that is created
Returns
clscrsretSUCC
on success
clscrsretNOMEM
if no memory can be allocated
clscrsretBADCTX
if the context is NULL
Syntax
clscrsret clscrs_reslist_create(clscrs_ctx *ctx, clscrs_reslist **reslist);
Adds a resource to a resource list.
Parameters
reslist [in]
—Resource list to add the resource to
res [in]
—Resource to add
Returns
clscrsretSUCC
on success
clscrsretBADARG
if reslist is NULL
clscrsretRESEXISTS
if the resource already exists in reslist
Syntax
clscrsret clscrs_reslist_append(clscrs_reslist *reslist, clscrs_res *res);
Gets the first resource on a resource list.
Parameters
reslist [in]
—Resource list for which the first resource is obtained
res [out]
—The first resouce on the resource list
Returns
clscrsretSUCC
on success.
clscrsretBADARG
if reslist is NULL
clscrsretEMPTY
if there are no resources in the list
Syntax
clscrsret clscrs_reslist_first(clscrs_reslist *reslist, clscrs_res **res);
Gets the current next resource from the resource list. This function is called to iterate over the resources in a resource list.
Parameters
reslist [in]
—Resource list for which the first resource is obtained
res [out]
—The next resouce on the resource list
Returns
clscrsretSUCC
on success
clscrsretBADARG
if reslist is NULL
clscrsretENDLIST
if there are no more resources in the list
Syntax
clscrsret clscrs_reslist_next(clscrs_reslist *reslist, clscrs_res **res);
Finds a resource in a resource list.
Parameters
reslist [in]
—Resource list (empty) that is created
name [in]
—Name of the resource that is being obtained
res [out]
—The resouce corresponding to the given name
Returns
clscrsretSUCC
on success
clscrsretNORES
if the resource is not found
clscrsretBADARG
if reslist or name is NULL
Syntax
clscrsret clscrs_reslist_find(clscrs_reslist *reslist, const oratext *name, clscrs_res **res);
Counts the number of resources in a resource list.
Parameters
reslist [in]
—Resource list for which the count is obtained
count [out]
—Number of resources in the resource list
Returns
clscrsretSUCC
on success
clscrsretBADARG
if reslist is NULL
Syntax
clscrsret clscrs_reslist_count(clscrs_reslist *reslist, ub4 *count);
Deletes a resource from a resource list.
Parameters
reslist [in]
—Resource list from which to delete the resource
name [in]
—Name of the resource to delete
Returns
clscrsretSUCC
on success
clscrsretBADARG
if reslist or name is NULL
clscrsretNORES
if the resource is not in reslist
Syntax
clscrsret clscrs_reslist_delete_res(clscrs_reslist *reslist,
Frees the memory for a resource list.
Parameters
reslist [in]
—Resource list for which the memory is to be freed
Returns
clscrsretSUCC
on success
Syntax
clscrsret clscrs_reslist_destroy(clscrs_reslist **reslist);
Retrieves the error message corresponding to the return codes from a clscrs
API. The memory for the error message is allocated by the caller. If the buffer is not large enough, the length is returned in msg_len
.
Parameters
ctx [in]
—clscrs
context
err_code [in]
—Error code returned from the clscrs
API
msg [out]
—Message corresponding to err_code
msg_len [inout
]—Length of the message buffer.
Returns
clscrsretSUCC
on success
Syntax
clscrsret clscrs_get_error_message(clscrs_ctx *ctx, clscrsret err_code, oratext *msg, sb4 msg_len);
Gets the list of attributes corresponding to an attribute group identifier.
Parameters
ctx [in]
—clscrs
context
attrgrp [in]
—Attribute group that identifies a group of attributes
attrlist [out]
—List of attributes returned that corresponds to the attribute group
Returns
clscrsretSUCC
on success
Syntax
clscrs_splist* clscrs_get_fixed_attrlist(clscrs_ctx *ctx, clscrs_attr_grp attrgrp);
This section describes resource functions. The clscrs_res
resource abstraction contains the name of a resource and additional data appropriate to the context in which it is used. Sometimes it carries status and error return information about an operation. Other times it contains attribute data as input to an operation. A resource may be in exactly one resource list. If so, its successor may be found with the NEXT
operation.
CLSCRSRET clscrs_res_create(clscrs_cts *ctx, const oratext *resname, clscrs_res **res)
Creates a single resource and fills in a handle to it. The resname
must be provided, and cannot be NULL
.
CLSCRSRET clscrs_res_get_name (clscrs_res *res, oratext **name);
Returns a pointer to the name of a resource. The returned name pointer is only valid as long as the resource exists.
CLSCRSRET clscrs_res_get_op_status (clscrs_res *res, CLSCRS_STAT *stat, oratext **msg)
If there is a valid operation error value in the resource, fills in the stat and the pointer to an error message and returns SUCCESS
. May fill in a NULL
for the msg. If there is no valid operation status, returns INVALID
.
clscrs_splist *clscrs_res_get_node_list(clscrs_res *res);
Returns an splist
holding the nodes currently hosting the resource, or NULL
if there is no host for the resource or there are no attributes. The count of the list may obtained and the list iterated. The list is owned by the resource and will be destroyed when the resource is destroyed. This operation is a special case, interpreting the semantics of the attribute or attributes that may hold the current hosting member list. There is no specified ordering of the list.
CLSCRSRET clscrs_res_get_attr(clscrs_res *res, const oratext *attrname, oratext **value);
Fills in a pointer to the value of the attribute with the given name and returns SUCCESS
if found, or FAILURE
if the name is not present in the attribute set of the resource, and INVALID
if there is no attribute list in the resource. May assert if given an invalid resource handle.
CLSCRSRET clscrs_res_set_attr(clscrs_res *res, oratext *attrname, oratext *value);
Sets the value of the attribute with the given name and returns SUCCESS
or FAILURE
if the name is not present in the attribute set of the resource. If the attribute already exists, then its current value will be replaced. On return, the memory for the name and value may be recycled.
CLSCRSRET clscrs_res_attr_count(clscrs_res *res, ub4 *count);
Fills in the number of attributes that will be returned with a scan using an attrIter
. Returns SUCCESS
if there are attributes. If there are no attributes, returns INVALID
, but still sets the count to zero.
CLSCRSRET clscrs_res_get_attr_list(clscrs_res *res, clscrs_splist **attrlist);
Returns an splist
for the attributes of the resource, allowing next()
operations for a scan. The list is owned by the resource, which will destroy it when the resource is destroyed. Returns SUCCESS
if there is an attribute list, or INVALID
if there is not one in the resource. There is no specified ordering of the list.
This section describes the resource list operations. The clscrs_reslist
resource list is an abstraction that contains information about zero or more resources. A list is created, appended, iterated over, and destroyed.
CLSCRSRET clscrs_reslist_create(clscrs_ctx *ctx, clscrs_reslist **reslist)
Creates a resource list and fills a handle.
CLSCRSRET clscrs_reslist_count(clscrs_reslist *reslist, ub4 *count)
Fills a count of the number of resources in a list.
CLSCRSRET clscrs_reslist_first(clscrs_reslist *reslist, clscrs_res **first)
Fills a handle to the first resource in the list of resources. If the list is empty, fill in NULL
.
CLSCRSRET clscrs_reslist_next(clscrs_reslist *reslist, clscrs_res **next)
Fills a handle to the next resource in the list of resources. If the list is empty, fill in NULL
.
CLSCRSRET clscrs_reslist_find(clscrs_reslist *reslist, const oratext *name, clscrs_res **res)
Finds a resource by name in a reslist
, and fill in a handle to the one located. If the resource is not found, fill in NULL
. Does an exact match lookup with no pattern matching.
CLSCRS_RES *clscrs_reslist_destroy(clscrs_res *res)
Deletes a resource list and all of the resources that it currently contains.