PreviousAdvanced Operations Guide (v9 SP2 (9.5) revision 1) Next

Microsoft Cluster Service

Chapter contents

This section assumes that you are familiar with the installation and configuration of Cluster Service and need only the information required to add the Pervasive PSQL v9 Service Pack 2 services to a Cluster Service group.

If you are not familiar with Cluster Service technology, please refer to the Microsoft documentation for how to install Cluster Service, verify it is working correctly, and perform tasks with it. You may also find the following links beneficial:

How to Proceed

This section is organized in the manner in which you should proceed to add the Pervasive PSQL services to a cluster group. That is, this section gives you the following suggested approach:

Verify Cluster Service Functioning Correctly

It is essential that Cluster Service be functioning correctly before you add the Pervasive.SQL services to a cluster group. Refer to the Microsoft documentation for how to install Cluster Service, verify it is working correctly, and perform tasks with it.

We recommend that you select servers and disk subsystems from the Microsoft hardware compatibility list (HCL) for clusters.


Note
If Cluster Service is not set up properly, you will be unable to get your Pervasive PSQL resources to work properly.

Verify Network Client Communication

Before you add Pervasive PSQL to a cluster environment, we recommend that you verify network client communication with the cluster shared disk. A network client must be able to communicate with a cluster shared disk before and after a failure of a cluster node (failover). The following task lets you verify this.

To verify network client communication and cluster failover

  1. Connect a drive on a client computer to the shared disk subsystem. (This step assumes that you are using a computer on which a Pervasive PSQL requester is, or will be, running.)
  2. Example:

    From a command prompt on a client computer, execute the following command:

    net use X: \\WIN2K-Cluster\Gdrive

    This example connects drive "X" on a workstation to the "G" drive on the shared disk subsystem "WIN2K-Cluster." "WIN2K-Cluster" is the Network Name. "Gdrive" is the File Share.

  3. Verify that you can execute a command on the connected drive. For example, switch to the drive and display a directory with the dir command:
  4. x:
    dir

  5. Verify that you can connect to the IP address of the shared disk subsystem. From a command prompt, execute the following command: ping Network Name. For example, ping WIN2K-Cluster.
  6. If the command returns something like Reply from IP address, then you can connect to the IP address. For example, the following reply shows a successful connection:

    Reply from 172.99.99.35: bytes=32 time<10ms TTL=128

    Check that the IP address in the reply is the correct address of the shared disk subsystem.

  7. In the Cluster Administrator, right-click on the Cluster Name line, then click Initiate Failure

    .


  8. Repeat the Initiate Failure action until a failure occurs. The number of times you must repeat the action depends on the threshold setting.

    The Initiate Failure action fails the node currently controlling the shared disk of the cluster. A surviving node in the cluster becomes active and assumes control of the shared disk.


    Note
    Ensure that the failover occurred and that a surviving node is now controlling the shared disk. If you cannot initiate a failure, then your clustering environment may not be set up correctly and you will be unable to get your Pervasive PSQL resources to work properly.
  9. On the client computer used for step 1, verify that you can still execute a command on the connected drive. For example, display a directory with the dir command.

The cluster is functioning correctly if you can execute a command on the shared disk subsystem from a client computer before and after a failure. If you cannot, check the setup of the Cluster Service and the resources.

Add a Cluster Group for Pervasive PSQL

Your next task is to create a cluster group to which you will later add the Pervasive PSQL resources. You create a cluster group with Microsoft Cluster Administrator.

Please refer to the Microsoft Cluster Service documentation for how to add a cluster group. The steps to add the Pervasive PSQL resources to a cluster group are explained in Add Pervasive PSQL Services to Cluster Group .

All resources within a cluster group fail together. That is, if one resource within a group fails on a node, the remaining resources are taken offline. All resources within the group are then transferred to a surviving node and brought back online. For this reason, we suggest that you create a separate cluster group for Pervasive PSQL. This is not mandatory, but is a good administrative method.

