使用goldengate 迁移Oracle到postgresql

news2024/11/28 8:47:31

 环境:

--源端:

IP:10.0.4.16

hostname:tencent

Oracle数据库版本:12.2.0.1.0

ogg for oracle版本:19.1.0.0.4

SID:orcl

--目标端:

IP:10.0.4.16

hostname:tencent

postgresql数据库版本:14.6

ogg for postgresql版本:21.3.0.0.0

db:ogg

2、安装和配置OGG软件(源端),以下操作都是在源端操作

2.1创建安装目录

mkdir -p /oracle/ogg

2.2设置oracle环境变量

export ORACLE_BASE=/oracle/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1

export PATH=$ORACLE_HOME/bin:/oracle/ogg:$PATH

export OGGHOME=/oracle/ogg

export ORACLE_SID=orcl

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$OGGHOME:$LD_LIBRARY_PATH

export TNS_ADMIN=$ORACLE_HOME/network/admin

2.3建立OGG表空间和用户

create tablespace oggtbs datafile '/oradata/orcl/oggtbs.dbf' size 200M autoextend on;

create user ogg identified by ogg default tablespace ogg;

grant connect, resource TO ogg;

grant select any dictionary, select any table TO ogg;

grant flashback any table TO ogg;

grant execute on dbms_flashback TO ogg;

grant ALTER ANY TABLE to ogg;

grant insert any table to ogg;

grant update any table to ogg;

grant delete any table to ogg;

grant create table,create sequence to ogg;

grant execute on utl_file to ogg;

grant dba to ogg;

alter system set enable_goldengate_replication=true;

2.4添加附加日志和force logging,并切换日志

如果源端不开启归档,需添加多组日志。

alter database force logging;

alter database add SUPPLEMENTAL log data;

SQL>select NAME,OPEN_MODE,FORCE_LOGGING,SUPPLEMENTAL_LOG_DATA_MIN from v$database;

NAME OPEN_MODE FORCE_LOGGING SUPPLEME


ORCL READ WRITE YES YES

2.5 创建OGG的管理工作目录

在配置OGG进程之前,首先需要创建OGG的管理目录,执行以下操作:

GGSCI (tencent) 3> create subdirs

Creating subdirectories under current directory /oracle/ogg

Parameter file /oracle/ogg/dirprm: created.

Report file /oracle/ogg/dirrpt: created.

Checkpoint file /oracle/ogg/dirchk: created.

Process status files /oracle/ogg/dirpcs: created.

SQL script files /oracle/ogg/dirsql: created.

Database definitions files /oracle/ogg/dirdef: created.

Extract data files /oracle/ogg/dirdat: created.

Temporary files /oracle/ogg/dirtmp: created.

Credential store files /oracle/ogg/dircrd: created.

Masterkey wallet files /oracle/ogg/dirwlt: created.

Dump files /oracle/ogg/dirdmp: created.

只有提交事务的record才会被捕获。抽取、投递、应用日志的单位是record,而不是trail文件。

2.6配置MGR参数文件,并启动mgr

mgr进程是这些进程的管理和守护进程,目标端的mgr进程还与源端进行通信

edit params mgr

PORT 7809

GGSCI (tencent) 7> start mgr

Manager started.

GGSCI (tencent) 8> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

2.7添加extract进程 抽取进程:负责抓取需要传输的数据(添加进程的时候为抽取点,而不是启动进程的时候) 从21开始OGG需要配置tns #查看当前数据库语言 SQL> select userenv('language') from dual; USERENV('LANGUAGE')

AMERICAN_AMERICA.ZHS16GBK

--配置extract进程

#编辑参数

GGSCI (tencent as ogg@orcl) 21> edit params exta

extract exta

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

SETENV (ORACLE_HOME=/oracle/app/oracle/product/12.2.0/db_1)

SETENV (ORACLE_SID=orcl)

USERID ogg@orcl, PASSWORD ogg

