This information is to be used in addition to Chapter 12, "Configuring Adaptive
Server for Failover on Windows," of the document, "Using Sybase Failover in a High
Availability System, Adaptive Server Enterprise 15.7".
Two Windows systems are required. Microsoft Cluster Server must be installed on both
systems and they must be configured together as a Microsoft cluster. It is recommended
to set up and test failover of a simple application such as Notepad on the
cluster to ensure that the basic failover capabilities of the cluster are working
properly. All configuration must be performed from an account which has Domain
Administrator privilege.
Before you begin
- Download and install Microsoft .NET runtime package V4.0
- The .NET runtime includes a utility called installutil.exe.
Locate this and copy it to %SYBASE%\ASE-15_0\install
- Run the command sybcpnin –s on each cluster node. This installs
the “Sybase Companion Server” resource type and Sybase Cluster Administrator
extensions.
Start the Failover Cluster Manager
Select Start | Administrative tools, then
right click Failover Cluster Manager and choose run as
administrator.
Each instance of an Adaptive Server companion server Primary/Secondary pair requires a
dedicated shared disk which can be failed over between the cluster nodes (you may
configure further shared devices later if you wish). To begin the Adaptive Server
configuration the shared disk must be online to the cluster node on which Adaptive
Server is being configured. To achieve this you may find it convenient to create a
temporary group and assign the shared disk to this group. When the Adaptive Server
companion server setup is complete it will automatically create its own group and the
shared disk can then be moved to the new Adaptive Server group.
Configure the Adaptive Server using the syconfig utility
Having moved the shared disk(s) to the correct cluster node(s), the Adaptive servers can
be configured using the syconfig utility. When
syconfig prompts you to create the various devices, alter the
prompted default values as follows:
- Increase the sybsystemprocs size by 30Mb over the default
value
- Alter all the path names so that they are stored on the shared cluster disk
- Alter the name of the tempdb device such that it is unique on each
Adaptive Server instance in the cluster
Test the servers
Test the that the two Adaptive Servers can execute remote commands:
- In ASE1 isql connection, enter: ASE2…sp_who ;
- In ASE2 isql connection, enter: ASE1…sp_who;
Make sure that both of the above commands succeed. The following are some tips for troubleshooting:
- Check that the Windows global variables such as %SYBASE%,
etc. are set.
- Check the %SYBASE%\%SYBASE_ASE%\ini\sql.ini file
entries
- Check by using isql to connect to the ASE1 from m1 and m2. If
connecting from m1 fails, then there is a problem with the m1. If connecting
from m2 fails, and you find that there is no problem with the m2 environment,
try connecting from a third machine. If the connection fails from a third
machine, check the firewall settings, as it may prevent you from logging in from
outside of m1.
Note: You may wish to make backup copies of your master,
sybsystemprocs and other devices at this time so that, should
something go wrong with the companion configuration, you can easily get back to this
point without having to repeat any of the earlier steps.
Cluster Configuration
Assuming our servers are called ASE1 and ASE2, to configure an asymmetric failover
companionship:
- On ASE2 enter sp_companion ASE1, “configure” , null, sa, <sa
pswd>, sa, <sa pswd>.
As part of
the companion configuration, a new group is created called ASE1_GRP. The group
contains the Adaptive Server service name which is the same as the server name
(ASE1). ASE1 becomes the primary server and ASE2 the secondary.
- Move the shared disk containing ASE1’s master and other devices into the new group
ASE1_GRP.
- Inside the new group, ASE1_GRP, right click the service name ASE1, select
Properties, and choose the
Dependency tab. Add a new dependency of ASE1 on the
shared disk which has just been moved. This ensures that the cluster will bring the
disk online before attempting to start ASE.
- Right click on the new group ASE1_GRP, choose Properties. On
the General tab, Preferred owner
sub-window, choose the machine, m1. For failback, it is important that m1 is
location of ASE1.
- Click the tab for failover increase Maximum
failures in the specified period to set
values based on tasks: 50-100 for test, 10-20 for production.
The above values are
for reference only. Determine values based on your specific needs.
- Choose Allow failback, if a failback is needed; otherwise
choose Prevent failback.
To configure symmetric failover companionship, perform the same set of above steps on
server ASE1 but substituting ASE2 for ASE1 in the various commands.
Testing the asymmetric HA companionship failover and failback
To test the asymmetric HA companionship failover and failback, do the following:
- HA test for complete failover:
- On ASE1, issue shutdown with nowait
- On m1 taskmgr kill ASE1 process
- On m1 service: stop ASE1
- On the Failover Cluster Manager: ASE1_GRP | ASE1 offline
- On the Failover Cluster Manager: ASE1_GRP | ASE1 simulating failure in
the ASE
- On the Failover Cluster Manager: ASE1_GRP| disk1 simulating failure in
the disk
- Shut down machine m1
- Power off machinem1
The above actions should result in a ASE1 shared disk failover to ASE2.
On ASE2 will show the ASE1 databases and devices. ASE1 client connections
with –Q failover property should also failover to ASE2.
Note: Asymmetric
shutdown of ASE2 will not cause a failover because the group ASE2 has not
been created in this case.
Test for a completed failback
- HA test for a completed failback:
- On ASE2, enter: sp_companion ASE1 , “prepare_failback”
- On m1 service start ASE1
- On the Failover Cluster Manager: ASE1_GRP | ASE1: bring online
- Power on machine m1.
To test the symmetric companionship, the above steps can be performed on
both machines or only on ASE1.
Also see, "CR 692496, Configuring tempdb
device for HA" in the Known Installation Issues for Adaptive Server.
The
following
syconfig utility fields must be set correctly.