At a minimum, ensure that a cluster group for Pervasive PSQL contains the following resources.

Failback

In addition to the required minimum resources (IP Address, Network Name, Physical Disk, and File Share), you may want to enable failback for the group. Failback is a feature of clustering that specifies a preferred controlling node within the cluster.

For example, suppose your cluster contains two nodes, Server A, the preferred controlling node, and Server B. If Server A fails, Server B assumes control. When Server A comes back online, control passes back to it automatically. This automatic transfer of control is referred to as failback (clustering automatically "fails back" to the preferred node).

You specify failback on the properties dialog of the group name.


Note
When the cluster node fails back to the preferred server, a Pervasive PSQL client loses connection with the database engine. No automatic reconnection occurs. Your application must reconnect the client to the Pervasive PSQL database or you must restart the application. This applies even if Enable Auto Reconnect is turned on in PCC.

Pervasive PSQL does not maintain the transaction state when the failback occurs. The transaction state does not transfer to the preferred server. Transactions are automatically rolled back to the state before the transaction began.

Install Pervasive PSQL on the Cluster Nodes

You install Pervasive PSQL v9 Service Pack 2 Server on each cluster node. Choose identical options for each installations. See Installing Pervasive PSQL Server for Windows in Getting Started With Pervasive PSQL (Server edition).

Do not install Pervasive PSQL on the cluster shared disk. The shared disk is where the Pervasive PSQL database(s) reside.

The Pervasive PSQL transactional and relational services typically run under the Local System Account. Depending on the settings for your domain permissions, the Local System Account may lack authority for certain actions pertaining to Pervasive PSQL, such as installing the requesters from a cluster node. Check the domain permissions for your cluster node accounts if you encounter problems installing the Pervasive PSQL products.

After installation, both the transactional and relational services are set to start automatically when the operating system starts. With clustering, however, the Cluster Administrator controls the starting and stopping (bringing online or offline) of the services. Be aware that, once you add the Pervasive.SQL services to a cluster group, the Cluster Administrator changes the service settings from automatic to manual.

If you add both the transactional and relational service to your cluster group, you do not need to take any action concerning the service settings. (Cluster Service sets both to manual.) The transactional service is always required in your cluster. The relational service is optional. If your application(s) requires the relational engine of Pervasive PSQL, you must also add the relational service to the cluster group.

Note, however, that if you add only the transactional service to the cluster then you must change the startup settings for the relational service. (The startup settings established when you installed Pervasive PSQL by running the installation program.) See To change the startup setting for the relational service .

Add Pervasive PSQL Services to Cluster Group

Your next task is to add the Pervasive PSQL services to the cluster group.

To add the Pervasive.SQL transactional service to a cluster group

The transactional service of Pervasive PSQL is always required in a cluster group. Perform this task on only one node in the cluster. All other nodes in your cluster share the information.

  1. Ensure that Pervasive PSQL Server is installed on each cluster node and that the correct administrative permissions are set on each node. See Install Pervasive PSQL on the Cluster Nodes .
  2. In the Microsoft Cluster Administrator, right-click on the desired cluster group name, then click New4Resource.
  3. On the New Resources dialog, type in a name for the resource. The name is used only for display purposes within Cluster Administrator. Optionally, type in a description for the resource.
  4. Click the list for Resource type then click Generic Service.
  5. Click the list for Group then click the desired group.
  6. Do not check the option Run this resource in a separate Resource Monitor.
  7. The information should look something like the following example:

  8. Click Next. The Possible Owners dialog appears.
  9. Specify the nodes that can function as possible owners for the resource. (Add the nodes to the list of possible owners.)
  10. Click Next. The Dependencies dialog appears.
  11. Add the resources that must be brought online first. That is, the resources on which the new resource depends. Add the following dependences to the list of resource dependences:
    • IP Address
    • Network Name
    • File Share


  12. Click Next. The Generic Services Parameters dialog appears.
  13. For Service name, type in Pervasive PSQL (transactional).
  14. Leave the Start parameters blank.
  15. Click the option Use Network Name for computer name.
  16. The information must be the following:


    Note
    Ensure that you check the option Use Network name for computer name. This option allows the Pervasive PSQL transactional engine to open files directly on the shared disk, which improves performance.
  17. Click Next. The Registry Replication dialog appears.
  18. Click Add. The Registry Key dialog appears.
  19. Type in SOFTWARE\Pervasive Software.

  20. Click OK.
  21. Click Finish to add the new resource. A message appears stating that the resource was created successfully.
  22. Click OK.
  23. In the Cluster Administrator, right-click on the Pervasive PSQL resource you just added. Click Properties.
  24. Click the Advanced tab.
  25. Ensure that the Restart option and the Affect the group option are selected.

  26. Optionally, you may set the Threshold and Period values to your choice.

  27. Click OK (click Apply then OK is the Apply button is enabled).