DISCARDFILE ./dirrpt/exta.dsc,APPEND,MEGABYTES 1024

EXTTRAIL ./dirdat/ea

table hr.*;

#创建extract组

ADD EXTRACT exta, TRANLOG, BEGIN NOW

#创建本地 trail 文件

ADD EXTTRAIL ./dirdat/ea, EXTRACT exta, MEGABYTES 5

#启动extract进程

GGSCI (tencent as ogg@orcl) 22> start exta

GGSCI (tencent as ogg@orcl) 24> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT RUNNING EXTA 00:01:45 00:00:03

2.8投递进程

投递进程:

EDIT PARAMS pumpa

#编辑参数

GGSCI (tencent as ogg@orcl) 26> edit param pumpa

EXTRACT pumpa

SETENV (NLS_LANG=AMERICAN_AMERICA.UTF8)

PASSTHRU

RMTHOST 10.0.4.16, MGRPORT 7810

RMTTRAIL ./dirdat/pa

TABLE hr.*;

#用add extract指定本地 trail 文件

ADD EXTRACT pumpa, EXTTRAILSOURCE ./dirdat/ea

#用add rmttrail指定远程 trail 文件

ADD RMTTRAIL ./dirdat/pa, EXTRACT pumpa, MEGABYTES 5

#启动Pump进程

START EXTRACT pumpa

GGSCI (tencent) 13> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

EXTRACT RUNNING EXTA 00:00:00 00:00:00

EXTRACT RUNNING PUMPA 00:00:00 00:00:01

2.9生成define文件

在异构的同步复制中需要生成define文件。用于数据兼容不同数据库。

edit params defgen

#参数文件内容

defsfile ./dirdef/defgen.def

userid ogg, password ogg

TABLE hr.*;

#退出ggsci命令

GGSCI (tencent) 20> exit

#生成文件

[oracle@tencent ogg]$ defgen paramfile ./dirprm/defgen.prm

Oracle GoldenGate Table Definition Generator for Oracle

Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054

Linux, x64, 64bit (optimized), Oracle 12c on Oct 17 2019 13:20:56

Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.

Starting at 2023-07-25 23:54:08

Operating System Version:

Linux

Version #1 SMP Tue Jun 28 15:37:28 UTC 2022, Release 3.10.0-1160.71.1.el7.x86_64

Node: tencent

Machine: x86_64

soft limit hard limit

Address Space Size : unlimited unlimited

Heap Size : unlimited unlimited

File Size : unlimited unlimited

CPU Time : unlimited unlimited

Process id: 2283

** Running with the following parameters **

defsfile ./dirdef/defgen.def

userid ogg, password ***

TABLE hr.;Expanding wildcard table specification hr.:

Retrieving definition for HR.COUNTRIES.

Retrieving definition for HR.DEPARTMENTS.

Retrieving definition for HR.EMPLOYEES.

Retrieving definition for HR.EMP_DETAILS_VIEW.

2023-07-25 23:54:10 WARNING OGG-06439 No unique key is defined for table EMP_DETAILS_VIEW. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.

Retrieving definition for HR.JOBS.

Retrieving definition for HR.JOB_HISTORY.

Retrieving definition for HR.LOCATIONS.

Retrieving definition for HR.REGIONS.

Retrieving definition for HR.RSXY_QT_ZRRSBJN_TEMP.

2023-07-25 23:54:10 WARNING OGG-06439 No unique key is defined for table RSXY_QT_ZRRSBJN_TEMP. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.

Definitions generated for 9 tables in ./dirdef/defgen.def.

#生成文件后传送文件到目标端dirdef目录下

cp /oracle/ogg/dirdef/defgen.def /postgresql/ogg/dirdef

三、安装和配置OGG软件(目标端),以下操作都是在目标端操作

3.1 创建安装目录

mkdir -p /postgresql/ogg

3.2 配置环境变量

export PGHOME=/postgresql/pg14

export PGDATA=/postgresql/pgdata

