Home > database >  Transparent gateway dblink Gbase 8 a database deployment
Transparent gateway dblink Gbase 8 a database deployment

Time:05-23

Data migration between clusters, usually in addition to using etl ground, also can be done through dblink tools, including isomorphism between can have not fall to the ground mode, the decrease of the intermediate IO bottleneck effect, at the same time can be many-to-many nodes interact, promote migration efficiency greatly, the following simple introduce Gbase 8 a dblink deployment and use,
. First of all, we through the website for download GBase8a_MPP_Cluster_Gateway_8 5.1.2 _build4. 15. The tar tool, uploaded to the server, the server can be as the cluster nodes, conditions allow a host can also be used independently, if is the interaction between gbase, there is no host performance bottlenecks, the configuration is not too low, if it is gbase interaction and oracle, the appropriate high IO performance to meet the requirements of files to the ground,
Environmental requirements: apply for opening of the cluster nodes to the network host and port, dblink default port 9898, also can through the conf configuration file. The properties for custom, if the usage scenarios for gbase interaction and oracle requires a host with oracle client to use on environment, configuration related depend on the path, ensure can pass the client to access oracle,
Extract the dblink package and execute permission gives host, speaking, reading and writing, with reference to the conf/dataSource/sample of the template file, write data source under the dataSource, naming format is: the data source name. The properties, such as xxx_link. The proerties, content format is as follows:
[an]
DataSource_IP=192.168.16.71
DataSource_port=5258
DataSource_dbname=xuanxx
DataSource_dbtype=gcluster
DataSource_user=user1
DataSource_pwd=PWD! QA2ws

Description:
DataSource_IP source libraries to connect IP
DataSource_port source database connection, the default 5258
Landing dataSource_dbname source-sink model name
DataSource_dbtype source library database type, have gcluster, oracle, etc.
DataSource_user source-sink log in to your account
DataSource_pwd source-sink password

Switch to the conf/gcluster, in gbase8a_gcluster. Properties configuration object library information, content format is as follows:
(gc1)
Gcluster_IP=192.168.16.91
Gcluster_port=5258
Gcluster_user=user2
Gcluster_pwd=PWD! QA2ws
Gcluster_encode=utf-8
[gc2]
Gcluster_IP=192.168.16.92
Gcluster_port=5258
Gcluster_user=user2
Gcluster_pwd=PWD! QA2ws
Gcluster_encode=utf-8

Description:
Gc *, on behalf of each node information module, the name can be custom, such as gc1, the following content for the landing node information, how many letters are there in the cluster nodes, that is, how much need to configure a module
Gcluster_IP target IP library node
Gcluster_port object library node in 5258
Gcluster_user object library user2
Gcluster_pwd object library password
Gcluster_encode=utf-8 object library code

To the object library configuration dblink connection parameters, as a result of these parameters as read-only, need to restart the cluster effect, after the configuration of each node configuration file/opt/gcluster/config/gbase_8a_gcluster. Increase the parameters under CNF:

Gbase_dblink_standby_gateway_ip=192.168.16.93
Gbase_dblink_standby_gateway_port=9898
Gbase_dblink_gateway_ip=192.168.16.94
Gbase_dblink_gateway_port=9898
Parameter description:
Gbase_dblink_standby_gateway_ip dblink configuration host IP
Gbase_dblink_standby_gateway_port dblink host configuration service port, the default 9898
Gbase_dblink_gateway_ip such as the need to configure the dblink can be high, standby dblink host IP
Gbase_dblink_gateway_port such as the need to configure the dblink can be high, standby dblink host port, the default 9898

With good after restart the cluster, through the show variables like '% gbase_dblink %'; Command to see whether parameters configuration is successful,

Start the dblink service,
Switch to the dblink installation directory, execute sh gt. Sh scripts start the service, through the ps - ef | grep -i gateway see if process started, if you need to shut down, can directly kill process,

Object library configuration using the link, such as the configuration name for links to access the source repository xuanxx_link xuanxx library, as follows:
Xuanxx data source files for the above configuration xxx_link. Proerties,
The CREATE DATABASE LINK xuanxx_link connect to 'identified by' using 'xuanxx_link';
Create success after, can be in the select * from gbase. Db_links,

The rolls to switch a model name (must) in a pattern name such as:
Gbase> Use gbase;
Of source-sink xuanxx library t_test table,
Gbase> Select * from t_test @ xuanxx_link;

Delete the configured dblink
Gbase> The drop DATABASE LINK xuanxx_link;
  • Related