If your application(s) require only the transactional engine, you do not need to add the relational service to your cluster group. You may skip to To change the startup setting for the relational service .

To add the Pervasive.SQL relational service to a cluster group

If your application(s) requires the relational engine of Pervasive PSQL, you must also add the relational service to your cluster group. If your application(s) require only the transactional engine, you do not need to add the relational service to your cluster group. You may skip to To change the startup setting for the relational service .

  1. Add the Pervasive.SQL transactional service as explained in To add the Pervasive.SQL transactional service to a cluster group . The transactional service is required for the relational service.
  2. In the Cluster Administrator, right-click on the desired cluster group name, then click New4Resource.
  3. On the New Resources dialog, type in a name for the resource. The name is used only for display purposes within Cluster Administrator. Optionally, type in a description for the resource.
  4. Click the list for Resource type then click Generic Service.
  5. Click the list for Group then click the desired group.
  6. Do not check the option Run this resource in a separate Resource Monitor.
  7. The information should look something like the following example:

  8. Click Next. The Possible Owners dialog appears.
  9. Specify the nodes that can function as possible owners for the resource. (Add the nodes to the list of possible owners.)
  10. Click Next. The Dependencies dialog appears.
  11. In the Available resources list, click the Pervasive PSQL transactional resource that you added with the procedure To add the Pervasive.SQL transactional service to a cluster group . For example, if you named the transactional resource "Btrieve," click on "Btrieve."
  12. Click Add. This adds the resource to the list of dependences.
  13. You do not need to add the resources IP Address, Network Name, and File Share because they are dependencies of the transactional resource.

  14. Click Next. The Generic Services Parameters dialog appears.
  15. For Service name, type in Pervasive PSQL (relational).
  16. Leave the Start parameters blank.
  17. Click the option Use Network Name for computer name.
  18. The information must be the following:


    Note
    Ensure that you check the option Use Network name for computer name. This option allows the Pervasive PSQL relational engine to open files directly on the shared disk, which improves performance.
  19. Click Next. The Registry Replication dialog appears.
  20. Decide how you want to handle DSNs.
  21. You may specify the key SOFTWARE\ODBC if you want. However, this affects all ODBC data sources and ODBC providers installed on the cluster node. Pervasive PSQL may not be the only ODBC provider installed on the cluster node. If it is the only ODBC provider, this is a fast way to ensure that all Pervasive PSQL data source names (DSNs) identified in your cluster can be used by all cluster nodes.

    If you do not want to specify SOFTWARE\ODBC, then you must set up the individual DSNs on each cluster node.

    Decide on one of the following as your preferred way to handle DSNs.

    1. To specify all ODBC providers, click Add. The Registry Key dialog appears. Type in SOFTWARE\ODBC. Click OK and continue with step 18. All nodes in your cluster now have this key in their registry.
    2. To specify separate DSNs, do not add any key for registry replication. Continue with the remaining steps in this procedure, then perform the steps in To specify DSNs on each cluster node .
  22. Click Finish to add the new resource. A message appears stating that the resource was created successfully.
  23. Click OK.
  24. In the Cluster Administrator, right-click on the Pervasive PSQL resource you just added. Click Properties.
  25. Click the Advanced tab.
  26. Ensure that the Restart option and the Affect the group option are selected.

  27. Optionally, you may set the Threshold and Period values to your choice.

  28. Click OK (click Apply then OK is the Apply button is enabled).

