Configure Adaptive Server for Failover on Windows

Start the failover cluster manager and use the syconfig utility to configure the Adaptive Server.

Prerequisites
  1. Download and install Microsoft .NET runtime package V4.0
  2. The .NET runtime includes a utility called installutil.exe. Locate this and copy it to %SYBASE%\ASE-15_0\install
  3. Run the command sybcpnin –s on each cluster node. This installs the “Sybase Companion Server” resource type and Sybase Cluster Administrator extensions.
Task
  1. 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 that can be failed over between the cluster nodes (you can configure additional shared devices later). The shared disk must be online to the cluster node on which you are configuring Adaptive Server. You might want to create a temporary group and assign the shared disk to this group. When the Adaptive Server companion server setup is complete, it automatically creates its own group, and you can then move the shared disk can then to the new Adaptive Server group.
  2. When syconfig prompts you to create the various devices, alter these default values:
    1. Increase the sybsystemprocs size by 30MB over the default value
    2. Alter all the path names so that they are stored on the shared-cluster disk
    3. Alter the name of the tempdb device to be unique on each Adaptive Server instance in the cluster
  3. Test that the two Adaptive Servers can execute remote commands:
    Assuming our servers are called ASE1 and ASE2:
    • In ASE1 isql connection, enter: ASE2…sp_who ;
    • In ASE2 isql connection, enter: ASE1…sp_who;
    Verify that these commands both succeed. If they do not, verify:
    • That the Windows global variables such as %SYBASE%, and so on are set.
    • The %SYBASE%\%SYBASE_ASE%\ini\sql.ini file entries
    • You can use 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 might want to make backup copies of your master, sybsystemprocs and other devices at this time so you can easily get back to this point.
  4. Configure the asymmetric failover companionship.
    1. On ASE2 enter:
      sp_companion ASE1, “configure” , null, sa, <sa pswd>, sa, <sa pswd>
      As part of the companion configuration, a new group called ASE1_GRP is created. 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.
    2. Move the shared disk containing ASE1’s master and other devices into the new group ASE1_GRP.
    3. 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 that has just been moved. This ensures that the cluster brings the disk online before attempting to start Adaptive Server.
    4. Right-click on ASE1_GRP and choose Properties. On the General tab, in the Preferred owner subwindow, choose m1. For failback m1 must be the location of ASE1.
    5. To set values based on tasks, click the Maximum failures in the specified period tab. For example (these values are for reference only; determine the actual values based on your specific needs): 50-100 for test, 10-20 for production.
    6. If you need to perform a failback, choose Allow failback; otherwise, choose Prevent failback.
    To configure symmetric failover companionship, perform the same set of above steps on server ASE1, substituting ASE2 for ASE1 in the various commands.
  5. To test the asymmetric HA companionship failover and failback:
    1. On ASE1, issue shutdown with nowait
    2. On m1 taskmgr, issue kill ASE1 process
    3. On m1 service, issuestop ASE1
    4. On the Failover Cluster Manager, ASE1_GRP – ASE1 offline
    5. On the Failover Cluster Manager, ASE1_GRP – ASE1 simulating failure on the ASE
    6. On the Failover Cluster Manager, ASE1_GRP – disk1 simulating failure on the disk
    7. Shut down machine m1
    8. Turn off the power to machine m1
    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: Asymmetrically shutting down of ASE2 does not cause a failover because the group ASE2 has not been created in this case.
  6. HA test for a completed failback:
    1. On ASE2, enter:
      sp_companion ASE1 , “prepare_failback”
    2. On m1 service start ASE1
    3. On the Failover Cluster Manager: ASE1_GRP | ASE1: bring online
    4. Turn on the power to machine m1.
    To test the symmetric companionship, you can perform these steps 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.
    • Connection protocol – TCP
    • Connection value–hostname,portnumber

      The host and port number must separated by a comma.

    • If syconfig is not started in the ASE configuration file location, the parameter field must specify -c <ase>.cfg, where <ase>.cfg is the full path of the file.