export PATH=$PGHOME/bin:$OGGHOME:/usr/bin/isql:$PATH

export OGGHOME=/postgresql/ogg

export ODBCINI=$OGGHOME/odbc.ini

export LD_LIBRARY_PATH=$PGHOME/lib:/postgresql/ogg/lib:$LD_LIBRARY_PATH

3.3 创建ogg用户

[postgres@tencent dirdef]$ psql

psql (14.6)

Type "help" for help.

postgres=# create database ogg;

CREATE DATABASE

postgres=# create user ogg superuser password 'ogg';

CREATE ROLE

postgres=# \c ogg ogg

You are now connected to database "ogg" as user "ogg".

ogg=# \c

You are now connected to database "ogg" as user "ogg".

ogg=# create schema ogg;

CREATE SCHEMA

3.4 创建DSN

ogg for postgresql使用的是ODBC来连接数据库,因此需要指明ODBC dirver

--安装UnixODBC

yum install -y unixODBC.x86_64

--安装PostgresqlODBC

yum install -y postgresql-odbc.x86_64

--配置ODBC

cd /etc/ 复制odbcinst.ini到ogg的home目录下,查看odbcinst

(注意该文件不要改动)

[postgres@tencent ogg]$ cat odbcinst.ini

Example driver definitions

Driver from the postgresql-odbc package

Setup from the unixODBC package

[PostgreSQL]

Description = ODBC for PostgreSQL

Driver = /usr/lib/psqlodbcw.so

Setup = /usr/lib/libodbcpsqlS.so

Driver64 = /usr/lib64/psqlodbcw.so

Setup64 = /usr/lib64/libodbcpsqlS.so

FileUsage = 1

Driver from the mysql-connector-odbc package

Setup from the unixODBC package

[MySQL]

Description = ODBC for MySQL

Driver = /usr/lib/libmyodbc5.so

Setup = /usr/lib/libodbcmyS.so

Driver64 = /usr/lib64/libmyodbc5.so

Setup64 = /usr/lib64/libodbcmyS.so

FileUsage = 1

--配置odbc.ini,在该文件中填写

[postgres@tencent ogg]$ vi odbc.ini

[ODBC Data Sources]

gg_pg=DataDirect 14.6 PostgreSQL Wire Protocol #gg_pg数据库别名,与下面gg_pg相同

[ODBC]

IANAAppCodePage=106 #106等价于UTF8

InstallDir=/postgresql/ogg #ogg home目录

[gg_pg]

Driver=/postgresql/ogg/lib/GGpsql25.so #OGG安装目录下有内置ODBC驱动

Description=DataDirect 14.6 PostgreSQL Wire Protocol

Database=ogg

HostName=10.0.4.16

PortNumber=4519

--登录Postgresql数据库

修改profile文件,添加ODBCINI,指定ODBC DRIVER路径

[postgres@tencent ogg]$ vi ~/.bash_profile

export ODBCINI=$OGGHOME/odbc.ini

#添加odbcini访问路径,默认访问/etc目录下的odbc.ini

#此时isql访问数据库失败,可以忽略,如下

[postgres@tencent ogg]$ isql gg_pg

[ISQL]ERROR: Could not SQLConnect

#ggsci登录postgresql

[postgres@tencent ogg]$ ggsci

Oracle GoldenGate Command Interpreter for PostgreSQL

Version 21.3.0.0.0 OGGCORE_21.3.0.0.0_PLATFORMS_210728.1047

Oracle Linux 7, x64, 64bit (optimized), PostgreSQL on Aug 4 2021 20:27:55

Operating system character set identified as UTF-8.

Copyright (C) 1995, 2021, Oracle and/or its affiliates. All rights reserved.

GGSCI (tencent) 1> dblogin sourcedb gg_pg userid ogg,password ogg

2023-07-26 11:12:21 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.utf8.

2023-07-26 11:12:21 INFO OGG-03037 Session character set identified as UTF-8.

Successfully logged into database.

