2. How to use Replication Manager#
This chapter introduces the graphical user interface of Replication Manager. Then, it covers the steps to be taken to connect Replication Manager to Altibase database and describes the detail usage of Replication Manager. It is organized as follows:
- Understanding the User Interface
- Connecting to Altibase
- Working with Replication Manager
Understanding the User Interface#
This section introduces the overall user interface.
The user interface of Replication Manager is organized as follows:
-
DB Connections: This is the entry point for the program and a database-centric view that represents the relationship between databases and replication objects in a tree structure.
-
Replication Pairs: This is a logical view that depicts replication objects in pairs. A group of two replication objects that have the same name and interact with each other is called a "Replication Pair".
-
Map: This area graphically illustrates the physical layout and status of databases, replication objects, and the relationships therebetween.
-
Properties: This area shows the properties for the currently selected object (e.g., DB connection or replication object).
These four panes are intended to give DBAs a variety of ways of visualizing the same databases and replication objects. For example, the "Map" pane provides a convenient way to check the replication gap at a glance, while "Replication Pairs" provides a convenient way of handling replication objects as pairs without having to think about the databases on which they are working. So, these four panes complement each other. For example, when a replication object is selected in the "DB Connections" pane, the same replication object is also selected in the "Replication Pairs" and "Map" panes. In addition, the properties of the selected replication object will be displayed in the "Properties" pane. In other words, the three editable panes, "DB Connections", "Replication Pairs", and "Map", interact multidirectionally with each other, while the read-only pane, "Properties", receives information from the other three panes.
The "DB Connections" pane offers the following features:
- It provides a view that can be used to register, unregister, and edit database connections.
- It shows meta information about connected databases, replication objects, and replication target tables in a tree structure for ease of navigation.
- It provides a convenient way to manage databases and replication objects, including starting, stopping, creating, and dropping replication objects
The "Replication Pairs" pane offers the following features:
- It provides a convenient way to manage replication pairs without having to think about the underlying databases.
- It also provides a way to manage replication objects, including starting and stopping them.
The "Map" pane offers the following features:
- It delivers the big picture of all registered databases and replication objects in an intuitive manner.
- It also provides a way to control databases and replication objects.
- It shows "Unknown" DB Connection if any replication object is unable to locate the corresponding replication object. So, it helps users not to miss registering and opening required DB Connections.
Connecting to Altibase#
This section describes, in the form of a tutorial, the basic steps that must be taken in order to connect to an Altibase database. The usual workflow when working with Altibase is as follows:
- Import a JDBC driver file to be used when connecting to an Altibase database.
- Add a database connection.
- Connect to the database.
- Conduct replication administration tasks as required.
- Disconnect from the database.
- Edit DB connection information.
- Manage Extra Host IP
- Remove the database if it is no longer needed.
Each procedure is conducted as described below.
Importing a JDBC Driver File#
This section describes the steps involved in importing the appropriate version of the JDBC driver file into Replication Manager.
Replication Manager can work with many different versions of Altibase simultaneously. So, it is necessary to import Altibase JDBC driver that is appropriate for the database to be connected. If a user want to connect to two different Altibase databases, for example, versions 4.3.9.100 and 5.3.3.33 respectively, then the user is required to import two versions of the JDBC driver files into Replication Manager, and to give them different names, for example, "Altibase_4.3.9.100.jar" and "Altibase_5.3.3.33.jar".
To import a JDBC driver, do the following:
-
Click on the "JDBC driver manager" icon in the toolbar to open the "JDBC driver manager" dialog box.
-
In this dialog box, click on the "+" icon on the right to open the "Import JDBC driver file" dialog box, as shown below.
-
Select a JDBC driver file to import and give the file a name to be used in Replication Manager. The source file will be copied into the specified directory and renamed as specified.
-
Close the "JDBC driver manager" dialog box.
Alternatively, users can also import a JDBC driver file when performing the "Adding a Database connection" task.
Adding a Database Connection#
- Open the "New DB Connection" dialog by clicking on the "New DB Connection" icon in the main toolbar, or by right-clicking on the "DB Connections icon" in the "DB Connections" panel and then left-clicking on the "New DB Connection" item in the context menu that appears.
-
The "New DB Connection" dialog box shown below will appear. Fill in the input fields as described below.
-
Basic Information
- Connection Name: A unique connection name of up to 10 characters. The name must start with an alphabet, alphabets and numbers can be mixed.
- Password: The password for the SYS user for the database
- DB Address: The IP address of the machine on which the database installed
- DB Port: The port number with which to access the database
- DB Name: The name of the database
- JDBC driver: To use the appropriate version of the JDBC driver file, select the correct imported JDBC driver in the combo box. If the required JDBC driver file has not been imported yet, please import a new JDBC driver by clicking on the "JDBC driver manager" icon.
-
Options
- IP Type: Select the appropriate IP address type, IPv4 or IPv6.
- NLS for Client: Choose the character set to use when translating data from the DBMS on the client side. (This option is not necessary when connecting to Altibase version 5.3.1 or higher.)
-
Click on the "Connection Test" button to ensure that the connection works as expected.
- Finally, click on the "Save" button.
Connecting to the Database#
Once the previous task has been completed, you are ready to connect to a database, as shown below:
To connect to a database, complete the following steps:
- Select the newly added database connection. Right-click on the newly added database to display the context menu, and then left-click on "Connect". This may take some time, depending on your environment.
- When you are successfully connected, you will see the replication objects in the target database.
- If the connection fails, a warning dialog appears, displaying some information that will be of help in successfully establishing a connection.
Working with the Connected Database#
If you have followed the preceding steps successfully, you are ready to manage replication on the connected database.
Disconnecting from the Database#
After finishing your work, it will be necessary to close the connection with the database. To close a connection with a database, select the target database connection. Open the context menu by right-clicking on the target database, and then choose "Disconnect" from the context menu.
Editing DB Connection Information#
It will sometimes be necessary to edit database connection information. For example, it may be necessary to change the account that is used to establish the database connection. This is possible only when not connected to the database in question. There are six steps involved in editing database connection information.
- Select the database for which it is desired to change connection information. To open the context menu, right-click on the database, and then choose "Edit" from the context menu.
- Make the required changes to the connection information. Click on the "Connection Test" button to ensure that the connection works as expected.
- The dialog box shown below will appear if the connection test is successful. Click on the "OK".
- Finally, click on the "Save" button in the Edit dialog box.
Managing Extra Host IP#
If Altibase is installed on a device with multiple IP addresses and one of these addresses is used as a Remote Host IP when creating a replicaiton object in another Altibase, the IP is either the DB Address of the registered database connection or the Extra Host IP. It must be one. Otherwise, the relationship between the database and the replication object may not be properly displayed in the Map window. This menu is available regard of you are connected to the database or not. Select the database you wish to register or delete the Extra Host IP. Right-click on the database to open the context menu and select the "Manage Extra Host IP" item.
Removing a Database Connection#
When a registered database is no longer in use, you will probably want to remove it from the DB Connections panel. To remove a database, select the target database connection. Open the context menu by right-clicking on the database connection to be removed, and then left-click on "Remove" in the context menu.
Working with Replication Manager#
This section is intended to describe how to use Replication Manager in detail. It also describes the relationship between panes and objects.
Replication Manager takes care of a single base model, which simulates databases and replication-related objects, while providing a various ways of visualizing and manipulating the model through three editable panes. The model consists of six types of objects as follows:
- Replication Object: It is an object created with the CREATE REPLICATION statement and the common object among panes at Replication Manager. Please refer to Understanding the User Interface.
- Replication Target Table Object: This is a table that is designated, using the CREATE REPLICATION or ALTER REPLICATION statement, to be replicated between corresponding replication nodes.
- DB Connections Object: It is the root object of "DB Connection" object to manage DB Connection. Also, it is the entry point for "DB Connections" pane.
- DB Connection Object: It is a representation of a connection to Altibase DBMS. Please refer to Understanding the User Interface for details.
- Replication Pairs Object: It is the root object of "Replication Pair" and the entry point for "Replication Pairs" pane.
- Replication Pair Object: It is a pair of corresponding replication objects having the same name, one residing on each of two different nodes. Please refer to Understanding the User Interface.
Some objects in the model are show up few panes for the ease use of Replication Manager.
Even though some objects shared by panes are the same ones, they may provide different functionalities according to the pane. For instance, Replication Object at DB Connections pane provides "Edit Table List" function, but Replication Object at Map pane doesn't. This is to align functionalities to its context. In this example, it is more reasonable to edit the replication target table list at the database-centric view, DB Connections pane because the Map pane is intended to give a brief overview.
DB Connections pane#
DB Connections pane is a database-centric view that represents the relationship between databases and replication objects in a tree structure. Therefore, it handles four types of objects: DB Connections Object, DB Connection Object, Replication Object, and Replication Target Table Object.
DB Connections Object#
- Connect all: Connect all registered but not connected DB Connection
- Disconnect all: Disconnect all registered and connected DB Connection
- Start all: Start all replication objects which are stopped or newly created.
- Stop all: Stop all replication objects which are running.
- Quick Start all: Quick Start all replication objects which are stopped. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- New DB Connection: Create a new DB Connection.
- Collapse All: Collapse the tree to DB Connection level.
- Expand to Replication Object: Expand the tree to replication object level.
- Expand to Replication Table: Expand the tree to replication table level.
DB Connection Object#
- Connect: Connect to the database with the given properties.
- Disconnect: Disconnect from the connected database.
- Edit: Edit the properties of DB Connection
- Manage Extra Host IP: Manage the Extra Host IPs of DB Connection
- Remove: Remove the selected DB Connection.
- Start all: Start all replication object which are stopped in the DB Connection.
- Stop all: Stop all replication objects which are running in the DB Connection.
- Quick Start all: Quick Start all replication objects which are stopped in the DB Connection. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- Create Replication: Create a Replication Object at the DB Connection.
- Create Full-mesh Replications: Create full-meshed replication objects between selected DB Connections with identical named tables.
- Join to Full-mesh: Let selected database instance join to already created full-meshed replication objects.
- Create Replication Pair: Create a pair of Replication Objects at two distinct DB Connections.
- Drop Replications: Drop all Replication Object at the DB Connection. All Replication Objects should be stopped before using this function.
Replication Object#
- Start: Start the selected Replication Object.
- Stop: Stop the selected Replication Object.
- Quick Start: Quick Start the selected Replication Object. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- Sync: Sync the selected Replication Object. It is equivalent to performing ALTER REPLICATION replication_name SYNC statement.
- Sync Only: Sync Only the selected Replication Object. It is equivalent to performing ALTER REPLICATION replication_name SYNC ONLY statement.
- Drop: Drop the selected Replication Object, which is stopped.
- Edit Table List: Add/Remove Replication Target Tables in the selected Replication Object, which is stopped.
- Monitor: Open a monitor dialog for the selected Replication Object and the corresponding Replication Object.
- Show DDL: Print the schema to generate the selected Replication Object and its related objects, such as table, index, and so on.
- Compare DDL: Print the difference of schema between the selected Replication Object and the corresponding Replication Object.
Replication Target Table Object#
- Remove: Remove the selected table from its underlying Replication Object.
Replication Pair pane#
Replication Pair pane is a logical view depicting replication objects in pairs. It manages four types of objects: Replication Pairs Object, Replication Pair Object, Replication Object, and Replication Target Table.
Replication Pairs Object#
- Start all: Start all replication object which are stopped.
- Stop all: Stop all replication objects which are running.
- Quick Start all: Quick Start all replication objects which are stopped. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- Create Replication Pair: Create a pair of Replication Objects at two distinct DB Connections.
- Create Full-mesh Replications: Create full-meshed replication objects between selected DB Connections with identical named tables. For example, if four DB Connections are selected, sixteen (2^4) replication objects with the identical name are created.
- Collapse All: Collapse the tree to replication pair level.
- Expand to Replication Object: Expand the tree to replication object level.
- Expand to Replication Table: Expand the tree to replication table level.
Replication Pair Object#
- Start all: Start all replication object which are stopped in the Replication Pair.
- Stop all: Stop all replication objects which are running in the Replication Pair.
- Quick Start all: Quick Start all replication objects which are stopped in the Replication Pair. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- Drop: Drop Replication Objects in the selected Replication Pair. All Replication Objects should be stopped before using this function.
Replication Object#
The same as DB Connections pane.
Replication Target Table Object#
The same as DB Connections pane.
Map pane#
Map pane illustrates the physical layout and status of databases, replication objects, and the relationships therebetween. So, it carries only two types of objects: DB Connection Object and Replication Object.
DB Connection Object#
- Connect: Connect to the database with the given properties.
- Disconnect: Disconnect from the connected database.
- Start all: Start all replication object which are stopped in the DB Connection.
- Stop all: Stop all replication objects which are running in the DB Connection.
- Quick Start all: Quick Start all replication objects which are stopped in the DB Connection. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
Replication Object#
- Start: Start the selected Replication Object.
- Stop: Stop the selected Replication Object.
- Quick Start: Quick Start the selected Replication Object. This operation may cause the loss of not yet delivered data. Please refer to Replication User's Manual for details.
- Sync: Sync the selected Replication Object. It is equivalent to performing ALTER REPLICATION replication_name SYNC statement.
- Sync Only: Sync Only the selected Replication Object. It is equivalent to performing ALTER REPLICATION replication_name SYNC ONLY statement.
- Drop: Drop the selected Replication Object, which is stopped.
- Monitor: Open a monitor dialog for the selected Replication Object and the corresponding Replication Object.
- Show DDL: Print the schema to generate the selected Replication Object and its related objects, such as table, index, and so on.
- Compare DDL: Print the difference of schema between the selected Replication Object and the corresponding Replication Object.