# clresourcetype register SUNW.sapdb
Ensure that the SAP MaxDB resource depends on the following resources:
The HAStoragePlus resource for the global device group on which SAP MaxDB is installed.
The SAP xserver resource.
When you create this resource, specify the following information about the SAP MaxDB database instance. This information is created when SAP MaxDB is installed and configured as explained in Installing and Configuring SAP MaxDB.
The name of the SAP MaxDB database.
The UNIX user identity of the OS user who administers the SAP MaxDB database instance.
The user key of the database user who administers the SAP MaxDB database instance.
# clresource create -d -g sapdb-rg \ -t SUNW.sapdb \ -p DB_Name=db-name \ -p DB_User=os-sapdb-adm-user \ -p User_Key=sapdb-adm-key \ -p Resource_dependencies_offline_restart=storage-resource \ -p Resource_dependencies=rest-of-the-tree
Specifies that the resource that you are creating is not immediately enabled.
Specifies that the resource is to be added to the SAP MaxDB resource group.
Specifies that the resource is an instance of the SUNW.sapdb resource type.
Specifies the name of the SAP MaxDB database instance in uppercase.
Specifies the UNIX user identity of the OS user who administers the SAP MaxDB database. This user's home directory contains the .XUSER.62 file that was created during the installation and configuration of SAP MaxDB. For more information, see Installing and Configuring SAP MaxDB.
Specifies the user key of the database user who administers the SAP MaxDB database instance. This user key is created during the installation and configuration of SAP MaxDB. For more information, see Installing and Configuring SAP MaxDB.
Specifies that the SAP MaxDB resource depends on the HAStoragePlus resource for the global device group on which SAP MaxDB is installed.
Specifies that the resource that you are creating is named sapdb-rs.
To meet this requirement, create on the SAP MaxDB resource group a strong positive affinity for the SAP xserver resource group.
# clresourcegroup set -p RG_affinities=++xserver-rg sapdb-rg
Specifies that the SAP MaxDB resource group declares a strong positive affinity for the SAP xserver resource group.
Specifies that theSAP MaxDB resource group is to be modified.
#clresourcegroup online -eM sapdb-rg
Enables the SAP MaxDB resource group and moves it to the MANAGED state.
Specifies the name of the SAP MaxDB resource group to be brought online.
You might plan to run lower-priority services on a node to which the SAP MaxDB resource can fail over. In this situation, consider using resource group affinities to shut down the noncritical services when the SAP MaxDB resource fails over to the node.
To specify this behavior, declare on the resource group for each noncritical service a strong negative affinity for the SAP MaxDB resource group.
# clresourcegroup set -p RG_affinities=--sapdb-rg noncritical-rg
Sets the resource group property to the specified value.
Specifies the name of the noncritical resource group.
# clresource create -d -g sapdbrg -t SUNW.sapdb \ -p DB_Name=TST -p DB_User=dbadmin \ -p User_Key=DEFAULT -p Resource_dependencies_offline_restart=hasprs,xsrvrrs sapdbrs
This example shows the creation of a SUNW.sapdb resource that has the following characteristics:
The resource is named sapdbrs.
The resource is a member of a resource group that is named sapdbrg. The creation of this resource group is shown in Example 5, Enabling SAP MaxDB to Run in a Cluster.
The resource is an instance of the SUNW.sapdb resource type. The registration of this resource type is not shown in this example.
The SAP MaxDB database instance that is associated with this resource is named TST.
The UNIX user identity of the OS user who administers the SAP MaxDB database is dbadmin.
The user key of the database user who administers the SAP MaxDB database is DEFAULT.
The SAP MaxDB resource depends on the following resources:
An HAStoragePlus resource that is named hasprs. The creation of the hasprs resource is shown in Example 6, Creating an HAStoragePlus Resource.
A SUNW.sap_xserver resource that is named xsrvrrs. The creation of the xsrvrrs resource is shown in Example 7, Configuring a SUNW.sap_xserver Resource.