当前位置:网站首页>Kunlunbase instruction manual (III) data import & synchronization
Kunlunbase instruction manual (III) data import & synchronization
2022-07-29 10:31:00 【InfoQ】
One 、 Environmental Science
Two 、 Data export and import steps
2.1 In tables
2.1.1 Derived table structure
pg_dump -h 192.168.0.142 -p 5432 -tcustomer1_3 -t customer1_4 postgres-s>customer1_34str.sql (-s The parameter is only inverted table structure )
2.1.2 Export table data
pg_dump -h 192.168.0.142 -p 5432 -tcustomer1_3 -t customer1_4 postgres -a >customer1_34_data.sq
2.1.3 Restore table structure
psql --dbname=bktest3 --host=192.168.0.142 --port=5401 -U abc -f customer1_34str.sql
2.1.4 Restore table data
psql --dbname=bktest3 --host=192.168.0.142 --port=5401 -U abc -f customer1_34_data.sql
2.2 In terms of databases
2.2.1 Export full table structure
pg_dump -d postgres -U postgres -s>postgres_str.sql
2.2.2 Export the table data of the whole library
pg_dump -d postgres -U postgres -a>postgres_data.sql
pg_dump -d postgres -U postgres -a -Fc >postgres_data.dump ( Minimum size )
pg_dump -d postgres -U postgres -a -Ft >postgres_data.tar
2.2.3 Restore the whole database table structure
psql --dbname=bktest2 --host=192.168.0.142 --port=5401 -U abc -f postgres_str.sql
2.2.4 Restore all database table data
psql --dbname=bktest2 --host=192.168.0.142 --port=5401 -U abc -f postgres_data.sql
pg_restore -h 192.168.0.142 -p 5401 -U abc-d bktest2 postgres_data.dump
2.3 Oracle GoldenGate Real time synchronization PostgreSQL To KunlunBase
2.3.1 Installation and deployment Oracle GoldenGate

2.3.2 To configure PostgreSQL Data sources and KunlunBase The goal is
alter system set wal_level='logical';
alter system set max_replication_slots = 20;
[ODBC Data Sources]
PGDSN1=DataDirect 14 PostgreSQL Wire Protocol
PGDSN2=DataDirect 11 PostgreSQL Wire Protocol
[ODBC]
IANAAppCodePage=106
InstallDir=/ogg21/ogg_ma
[PGDSN1]
Driver=/ogg21/ogg_ma/lib/GGpsql25.so
Description=DataDirect 14 PostgreSQL Wire Protocol
Database=PGSOUR
HostName=192.168.0.10
PortNumber=5432
LogonID=postgres
Password=Kunluntest
[PGDSN2]
Driver=/ogg21/ogg_ma/lib/GGpsql25.so
Description=DataDirect 11 PostgreSQL Wire Protocol
Database=KunlunDB
HostName=192.168.0.12
PortNumber=5401
LogonID=postgres
Password=Kunluntest
2.3.3 Configure replication environment



2.3.4 To configure & Start extraction process

extract ext1
SETENV(PGCLIENTENCODING = "UTF8" )
SETENV(ODBCINI="/ogg21/ogg_ma/odbc.ini" )
SOURCEDB PGDSN1 USERIDALIAS PG1, DOMAIN OGGMA
exttrail ./dirdat/e1
IGNOREREPLICATES
TRANLOGOPTIONS FILTERTABLE ogg.ckpt
table public.*;
2.3.5 To configure & Start the replication process

replicat rep1
SETENV(PGCLIENTENCODING = "UTF8" )
SETENV(ODBCINI="/ogg21/ogg_ma/odbc.ini" )
SETENV(NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
TARGETDB PGDSN2 USERIDALIAS PG2, DOMAIN OGGMA
map public.*, target public.*;
2.3.6 Perform synchronization and check synchronization


2.3.7 Pressure test
sysbench oltp_read_write --table-size=100000 --tables=10 --pgsql-host=192.168.0.10 --pgsql-port=5432 --pgsql-user=postgres --pgsql-password=Kunluntest --pgsql-db=PGSOURE --db-ps-mode=disable --threads=1 --db-driver=pgsql prepare
sysbench oltp_read_write --table-size=100 --tables=10 --pgsql-host=192.168.0.12 --pgsql-port=5401 --pgsql-user=abc --pgsql-password=abc --pgsql-db=postgres --db-ps-mode=disable --threads=10 --db-driver=pgsql --time=600 run
select count(*) from sbtest10;
count
-------
100000
(1 row)
END
边栏推荐
- The server
- Print out the "hourglass" and the remaining number according to the given number of characters and characters
- 敏捷开发如何消减协作中的认知偏差?| 敏捷之道
- 会议OA项目(五)---- 会议通知、反馈详情
- SAP Fiori @OData. Analysis of the working principle of publish annotation
- [QNX hypervisor 2.2 user manual]7.2.1 hypervisor tracking events
- [paper reading] q-bert: Hessian based ultra low precision quantification of Bert
- 跟着田老师学实用英语语法(持续更新)
- Follow teacher Tian to learn practical English Grammar (continuous update)
- Where are those test / development programmers in their 30s? a man should be independent at the age of thirty......
猜你喜欢

关系型数据库之MySQL8——由内而外的深化全面学习
![[jetson][转载]jetson上安装pycharm](/img/65/ba7f1e7bd1b39cd67018e3f17d465b.png)
[jetson][转载]jetson上安装pycharm

Follow teacher Wu to learn advanced numbers - function, limit and continuity (continuous update)
![[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types](/img/3c/eaadcc105377f012db5ee8852b5e28.png)
[Yugong series] go teaching course 010 in July 2022 - Boolean and character types of data types

Object storage

Second handshake?? Three waves??
![[jetson][reprint]pycharm installed on Jetson](/img/65/ba7f1e7bd1b39cd67018e3f17d465b.png)
[jetson][reprint]pycharm installed on Jetson

Easy to understand and explain the gradient descent method!
![[paper reading] i-bert: integer only Bert quantification](/img/2e/4f574b266ec6fc88ffa5dab56f2b8d.png)
[paper reading] i-bert: integer only Bert quantification

This is the right way for developers to open artifacts
随机推荐
PDF处理还收费?不可能
二次握手??三次挥手??
Scrape crawler framework
Uniswap entered the NFT trading market and opensea took the lead
Oracle advanced (XIV) explanation of escape characters
Does neural network sound tall? Take you to train a network from scratch (based on MNIST)
Soft exam summary
remap_ Use of table in impdp
Big cloud service company executives changed: technology gives way to sales
[semantic segmentation] 2021-pvt2 cvmj
皕杰报表之文本附件属件
3道软件测试面试题,能全答对的人不到10%!你会几个?
Oncopy and onpaste
【论文阅读】Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
Follow teacher Tian to learn practical English Grammar (continuous update)
Create PHP message board system with kubernetes
After the thunderstorm of two encryption companies: Celsius repayment guarantee collateral, three arrow capital closed and disappeared
Why use markdown to write?
[FPGA tutorial case 18] develop low delay open root calculation through ROM
Understanding of Arduino circuit