This procedure provides the long forms of the Oracle Solaris Cluster maintenance commands. Most commands also have short forms. Except for the forms of the command names, the commands are identical.
Before You Begin
Ensure that the following prerequisites are met:
The /etc/netmasks file has IP-address subnet and netmask entries for all logical hostnames. If necessary, edit the /etc/netmasks file to add any missing entries.
If you are using a volume manager, the volume manager of the cluster is configured to provide volumes on shared storage that are accessible from any Oracle Solaris Cluster node where Oracle Database software could potentially run.
If you are using a volume manager, raw devices and file systems on the storage volumes that Oracle Database software will use for its database are created.
Oracle Database software is installed to be accessible from all cluster nodes where Oracle Database could potentially run.
Kernel variables for the UNIX operating system are configured for Oracle Database.
Oracle Database software is configured for all cluster nodes that could potentially run Oracle Database.
The data service packages are installed.
Ensure that you have the following information:
The names of the cluster nodes that master the data service.
The logical hostname that clients use to access the data service. Normally, you set up this IP address when you install the cluster. See the Oracle Solaris Cluster 4.3 Concepts Guide for details about network resources.
The path to the Oracle Database application binaries for the resources that you plan to configure.
The database type.
For HA for Oracle Database, you register two resource types, SUNW.oracle_server and SUNW.oracle_listener, as follows.
# clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener
This step is not required if you use the Oracle Solaris ZFS file system, because the resource group was created when the highly available local ZFS file system was configured in How to Prepare the Oracle Solaris Cluster Nodes. The resources that are created in other steps in this procedure are to be added to this resource group.
You can optionally select the set of cluster nodes on which the data service can run with the –n option, as follows.
# clresourcegroup create [-n node-zone-list] resource-group
Specifies the name of the resource group. This name can be your choice but must be unique for resource groups within the cluster.
You should have performed this verification during the Oracle Solaris Cluster installation.
# clreslogicalhostname create -g resource-group [-h logical-hostname] logical-hostname-rs
Specifies a logical hostname. This logical hostname must be present in your name service database. If logical-hostname and logical-hostname-rs are identical, logical-hostname is optional.
Specifies the name that you are assigning to the logical hostname resource that you are creating.
# clresourcetype register SUNW.HAStoragePlus
![]() | Caution - Raw devices from Oracle Solaris Cluster device groups are not supported in non-global zones. |
# clresource create -g resource-group -t SUNW.HAStoragePlus \ -p GlobalDevicePaths=device-path \ -p FilesystemMountPoints=mount-point-list \ -p AffinityOn=TRUE hastp-rs
You must set either the GlobalDevicePaths extension property or the FilesystemMountPoints extension property:
If your database is on a raw device, set the GlobalDevicePaths extension property to the global device path.
If your database is on the cluster file system, specify mount points of the cluster file system and the local file system.
The resource is created in the enabled state.
# clresourcegroup online -M resource-group
Places the resource group that is brought online in a managed state.
Create Oracle Database application resources in the failover resource group.
For a far sync instance without Oracle Grid Infrastructure the administrator only has to specify the following:
# clresource create -g resourcegroup \ -t SUNW.oracle_server \ -p Oracle_home=Oracle_home \ -p Oracle_sid=instance \ -p Dataguard_role=FAR_SYNC \ [-p Restart_type=entity-to-restart] \ [-p Resource_dependencies_offline_restart=storageplus-resource] \ resource
Oracle Database server resource:
# clresource create -g resourcegroup \ -t SUNW.oracle_server \ -p Alert_log_file=path-to-log \ -p Connect_string=authentication-string \ -p Oracle_sid=instance \ -p Oracle_home=Oracle_home \ -p Restart_type=entity-to-restart \ [-p Dataguard_role=role] \ [-p Standby_mode=mode] \ -p Resource_dependencies_offline_restart=storageplus-resource \ resource
Oracle Database listener resource:
# clresource create -g resource-group \ -t SUNW.oracle_listener \ -p Listener_name=listener \ -p Oracle_home=Oracle_home \ -p Resource_dependencies_offline_restart=storageplus-resource \ resource
Specifies the name of the resource group into which the resources are to be placed.
Specifies the type of the resource to add.
Sets the path under $ORACLE_HOME for the server message log.
Specifies one of the following methods to securely connect to the database:
/@${ORACLE_SID} – An Oracle wallet authentication.
user/passwd – The user name and password. These settings must agree with the permissions that you set up in How to Set Up Oracle Database Permissions. If you use Oracle Solaris authorization, type a slash (/) instead of the user name and password.
Sets the Oracle Database system identifier.
Sets the path to the Oracle Database home directory.
Sets the name of the Oracle Database listener instance. This name must match the corresponding entry in listener.ora.
Specifies the entity that the server fault monitor restarts when the response to a fault is restart. Set entity-to-restart as follows:
To specify that only this resource is restarted, set entity-to-restart to RESOURCE_RESTART. By default, only this resource is restarted.
To specify that all resources in the resource group that contains this resource are restarted, set entity-to-restart to RESOURCE_GROUP_RESTART.
If you set entity-to-restart to RESOURCE_GROUP_RESTART, all other resources (such as Apache or DNS) in the resource group are restarted, even if they are not faulty. Therefore, include in the resource group only the resources that you require to be restarted when the Oracle Database server resource is restarted.
Specifies the role of the database instance. Change role as follows:
To create a resource for a primary database instance that does not have standby instances configured, change role to NONE. This value is the default value.
To create a resource for a primary database instance that has standby database instances configured, change role to PRIMARY.
To create a resource for a standby database instance, change role to STANDBY.
To create a resource for a far sync database instance, change role to FAR_SYNC.
Specifies the mode for the standby database instance. If you change Dataguard_role to NONE or PRIMARY, the value of the Standby_mode is ignored.
To specify a logical standby database, change mode to LOGICAL. This value is the default value.
To specify a physical standby database, change mode to PHYSICAL.
To specify a snapshot standby database, change mode to SNAPSHOT.
Specifies the name of the resource that you are creating.
The resources are created in the enabled state.
This example shows how to register HA for Oracle Database on a two-node cluster. The following are the sample names used in the commands:
phys-schost-1, phys-schost-2
schost-1
resource-group-1 (failover resource group)
hastp-rs
oracle-server-1, oracle-listener-1
ora-lsnr (listener), ora-srvr (server)
/@ora-srvr
Create the failover resource group to contain all of the resources. # clresourcegroup create resource-group-1 Add the logical hostname resource to the resource group. # clreslogicalhostname create -g resource-group-1 schost-1 Register the SUNW.HAStoragePlus resource type. # clresourcetype register SUNW.HAStoragePlus Add a resource of type SUNW.HAStoragePlus to the resource group. # clresource create -g resource-group-1 \ -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=/global/oracle,/global/ora-data/logs,/local/ora-data \ -p AffinityOn=TRUE \ hastp-rs Bring the resource group online in a managed state # clresourcegroup online -M resource-group-1 Register the Oracle Database resource types. # clresourcetype register SUNW.oracle_server # clresourcetype register SUNW.oracle_listener Add the Oracle Database application resources to the resource group. # clresource create -g resource-group-1 \ -t SUNW.oracle_server \ -p Alert_log_file=/global/oracle/message-log \ -p Connect_string=/@ora-srvr \ -p Oracle_home=/global/oracle \ -p Oracle_sid=ora-srvr \-p Dataguard_role=STANDBY \ -p Standby_mode=PHYSICAL \ -p Resource_dependencies_offline_restart=hastp-rs \ oracle-server-1 # clresource create -g resource-group-1 \ -t SUNW.oracle_listener \ -p Oracle_home=/global/oracle \ -p Listener_name=ora-lsnr \ oracle-listener-1Example 2 Registering HA for Oracle Database to Run in a Zone Cluster
This example shows how to register HA for Oracle Database in a zone cluster. The following are the sample names used in the commands, which are issued from the global cluster:
phys-schost-1, phys-schost-2
zonecluster1, zonecluster2
zchost-1
resource-group-1 (failover resource group)
hastp-rs
oracle-server-1, oracle-listener-1
ora-lsnr (listener), ora-srvr (server)
scott/tiger
Create the failover resource group to contain all of the resources.) # clresourcegroup create -Z zonecluster1 resource-group-1 Add the logical hostname resource to the resource group.) # clreslogicalhostname create -Z zonecluster1 -g resource-group-1 zchost-1 Register the SUNW.HAStoragePlus resource type.) # clresourcetype register -Z zonecluster1 SUNW.HAStoragePlus Add a resource of type SUNW.HAStoragePlus to the resource group.) # clresource create -Z zonecluster1 \ -g resource-group-1 \ -t SUNW.HAStoragePlus \ -p FileSystemMountPoints=/global/oracle,/global/ora-data/logs,/local/ora-data \ -p AffinityOn=TRUE \ hastp-rs Bring the resource group online in a managed state # clresourcegroup online -Z zonecluster1 -M resource-group-1 Register the Oracle Database resource types.) # clresourcetype register -Z zonecluster1 SUNW.oracle_server # clresourcetype register -Z zonecluster1 SUNW.oracle_listener Add the Oracle Database application resources to the resource group.) # clresource create -Z zonecluster1 \ -g resource-group-1 \ -t SUNW.oracle_server \ -p Alert_log_file=/global/oracle/message-log \ -p Connect_string=scott/tiger \ -p Oracle_home=/global/oracle \ -p Oracle_sid=ora-srvr \ -p Dataguard_role=STANDBY \ -p Standby_mode=PHYSICAL \ oracle-server-1 # clresource create -Z zonecluster1 \ -g resource-group-1 \ -t SUNW.oracle_listener \ -p Oracle_home=/global/oracle \ -p Listener_name=ora-lsnr \ oracle-listener-1