To change the startup setting for the relational service

This task is required only if you did not add the relational service to your cluster group. (See Install Pervasive PSQL on the Cluster Nodes .) If you added the relational service to your cluster group, skip this task.

  1. Display the operating system Services dialog. For example, click Start4Settings4Control Panel4Administrative Tools, then double-click Services.
  2. Note that the steps to invoke Services may differ depending on which Windows 32-bit platform you use.

  3. In the list, click on the service Pervasive PSQL (relational).
  4. Click Startup.
  5. For Startup Type, click either the Manual option or the Disabled option.
  6. Click OK.
  7. If the service is running, click Stop.
  8. Click Close.

Configure the Engines with PCC

Your next task is to configure the engine by using Pervasive PSQL Control Center (PCC). The configuration settings are added to the registry. You need to configure the engine on one node in your cluster, then initiate a failure to migrate the settings to the next node in your cluster.

To configure the engines for clustering

  1. In PCC Pervasive PSQL Explorer, right-click on Engines then click New 4 Server.
  2. For server name, type in the Network Name of the cluster shared disk subsystem.
  3. Ensure that you specify the Network Name of the cluster shared disk and not the machine name of a cluster node. For example, if the cluster shared disk is named WIN2K-CLUSTER, type WIN2K-CLUSTER as the server name.
  4. Click Finish.
  5. In PCC Pervasive PSQL Explorer, right-click on the server name that you just added, then click Properties.
  6. Click Directories.
  7. For DBNames Configuration Location, type a location on the cluster shared drive where you want the dbnames configuration file to reside.
  8. For example, if the shared disk is drive G: and you want the dbnames configuration file to reside in a directory named "config," type in G:\config.

  9. Click Apply, then click Yes to apply the setting.
  10. For Transaction Log Directory, type a location on the cluster shared drive where you want the log to reside.
  11. Click Apply, then click Yes to apply the setting.
  12. In the Properties tree, click Communication Protocols.
  13. Ensure that TCP/IP Multihomed is ON (check marked). If it is not, click TCP/IP Multihomed then click OK. Click Yes to apply the setting.
  14. In the Cluster Administrator, right-click on the Btrieve service, then click Take Offline.

  15. This also takes the SRDE service offline.

  16. In the Cluster Administrator, right-click on the Btrieve service, then click Bring Online.

  17. In the Cluster Administrator, right-click on the SRDE service, then click Bring Online.

  18. In the Cluster Administrator, right-click on the Cluster Name line, then click Initiate Failure

    .


  19. Repeat the Initiate Failure action until a failure occurs. The number of times you must repeat the action depends on the threshold setting.

    The next surviving node becomes the new controlling node of the cluster.

    Repeat this step until you have initiated failure to each cluster node. If you prefer, when finished, initiate failure back to the cluster node from which you started. This is not required unless you want that cluster node to be the controlling node.


    Note
    Ensure that failure occurs or the registry settings will not migrate to the surviving node(s).

To specify DSNs on each cluster node

This task is required only if you did not specify the registry key SOFTWARE\ODBC in step 17 of the task To add the Pervasive.SQL relational service to a cluster group . If you added the registry key SOFTWARE\ODBC, skip this task.

Note that DSNs are stored in the registry as key entries. Cluster Administrator works only with registry keys, not with the individual entries.

You need to create the DSNs on one cluster node, initiate failure, and create the same DSNs on the surviving node. You repeat this until all cluster nodes contain the DSNs.