3.5 创建ogg目录

GGSCI (tencent) 1> create subdirs

Creating subdirectories under current directory /postgresql/ogg

Parameter file /postgresql/ogg/dirprm: created.

Report file /postgresql/ogg/dirrpt: created.

Checkpoint file /postgresql/ogg/dirchk: created.

Process status files /postgresql/ogg/dirpcs: created.

SQL script files /postgresql/ogg/dirsql: created.

Database definitions files /postgresql/ogg/dirdef: created.

Extract data files /postgresql/ogg/dirdat: created.

Temporary files /postgresql/ogg/dirtmp: created.

Credential store files /postgresql/ogg/dircrd: created.

Master encryption key wallet files /postgresql/ogg/dirwlt: created.

Dump files /postgresql/ogg/dirdmp: created.

3.6 配置mgr组

edit params mgr

GGSCI (tencent) 2> view param mgr

port 7810

GGSCI (tencent) 3> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

3.7 添加checkpoint表

为了保证源和目标端在传数据的时候不会重复或者少传,在目标端添加checkpoin表

GGSCI (tencent) 4> dblogin sourcedb gg_pg userid ogg,password ogg

2023-07-26 11:12:21 INFO OGG-03036 Database character set identified as UTF-8. Locale: en_US.utf8.

2023-07-26 11:12:21 INFO OGG-03037 Session character set identified as UTF-8.

Successfully logged into database.

GGSCI (tencent as ogg@gg_pg) 2> add checkpointtable ogg.checkpointtab

Successfully created checkpoint table ogg.checkpointtab.

3.8 配置replicate进程

#编辑参数文件

GGSCI (tencent) 6>edit params repa

REPLICAT repa

SOURCEDEFS ./dirdef/defgen.def

SETENV(ODBCINI=/postgresql/ogg/odbc.ini)

