
listen_addresses = '*'
wal_level = logical
host all all 0.0.0.0/0 md5
#Step1 下载安装包,放到/usr/local目录下ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.7.tar.gz#Step2 安装cd usr/localtar zxvf unixODBC-2.3.7.tar.gz#Step3 配置、编译、安装cd unixODBC-2.3.7./configure --prefix=/usr/local/unixODBC-2.3.7 --includedir=/usr/include --libdir=/usr/lib --bindir=/usr/bin --sysconfdir=/etcmake&make install



https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html

cd usr/localrpm -ivh oracle-instantclient19.8-basic-19.8.0.0.0-1.x86_64.rpmrpm -ivh oracle-instantclient19.8-odbc-19.8.0.0.0-1.x86_64.rpmrpm -ivh oracle-instantclient19.8-devel-19.8.0.0.0-1.x86_64.rpmrpm -ivh oracle-instantclient19.8-sqlplus-19.8.0.0.0-1.x86_64.rpm
export TNS_ADMIN=/etc/oracleexport ORACLE_HOME=/usr/lib/oracle/19.8/client64export LD_LIBRARY_PATH=$ORACLE_HOME/libexport ORCLE_SID=ORCLPATH=$PATH:$HOME/bin:$ORACLE_HOME/binexport C_INCLUDE_PATH=/usr/include/oracle/19.8/client64export LIBRARY_PATH=$ORACLE_HOME/libexport NLS_LANG=AMERICAN_AMERICA.AL32UTF
source ~/.bash_profile
yum install bison flex
rpm -ivh Dbrep-1.0-1.el7.x86_64.rpm
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/Dbrep
source ~/.bash_profile

create database testfor;
create table table_name(xxx,xxx,xxx);
create publication pub_name for table table_name;
./Dbrep_init.sh
pubnames=pub_name
./Dbrep_recvlogical -h PG_host_address -U user_name -d db_name -p 5866 --slot slot_name --create-slot
./Dbrep_recvlogical -U postgres -h PG_host_address -d test -p 5866 --slot ut1 –-start
nohup ./Dbrep_recvlogical -U postgres -h PG_host_address -d test -p 5866 --slot ut1 –-start &
alter publication pub_ut1 add table table_name;
alter publication pub_ut1 drop table table_name;
./Dbrep_recvlogical -h PG_host_address -U user_name -d db_name -p 5866 --slot slot_name --drop-slot
rm -rf /usr/local/Dbrep/lsn
create table tbl_Dbrep_other3(userid char(4),username varchar(20),col_bigint bigint,col_bigserial bigserial,col_text text,col_timewithouttz time without time zone,col_money money);alter publication pub_test add table tbl_Dbrep_other3;

create table tbl_Dbrep_other3(userid char(4),username varchar(20),col_bigint bigint,col_bigserial bigint,col_text text,col_timewithouttz time,col_money numeric(19,2));

insert into tbl_Dbrep_other3 values('0001','Jessca',2147483647,2147483647,'《一去二三里》 一去二三里,烟村四五家。亭台六七座,八九十枝花。',time without time zone '2021-08-19 10:00:53',12345678900000000.01);select * from tbl_Dbrep_other3;

select * from tbl_Dbrep_others2;

瀚高数据库 | 目标库(某国产数据库) |
boolean | char |
smallint | smallint |
int | int |
bigint | bigint |
numeric | Numeric |
decimal | decimal |
real | real |
double precision | double precision |
serial | serial |
bigserial | bigserial |
char(n) | char(n) n<8188 |
varchar(n) | varchar(n) n < 8188 |
text | text |
bytea | blob |
timestamp[p] without time zone | timestamp[p] without time zone |
date | date |
time[p] whthout time zone | time |
interval | varchar2(45) |
money | number(19,2) |
bit(n) | char(n) |
inet | varchar |
cidr | varchar |
macaddr | varchar |
xml | text |
json | text |
uuid | varchar(36) |
文章转载自瀚高售前团队,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




