High Availability Guide : Getting started with HotStandby : HotStandby quick start procedure
  
HotStandby quick start procedure
With the quick start procedure, you can reach a state where your HSB system is ready to serve applications.
About this task
You can use the quick start procedure to set up a pair of HotStandby servers on one or two computers. For evaluation purposes, you can use a single node setup. For testing and production environments, use two computers.
To set up and run an HSB server pair, you need two networked computers. To set up your HotStandby servers (without any other solidDB® components), follow the procedure below.
Tip: The quick start procedure does not assume use of any other components than HSB servers. For example, HAC is not needed. A similar step-by-step procedure for HAC is described in Starting and stopping HA Controller. There is also a sample watchdog application included in the solidDB® server package. To use the sample watchdog, you need to provide configuration settings for it.
Procedure
1 Install the solidDB® server on one or two computers.
If you are using a single computer, create two working directories and copy the license file to each directory. An evaluation license file is available in the root directory of the solidDB® installation directory.
For example, if you have installed solidDB® server into the C:\solid directory, create two directories named node1 and node2:
mkdir C:\solid\node1
mkdir C:\solid\node2
If you are using two computers, create a working directory on each computer and copy the license file to the directories.
For example, if you have installed solidDB® server into the C:\solid directories on both computers, create a directory named node1 on one computer and a directory named node2 on the other:
Node 1
mkdir C:\solid\node1
Node 2
mkdir C:\solid\node2
2 Configure the Primary and Secondary nodes. Create solid.ini configuration files in the working directories.
At minimum, HotStandby requires that you configure the HotStandby.HSBEnabled and HotStandby.Connect parameters in the solid.ini configuration file on both the Primary (Node 1) and Secondary (Node 2) servers:
HotStandby.HSBEnabled=Yes
HotStandby.Connect=connect string for the opposite HSB server
Additionally, the Com.Listen parameter must be set.
 
Single computer setup
Two-computer setup
Node1
C:\solid\node1\solid.ini
[Com]
Listen=tcp 2315
[HotStandby]
HsbEnabled=yes
Connect=tcp 2325
The server instance Node 1 connects to the Node 2 instance using the connect string tcp 2325. Because the servers are on the same computer, you do not need to define a node name or IP address for Node 2.
C:\solid\node1\solid.ini
[Com]
Listen=tcp 2315
[HotStandby]
HsbEnabled=yes
Connect=tcp node2 2325
The server on Node 1 connects to the server on Node 2 using the connect string tcp node2 2325. Instead of using a node name such as node2, you can use the IP address of the Node 2 computer, for example, tcp 10.0.0.2 2325.
Node2
C:\solid\node2\solid.ini
[Com]
Listen=tcp 2325
[HotStandby]
HsbEnabled=yes
Connect=tcp 2315
The server instance Node 2 connects to the Node 1 instance using the connect string tcp 2315. Because the servers are on the same computer, you do not need to define a node name or IP address for Node 1.
C:\solid\node2\solid.ini
[Com]
Listen=tcp 2325
[HotStandby]
HsbEnabled=yes
Connect=tcp node1 2315
The server on Node 2 connects to the server on Node 1 using the connect string tcp node1 2315. Instead of using a node name such as node1, you can use the IP address of the Node 1 computer, for example, tcp 10.0.0.1 2315.
3 Start both HSB servers the way you would start any solidDB® server.
The servers read the HotStandby configuration information from their own solid.ini files. The state of both servers after startup is SECONDARY ALONE.
4 Choose the server that will become the Primary, and switch the state of the chosen server to PRIMARY ALONE by issuing the following command:
ADMIN COMMAND 'hsb set primary alone';
Tip: In the HotStandby ADMIN COMMANDs, you can use the abbreviation hsb in place of hotstandby.
5 Connect the Primary to the Secondary by issuing the following command in either server:
ADMIN COMMAND 'hsb connect'
To verify that the connection was successful, issue the following command:
ADMIN COMMAND 'hsb state'
The Primary server responds that its state is PRIMARY ACTIVE. However, if the state of the Primary is something else than expected (for example, PRIMARY ALONE), the status of hsb connect can be checked by issuing the command:
ADMIN COMMAND 'hsb status connect'
If the result is ACTIVE, then connect process is still active. If the result is BROKEN, the databases of the servers must be synchronized before you connect them.
6 Synchronizing the databases by issuing the following command in the Primary:
ADMIN COMMAND 'hsb netcopy'
Check the status of database copy process by issuing the command:
ADMIN COMMAND 'hsb status copy'
7 As soon as the result of hsb status copy is SUCCESS, the databases are synchronized, and the servers can be connected. Reissue the following command in either server:
ADMIN COMMAND 'hsb connect'
Verify the success by issuing the command:
ADMIN COMMAND 'hsb state'.
8 Start using applications.
Related concepts
Defining primary and secondary node HotStandby configuration
Configuring HotStandby
See also
Getting started with HotStandby