赞
踩
一直以来想写下基于kettle的系列文章,作为较火的数据ETL工具,也是日常项目开发中常用的一款工具,最近刚好挤时间梳理、总结下这块儿的知识体系。
熟悉、梳理、总结下达梦(DM)关系型数据库相关知识体系
CentOS
)虚拟机环境,以便能够快速完成实验所需环境。CentOS 7.4 docker镜像服务器
DM Database Server 64 V8
Dbeaver
Kettle 8.2
yum update
,配置镜像源,卸载旧版本重新安装解决问题。
docker load -i dm8_20220822_rev166351_x86_rh6_64_ctm.tar # 载入镜像,替换为下载的文件名,不同下载名称可能不一致
docker run -tid -p 15236:15236 --restart=always --name dm8_20 --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e INSTANCE_NAME=dm8_01 -v /dm8_docker/data:/opt/dmdbms/data dm8_single:dm8_20230808_rev197096_x86_rh6_64
docker logs -f dm8_20 # 查看容器日志
docker exec -it cab166f00a4f /bin/bash # 进入容器登录数据库
ps -ef|grep dmserver
docker stop dm8_20 # 停止数据库命令
docker start dm8_20 # 启动数据库命令
docker restart dm8_20 # 重启数据库命令
# 查看 Docker 镜像中数据库初始化的参数
docker inspect dm8_20
5236:5236
),链接成功docker run -tid -p 5236:5236 --restart=always --name dm8_20 --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e INSTANCE_NAME=dm8_01 -v /dm8_docker/data:/opt/dmdbms/data dm8_single:dm8_20230808_rev197096_x86_rh6_64
# 其他命令
# 查看防火状态
systemctl status firewalld
service iptables status
# 暂时关闭防火墙
systemctl stop firewalld
systemctl enable firewalld
# 永久关闭防火墙
systemctl disable firewalld
# 重启防火墙
service iptables restart
# 开放端口
sudo iptables -I INPUT -p tcp --dport 5236 -j ACCEPT
sudo firewall-cmd --zone=public --add-port=5236/tcp --permanent
# 重新加载防火墙规则
sudo firewall-cmd --reload
create table employee
(
employee_id integer,
employee_name varchar2(20) not null,
hire_date date,
salary integer,
department_id integer not null
);
insert into employee VALUES (1, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (2, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (3, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (4, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (5, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (6, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (7, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (8, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (9, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (10, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (11, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (12, '王达梦','2008-05-30 00:00:00', 30000, 666);
insert into employee VALUES (13, '王达梦','2008-05-30 00:00:00', 30000, 666);
select * from employee;
update employee set salary='35000' where employee_id=9999;
jdk1.8
,适配达梦数据库DmJdbcDriver18.jar
DmJdbcDriver18.jar
放入kettle中的lib目录中。如下图所示,重启、测试链接jdbc:dm://192.168.10.183:5236/
dm.jdbc.driver.DmDriver
-- 镜像数据库默认用户名及密码
SYSDBA / SYSDBA001
表输入 、Execl输出
节点,测试后执行,并查看输出结果Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。