Note
You must configure the engines by using PCC before performing this task. See To configure the engines for clustering .
  1. On the controlling cluster node, open the ODBC Administrator.
  2. Click the System DSN tab.
  3. Click Add. The Create New Data Source dialog appears.
  4. In the list, click Pervasive ODBC Engine Interface.
  5. Click Finish. The Pervasive ODBC Engine DSN Setup dialog appears.
  6. Click Create (to specify a database name).
  7. For Database Name, type in the name of the Pervasive PSQL database.
  8. For Directory Location, type in (or browse to) the location on the cluster shared drive where the database files reside. This is the location of the DDF files.
  9. Click OK to return to the Pervasive ODBC Engine DSN Setup dialog.
  10. For Data Source Name, type in a name by which you want to refer to the database.
  11. Click OK.
  12. Repeat steps 1 through 11 for each Pervasive PSQL database involved in clustering.
  13. In the Cluster Administrator, right-click on the Cluster Name line, then click Initiate Failure

    .


  14. Repeat the Initiate Failure action until a failure occurs. The number of times you must repeat the action depends on the threshold setting.

    The next surviving node becomes the new controlling node of the cluster. Initiating failure is required because the engine must be running for you to create the DSNs.

  15. Open the ODBC Administrator on the new controlling node.
  16. Click the System DSN tab.
  17. Click Add. The Create New Data Source dialog appears.
  18. In the list, click Pervasive ODBC Engine Interface.
  19. Click Finish. The Pervasive ODBC Engine DSN Setup dialog appears.
  20. In the list for Database Name, click the database name you want.
  21. The list contains all of the names that you added with steps 1 through 12 because those steps updated dbnames.cfg on the shared disk.

  22. For Data Source Name, type in the appropriate name. That is, the names used in steps 7 and 10 must match the names in steps 19 and 20.
  23. Click OK.
  24. Repeat steps 13 through 21 for each node in the cluster on which you have not set up the DSNs.

Establish Pervasive PSQL Databases on the Cluster Shared Disk

You may establish a Pervasive PSQL database on a cluster shared disk by creating a new database or by copying an existing database.

To create a new database on a shared disk.

Use PCC to create a database directly on the cluster shared drive. See To create a new database .

Creating the database also sets up the DSN. All cluster nodes are aware of the new DSN if you specified the registry key SOFTWARE\ODBC in step 17 of the task To add the Pervasive.SQL relational service to a cluster group . If you did not add that registry key, then you need to create the DSN on each cluster node. See To specify DSNs on each cluster node .

To copy an existing database to a shared disk

A previously existing database must be copied to the shared drive. You then use PCC to change the location of the dictionary and data files.

  1. Copy the database directory or directories to the shared drive.
  2. In PCC Pervasive PSQL Explorer, expand the list of Databases (click the plus (+) signs in the tree to expand the nodes).
  3. Right-click on the name of the database that you copied then click Properties.
  4. Click Directories in the Properties tree.
  5. Change the Dictionary Location to the location on the shared drive.
  6. Change the Data File Locations to the location(s) on the shared drive.
  7. Click OK.