SETENV(NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

TARGETDB gg_pg,userid ogg,password ogg

DISCARDFILE ./ogg/dirrpt/repa.rpt, append

MAP hr.*, TARGET hr.*;

#添加 Replicat 进程

add replicat repa,exttrail ./dirdat/pa,begin now,checkpointtable ogg.checkpointtab

#启动 Replicat 进程

GGSCI (tencent as ogg@gg_pg) 8> start repa

#查看进程启动情况

GGSCI (tencent as ogg@gg_pg) 9> info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

REPLICAT RUNNING REPA 00:00:00 00:00:00

第四章 数据验证

--创建表结构

1、源端oracle执行

SQL> create table t1 (id int);

Table created.

#添加附加日志

GGSCI (tencent) 12> dblogin userid ogg,password ogg

Successfully logged into database.

GGSCI (tencent as ogg@orcl) 13> add trandata hr.*

2、目标端postgresql执行

ogg=# create user hr with password 'hr';

CREATE ROLE

ogg=# grant all on database ogg to hr;

GRANT

ogg=# create schema hr;

CREATE SCHEMA

ogg=# alter schema hr owner to hr;

ALTER SCHEMA

ogg=> create table hr.t1 (id int);

CREATE TABLE

ogg=> \d

List of relations

Schema | Name | Type | Owner

--------+------+-------+-------

hr | t1 | table | hr

(1 row)

--源端oracle插入数据

SQL> insert into t1 values(1);

1 row created.

SQL> commit;

Commit complete.

#查看数据插入情况

GGSCI (tencent) 10> stats exta

Sending STATS request to EXTRACT EXTA ...

Start of Statistics at 2023-07-26 11:35:09.

Output to /oracle/ogg/dirdat/ea:

Extracting from HR.T1 to HR.T1:

*** Total statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Daily statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Hourly statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Latest statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

End of Statistics.

#捕获进程正常,捕获一条数据

GGSCI (tencent) 11> stats pumpa

Sending STATS request to EXTRACT PUMPA ...

Start of Statistics at 2023-07-26 11:35:15.

Output to ./dirdat/pa:

Extracting from HR.T1 to HR.T1:

*** Total statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Daily statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Hourly statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Latest statistics since 2023-07-26 11:35:07 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

End of Statistics.

#传输进程正常,传输一条数据

--目标端postgresql查看数据 [postgres@tencent ogg]$ psql ogg hr psql (14.6) Type "help" for help. ogg=> \c You are now connected to database "ogg" as user "hr". ogg=> select * from t1; id

1

(1 rows)

GGSCI (tencent as ogg@gg_pg) 35> stats repa

Sending STATS request to Replicat group REPA ...

Start of statistics at 2023-07-26 11:46:17.

Replicating from HR.T1 to hr.t1:

*** Total statistics since 2023-07-26 11:46:09 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Daily statistics since 2023-07-26 11:46:09 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Hourly statistics since 2023-07-26 11:46:09 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

*** Latest statistics since 2023-07-26 11:46:09 ***

Total inserts 1.00

Total updates 0.00

Total deletes 0.00

Total upserts 0.00

Total discards 0.00

Total operations 1.00

End of statistics.

#数据应用正常,目标库插入一条数据。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/793435.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Spring 6【p命名空间和c命名空间】(五)-全面详解(学习总结---从入门到深化)

目录 十、p命名空间和c命名空间 十、p命名空间和c命名空间 老版本的Spring框架XML配置文件是使用DTD的,但是在目前Spring框架中多使用XSD。因为在XSD扩 展支持。这也是为什么Spring框架配置文件由原来的DTD更换成XML Schema,毕竟Spring现在是模块化了&…

java 锁详解

死锁有四个条件 1. 互斥性 某个锁单元只能被某个运算单元占用 2. 不可以剥夺 线程获取某个资源, 这个资源不可以被其他资源剥夺, 只能自己释放, 3. 请求并保持 请求别的资源的同时却保持占有某个资源 4. 形成循环链路 一般锁都有互斥性, 读锁没有互斥性. 一般的锁都不…

视觉系统相关的网站

1.视觉系统设计 视觉系统设计网址:http://www.vision-systems-china.com/emag/emag.asp

宿主可以访问公网 Docker容器里无法访问 Temporary failure in name resolution

宿主可以访问公网 Docker容器里无法访问 Temporary failure in name resolution 容器参数 docker-compose.yml 的 dns我也设置,按理来说应该可以访问,然而就是不断的按在地上摩擦 web:build: .restart: alwaysports:- "6699:80"dns:- 114.11…

公司内部重要文件如何加密防止泄露?

现如今,是互联网时代,数据安全在互联网时代中的数据安全岌岌可危,企业中,都会拥有终端,终端中每天都要处理文档,文件,表格,产生一系列的数据问题等,这个时候就要先企业中…

Windows OS CMD 常用工具 の 命令合集

# First Of All 每次想要修改环境变量都要按部就班点开系统属性、高级系统设置、环境变量。这种操作实在是太繁琐了,对于我一个懒人来讲实在是 忍无可忍 。如果可以使用 WINR 或 CMD 直接打开系统内的一些工具,是不是就可以节省很多时间;是不…

自己写的程序创建开机自启

1、winr 2、输入shell:startup 3、把需要启动的程序快捷方式放在此文件夹下面即可

最详细的编译paddleOcrGPU C++版本指南(包含遇到坑的解决办法)

前言: 我是之前编译过调用CPU的paddleOcr的C版本,其实CPU版本与GPU版本并无太大不同,只不过是调用库版本的不同,然后原项目中几个相关参数改一下就可以,但是在这个过程中我找不到关于编译paddleOcrGPU C版本的详细教程…

【Docker】Consul的容器服务更新与发现

目录 一、Consul二、什么是服务注册与发现1.2什么是consul1.3consul提供的一些关键特性 二、Consul部署2.1环境配置2.2Consul服务器配置1. 建立 Consul 服务2. 查看集群信息3. 通过 http api 获取集群信息 2.3 registrator服务器配置1. 安装 Gliderlabs/Registrator2. 测试服务…

如何设置Axure中文版 Mac系统下axurerp10怎么设置成中文

有许多小伙伴肯定想知道axure rp 10怎么转换为中文版,接下来就为大家带来最详细的汉化教程,大家可以根据教程一步一步操作,保证可以汉化成功! 准备工作 安装好axurerp10 axurerp10汉化包 百度网盘链接: 百度网盘 请输入提取码 …

【C++】做一个飞机空战小游戏(一)——使用getch()函数获得键盘码值

最近想用c做一个小游戏,游戏的主要内容是利用键盘控制一个飞机躲避和击落屏幕顶部随机掉落敌方炮弹,飞机被敌方炮弹击中则减掉一条命,飞机也可以发射炮弹反击,每击落一个敌方炮弹,则有相应积分。 游戏的思路就是利用w…

Docker配置阿里云容器镜像加速

天行健,君子以自强不息;地势坤,君子以厚德载物。 每个人都有惰性,但不断学习是好好生活的根本,共勉! 文章均为学习整理笔记,分享记录为主,如有错误请指正,共同学习进步。…

目录操作在C语言中:一个全面的指南

(꒪ꇴ꒪ ),hello我是祐言博客主页:C语言基础,Linux基础,软件配置领域博主🌍快上🚘,一起学习!送给读者的一句鸡汤🤔:集中起来的意志可以击穿顽石!作者水平很有限,如果发现错误&#x…

7.26 Qt

用QT制作一个登陆界面 运行代码 login.h #ifndef WIDGET_H #define WIDGET_H#include <QWidget> #include <QDebug> //信息调试类&#xff0c;用于输出 #include <QIcon> //图标类头文件 #include <QPushButton&…

更新合集 | 七月功能上新记

点击链接了解详情 七月来临&#xff0c;正式开启 2023 下半年的新征途&#xff01;这个盛夏&#xff0c;腾讯云 CODING 上线了微信扫码注册、微信通知、Go 制品管理等重点能力&#xff0c;为企业及团队研发管理带来更多便利&#xff01;以下是 CODING 新功能速递&#xff0c;快…

一文搞定IP地址

IP编址系列文章&#xff08;上&#xff09; 目录 一&#xff0c;什么是IP地址&#xff1f; 二&#xff0c;IP地址的表示方式 问题&#xff1a;计算机能识别二进制&#xff1f;十进制&#xff1f;十六进制&#xff1f; 三&#xff0c;二进制如何转换为十进制呢&#xff1f; …

如何准备远程开发环境

准备一台有root权限的服务器 创建用于开发的子用户 使用adduser命令创建新用户: sudo adduser newuser为新用户添加sudo权限,编辑sudoers文件: sudo visudo在文件中添加: newuser ALL(ALL:ALL) ALL将新用户添加到docker用户组: sudo usermod -aG docker newuser改权限 ch…

Java 聊天程序案例

单线程版本&#xff1a; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.ServerSocket; import java.net.Socket; import java.util.Scanner;//服务端 public class Server {public static void main(String…

HikariCP连接池

HikariCP连接池 HikariCP连接池是高性能的JDBC连接池&#xff0c;官网标注的三大特点&#xff1a;快速、简单、可靠&#xff0c;性能优于其他连接池。 官网详细地说明了HikariCP所做的一些优化&#xff0c;总结如下&#xff1a; 字节码精简&#xff1a;优化代码&#xff0c;直…

领跑人机协同时代!实在智能与EFCIO携手举办AI沙龙,推动企业数字化转型

GPT翻开了AGI&#xff08;通用人工智能&#xff09;领域的新篇章&#xff0c;也开启了各行各业的新时代。毫不夸张地说&#xff0c;进入大模型时代&#xff0c;所有的应用都值得被重写一遍。同时&#xff0c;企业也需要积极采纳新技术和创新模式&#xff0c;以应对竞争压力和不…