To test the transactional connection from a Pervasive PSQL client

  1. Connect a drive to the shared disk subsystem from a computer running a Pervasive PSQL client.
  2. Example:

    From a command prompt on a client computer, execute the following command:

    net use X: \\WIN2K-Cluster\Gdrive

    This example connects drive "X" on a computer to the "G" drive on shared disk subsystem "WIN2K-Cluster." "WIN2K-Cluster" is the Network Name. "Gdrive" is the File Share.

  3. Copy the sample database DEMODATA (the DEMODATA folder) from the controlling cluster node to the cluster shared disk. (This step is not required if you already have a Pervasive PSQL database on the cluster shared disk. These steps assume that you do not.)
  4. By default, DEMODATA is located at C:\PVSW\DEMODATA.

  5. At a command prompt on the client workstation, execute the following command (using drive X as an example):
  6. butil -stat x:\demodata\file.ddf

    If the command executes successfully, the Pervasive PSQL client is communicating with the database on the cluster shared disk. A successful execution returns information such as file version, page size, total number of records, and so forth.

  7. In the Cluster Administrator, right-click on the Cluster Name line, then click Initiate Failure

    .


  8. Repeat the Initiate Failure action until a failure occurs. The number of times you must repeat the action depends on the threshold setting.

    This fails the node currently controlling the shared disk of the cluster. A surviving node in the cluster becomes active and assumes control of the shared disk.

  9. After the failure, execute the following command from the client workstation (using drive X as an example):
  10. butil -stat x:\demodata\file.ddf

    If the command executes successfully, the Pervasive PSQL client is communicating with the database on the cluster shared drive. A successful execution returns information such as file version, page size, total number of records, and so forth.

To test the relational connection from a Pervasive PSQL client

This test is required only if you added the relational service to your cluster group.

  1. Connect a drive to the shared disk subsystem from a computer running the Pervasive PSQL client.
  2. Example:  net use X: \\WIN2K-Cluster\Gdrive

    This example connects drive "X" on a computer to the "G" drive on shared disk subsystem "WIN2K-Cluster." "WIN2K-Cluster" is the Network Name. "Gdrive" is the File Share.

  3. Create a directory on the cluster shared disk named DEMODATA2.
  4. From the controlling cluster node, copy all of the files from the directory of the sample database DEMODATA to the DEMODATA2 directory. By default, DEMODATA is located at C:\PVSW\DEMODATA.
  5. On the controlling cluster node, open the operating system ODBC Administrator. For example, click Start4Settings4Control Panel4Administrative Tools, then double-click Data Sources (ODBC).
  6. Note that the steps to invoke the ODBC Administrator may differ depending on which Windows 32-bit platform you use.

  7. Click the System DSN tab.
  8. Click Add. The Create New Data Source dialog appears.
  9. In the list, click Pervasive ODBC Engine Interface.
  10. Click Finish. The Pervasive ODBC Engine DSN Setup dialog appears.
  11. Click Create (to specify a database name).
  12. For Database Name, type in DEMODATA2.
  13. For Directory Location, type in (or browse to) DEMODATA2. Include the drive letter. For example, G:\DEMODATA2.
  14. Click OK to return to the Pervasive ODBC Engine DSN Setup dialog.
  15. For Data Source Name, type in DEMODATA2.
  16. Click OK.
  17. On the System DSN tab, click Pervasive ODBC Client Interface.
  18. Click Finish. The Pervasive ODBC Client DSN Setup dialog appears.
  19. Type in the address of the shared disk subsystem (this is the Network Name).
  20. Click Get DSN List.
  21. For the server DSN, click DEMODATA2 in the list.
  22. Type in a name for the client DSN. The information should look similar to the following example:

  23. Click Test. A successful test indicates that the client DSN is communicating with the engine. Click OK to dismiss the Test Connection message box.
  24. Click OK to close the Pervasive ODBC Client DSN Setup dialog.
  25. In the Cluster Administrator, right-click on the Cluster Name line, then click Initiate Failure

    .


  26. Repeat the Initiate Failure action until a failure occurs. The number of times you must repeat the action depends on the threshold setting.

    This fails the node currently controlling the shared disk of the cluster. A surviving node in the cluster becomes active and assumes control of the shared disk.

  27. On the controlling cluster node, open the ODBC Administrator.
  28. Click the System DSN tab.
  29. Double-click the client DSN you created in step 20. The Pervasive ODBC Client DSN Setup dialog appears.
  30. Click Test. A successful test indicates that the client DSN is communicating with the engine. Click OK to dismiss the Test Connection message box.
  31. Click OK to close the Pervasive ODBC Client DSN Setup dialog.

Chapter contents
Book contents

Prev topic: Server Clustering
Next topic: NetWare Cluster Services