当前位置: 首页 > news >正文

【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(下)

系列文章目录

【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(上)
【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(中)
【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(下)


文章目录

  • 系列文章目录
  • 前言
  • 八、配置支持DDL同步操作
    • 1、@marker_setup.sql
    • 2、@ddl_setup.sql
    • 3、@role_setup.sql
    • 4、@ddl_enable.sql
    • 5、@marker_status.sql
  • 九、配置主库到备库同步(支持DDL)
    • 1、源端配置
    • 2、源端新增抽取进程配置
    • 3、源端配置投递进程配置
    • 4、源端增加抽取进程
    • 5、源端增加投递进程
    • 6、源端添加表级别附加日志
    • 7、启动Extract和PUMP进程
    • 8、目的端编辑REPLICAT进程配置
    • 9、添加应用进程
    • 10、源端导出emp.dept表并传到目的端应用
      • 10.1、源端通过数据泵导出表
      • 10.2、目的端配置导入目录
      • 10.3、将源端导出的dump文件传到目的端
      • 10.4、目标端导入数据到原表
      • 10.5、OGG库审计表数据初始化
      • 10.6、OGG库添加ETLTIME字段
      • 10.7、OGG库ETLTIME字段数据初始化
      • 10.8、OGG库添加索引,防止进程lag过高
    • 11、启动应用进程
    • 12、验证
      • 12.1、源端操作
      • 12.2、目的端查看
  • 总结


前言

博主所在单位目前使用Oracle GoldenGate将各个业务生产库汇聚到一起做数仓实时ODS平台,源端库可能涉及Oracle、Mysql、达梦、Guassdb库。
之前写过一系列关于GoldenGate异构同步Mysql、Kafka、Kylin、Flink做实时计算的场景文章。但是突然发现,卧槽最最最应该第一个做的Oracle->Oracle的实时异构同步文档竟然没写!
来弥补一下这个空白!!!
好了,扯远了,回归技术!
下面是我给大家的生产环境下,如何部署GoldenGate12C及异构实时同步数据的解决方案。本文主要介绍如何实现实时异构的进行Oracle->Oracle的数据同步,这种数据同步适用于灾备、升级、实时ODS等场景使用。我这里给大家了三个GoldenGate部署方式,看大家喜欢用哪种吧!!
注意:本部署方案分为三章节,三章节的重点分别是:

  • GoldenGate12C安装前,数据库层面的准备工作!!!
  • 给你GoldenGate12C的三种部署方式,看你喜欢哪种部署方式!!!
  • 配置支持DDL操作的实时数据同步!!!

八、配置支持DDL同步操作

在源库执行,根据提示输入ogg管理账户:ogg

[oracle@source ogg12]$ cd $GGHOME
[oracle@source ogg12]$ sqlplus / as sysdba

执行如下脚本:

1、@marker_setup.sql

SQL>  @marker_setup.sqlMarker setup scriptYou will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.Enter Oracle GoldenGate schema name:OGGMarker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to OGGMARKER TABLE
-------------------------------
OKMARKER SEQUENCE
-------------------------------
OKScript complete.

2、@ddl_setup.sql

该脚本创建了进行DDL抽取所需要的触发器和包。
主要提示:执行此脚本时,所有发出DDL的会话都必须关闭并重新连接,否则可能会发生错误6508(找不到被调用的程序单元)并且DDL操作可能会失败。这是因为一个已知的Oracle bug#2747350。
未关闭的DDL会话会以列表的形式显示出来。

3、@role_setup.sql

该脚本删除并且重建DDL同步所需要的角色,它授权管理账户对DDL对象上的DML权限
根据提示执行如下授权操作:

Grant GGS_GGSUSER_ROLE to ogg;

4、@ddl_enable.sql

改脚本创建DDL触发器,以捕获DDL操作,用于向marker和history表插入DDL信息

5、@marker_status.sql

验证ddl安装
如下即正常安装ddl支持

SQL> @marker_status.sql
Please enter the name of a schema for the GoldenGate database objects:
OGG
Setting schema name to OGGMARKER TABLE
-------------------------------
OKMARKER SEQUENCE
-------------------------------
OK

九、配置主库到备库同步(支持DDL)

需求:将源端scott用户下的emp,dept 表通过ogg同步到目的端 ,逻辑同生产ODS

1、源端配置

MGR进程配置(源端和目的端都做下面操作,添加的参数也一样):

GGSCI (source) 6> info all    Program     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING   
GGSCI (source) 7> edit params mgr
--加入下面内容
PORT 7809
DYNAMICPORTLIST 7810-7860
AUTORESTART ER *, RETRIES 3, WAITMINUTES 5
PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 30
lagreporthours 1
laginfominutes 30
lagcriticalminutes 60
--保存退出后,重启管理进程,让配置生效:
GGSCI (source) 8> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y/n)?ySending STOP request to MANAGER ...
Request processed.
Manager stopped.GGSCI (source) 9> start mgr
Manager started.
GGSCI (source) 10> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING           

2、源端新增抽取进程配置

GGSCI (source) 12> edit params e_sc    
--加入如下内容:
extract e_sc
userid ogg,password ogg
setenv(NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
setenv(ORACLE_SID="orcl")
reportcount every 30 minutes,rate
numfiles 5000
discardfile ./dirrpt/e_sc.dsc,append,megabytes 1000
warnlongtrans 2h,checkinterval 30m
exttrail ./dirdat/sc
dboptions allowunusedcolumn
tranlogoptions archivedlogonly
tranlogoptions altarchivelogdest primary /u01/arch
ddl include mapped
ddloptions addtrandata,report
notcpsourcetimer
nocompressupdates
fetchoptions USEROWID
NOCOMPRESSDELETES
----------scott.EMP
table SCOTT.EMP,tokens(
TKN-CSN = @GETENV('TRANSACTION', 'CSN'),
TKN-COMMIT-TS = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'),
TKN-OP-TYPE = @GETENV ('GGHEADER', 'OPTYPE')
);
----------SCOTT.DEPT
table SCOTT.DEPT,tokens(
TKN-CSN = @GETENV('TRANSACTION', 'CSN'),
TKN-COMMIT-TS = @GETENV ('GGHEADER', 'COMMITTIMESTAMP'),
TKN-OP-TYPE = @GETENV ('GGHEADER', 'OPTYPE')
);

3、源端配置投递进程配置

GGSCI (source) 13>edit params d_sc
--加入如下内容:
extract d_sc
rmthost 192.168.1.10,mgrport 7809,compress
userid ogg,password ogg
PASSTHRU
numfiles 5000
rmttrail ./dirdat/sc
dynamicresolution
table scott.*;

4、源端增加抽取进程

GGSCI (source) 16> add extract e_sc,tranlog,begin now
EXTRACT added.GGSCI (source) 17> add exttrail ./dirdat/sc,extract e_sc,megabytes 500
EXTTRAIL added.

5、源端增加投递进程

add extract d_sc,exttrailsource ./dirdat/sc
add rmttrail ./dirdat/sc,extract d_sc,megabytes 500

6、源端添加表级别附加日志

GGSCI (source) 40> dblogin userid ogg,password ogg
Successfully logged into database.GGSCI (source as ogg@orcl) 41> add trandata SCOTT.EMPLogging of supplemental redo data enabled for table SCOTT.EMP.
TRANDATA for scheduling columns has been added on table 'SCOTT.EMP'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.EMP'.
GGSCI (source as ogg@orcl) 42> GGSCI (source as ogg@orcl) 42> add trandata SCOTT.DEPTLogging of supplemental redo data enabled for table SCOTT.DEPT.
TRANDATA for scheduling columns has been added on table 'SCOTT.DEPT'.
TRANDATA for instantiation CSN has been added on table 'SCOTT.DEPT'.
GGSCI (source as ogg@orcl) 43> info trandata SCOTT.EMPLogging of supplemental redo log data is enabled for table SCOTT.EMP.Columns supplementally logged for table SCOTT.EMP: EMPNO.Prepared CSN for table SCOTT.EMP: 1108355

7、启动Extract和PUMP进程

GGSCI (source) 38> start er *Sending START request to MANAGER ...
EXTRACT D_SC startingSending START request to MANAGER ...
EXTRACT E_SC startingGGSCI (source) 39> info allProgram     Status      Group       Lag at Chkpt  Time Since ChkptMANAGER     RUNNING                                           
EXTRACT     RUNNING     D_SC        00:00:00      00:00:04    
EXTRACT     RUNNING     E_SC        00:00:00      00:00:04    

8、目的端编辑REPLICAT进程配置

GGSCI (ogg) 1> edit params mgr
---加入下面配置
replicat r_sc
setenv(NLS_LANG=AMERICAN_AMERICA.UTF8)
userid ogg,password ogg
reportcount every 30 minutes,rate
reperror default,abend
numfiles 20000
checkpointsecs 40
assumetargetdefs
discardfile ./dirrpt/r_sc.dsc,append,megabytes 1000
allownoopupdates
ddl &
include mapped &
exclude objname scott.*_audit &
exclude optype create &objtype 'table' &
exclude optype drop &objtype 'table' &
exclude objtype 'index' &objname scott.*_his &
exclude instr 'constraint' &
--exclude instr 'null' &
exclude instr 'trigger' &
exclude instr 'rename to' &
exclude instr 'grant' &
exclude instr 'revoke' &
exclude instr 'analyze'
ddloptions report
allowduptargetmap
----------EMP
getinserts
getupdates
getdeletes
noupdatedeletes
map SCOTT.EMP,target SCOTT.EMP,keycols(EMPNO),colmap(
usedefaults,
etltime=@DATENOW()
);
ignoreinserts
ignoreupdates
getdeletes
INSERTDELETES
map SCOTT.EMP,target SCOTT.EMP_HIS,keycols(EMPNO),colmap(
usedefaults,
etltime=@DATENOW()
);
NOINSERTDELETES
updatedeletes
getinserts
getupdates
getdeletes
map SCOTT.EMP,target SCOTT.EMP_AUDIT,keycols(EMPNO),colmap(
EMPNO=@if(@strfind(@token('tkn-op-type'),'PK UPDATE')>0,before.EMPNO,EMPNO),
csn=@token('tkn-csn'),
optime=@token('tkn-commit-ts'),
optype=@if(@strfind(@token('tkn-op-type'),'PK UPDATE')>0,'DELETE',@token('tkn-op-type')),
inserttime=@eval(@strfind(@token('tkn-op-type'),'INSERT')>0,@token('tkn-commit-ts')),
curdate=@DATENOW()
);
ignoreinserts
getupdates
ignoredeletes
map SCOTT.EMP,target SCOTT.EMP_AUDIT,keycols(EMPNO),colmap(
usedefaults,
csn=@token('tkn-csn'),
optime=@token('tkn-commit-ts'),
optype=@case(@token('tkn-op-type'),'PK UPDATE','INSERT'),
inserttime=@token('tkn-commit-ts'),
curdate=@DATENOW()
),filter(@strfind(@token('tkn-op-type'),'PK UPDATE') >0),insertallrecords;
----------DEPT
getinserts
getupdates
getdeletes
noupdatedeletes
map SCOTT.DEPT,target SCOTT.DEPT,keycols(DEPTNO),colmap(
usedefaults,
etltime=@DATENOW()
);
ignoreinserts
ignoreupdates
getdeletes
INSERTDELETES
map SCOTT.DEPT,target SCOTT.DEPT_HIS,keycols(DEPTNO),colmap(
usedefaults,
etltime=@DATENOW()
);
NOINSERTDELETES
updatedeletes
getinserts
getupdates
getdeletes
map SCOTT.DEPT,target SCOTT.DEPT_AUDIT,keycols(DEPTNO),colmap(
DEPTNO=@if(@strfind(@token('tkn-op-type'),'PK UPDATE')>0,before.DEPTNO,DEPTNO),
csn=@token('tkn-csn'),
optime=@token('tkn-commit-ts'),
optype=@if(@strfind(@token('tkn-op-type'),'PK UPDATE')>0,'DELETE',@token('tkn-op-type')),
inserttime=@eval(@strfind(@token('tkn-op-type'),'INSERT')>0,@token('tkn-commit-ts')),
curdate=@DATENOW()
);
ignoreinserts
getupdates
ignoredeletes
map SCOTT.DEPT,target SCOTT.DEPT_AUDIT,keycols(DEPTNO),colmap(
usedefaults,
csn=@token('tkn-csn'),
optime=@token('tkn-commit-ts'),
optype=@case(@token('tkn-op-type'),'PK UPDATE','INSERT'),
inserttime=@token('tkn-commit-ts'),
curdate=@DATENOW()
),filter(@strfind(@token('tkn-op-type'),'PK UPDATE') >0),insertallrecords;

9、添加应用进程

GGSCI (ogg) 8> dblogin userid ogg,password ogg
Successfully logged into database.GGSCI (ogg as ogg@ogg) 9> ADD CHECKPOINTTABLE ogg.ckpt
Successfully created checkpoint table ogg.ckpt.GGSCI (ogg as ogg@ogg) 10> add replicat r_sc,exttrail ./dirdat/sc checkpointtable ogg.ckpt

10、源端导出emp.dept表并传到目的端应用

10.1、源端通过数据泵导出表

[oracle@source ogg12]$ mkdir /u01/exp--创建目录
[oracle@source ogg12]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 20 18:34:35 2018Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> create directory expdir as '/u01/exp';Directory created.SQL> grant read,write on directory  expdir to scott;Grant succeeded.SQL> grant dba to scott;--这个权限是为了测试方便所以给的dba权限。生产慎用Grant succeeded.
SQL> set num 50
SQL> select current_scn from v$database;---查询当前scnCURRENT_SCN
--------------------------------------------------1108836
SQL> exit 
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options[oracle@source ~]$ expdp \' / as sysdba\' directory=EXPDIR dumpfile=expdp_20180920.dmp logfile=expdp_20180920.log tables=SCOTT.EMP,SCOTT.DEPT exclude=ref_constraint flashback_scn=1108836 Export: Release 11.2.0.4.0 - Production on Thu Sep 20 18:45:47 2018Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYS"."SYS_EXPORT_TABLE_01":  "/******** AS SYSDBA" directory=EXPDIR dumpfile=expdp_20180920.dmp logfile=expdp_20180920.log tables=SCOTT.EMP,SCOTT.DEPT exclude=ref_constraint flash
back_scn=1108836 Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 128 KB
Processing object type TABLE_EXPORT/TABLE/PROCACT_INSTANCE
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SCOTT"."DEPT"                              5.929 KB       4 rows
. . exported "SCOTT"."EMP"                               8.562 KB      14 rows
Master table "SYS"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_TABLE_01 is:/u01/exp/expdp_20180920.dmp
Job "SYS"."SYS_EXPORT_TABLE_01" successfully completed at Thu Sep 20 18:46:21 2018 elapsed 0 00:00:24

10.2、目的端配置导入目录

[oracle@ogg ~]$ mkdir /u01/imp
[oracle@ogg ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 20 18:34:24 2018Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> create directory expdir as '/u01/exp';Directory created.SQL> create directory impdir as '/u01/imp';Directory created.SQL> grant read,write on directory  impdir to scott;Grant succeeded.

10.3、将源端导出的dump文件传到目的端

[oracle@source ~]$ scp /u01/exp/expdp_20180920.* 192.168.1.10:/u01/imp/
oracle@192.168.1.10's password: 
expdp_20180920.dmp                                                                                                                                         100%  168KB 168.0KB/s   00:00    
expdp_20180920.log    

10.4、目标端导入数据到原表

impdp \' / as sysdba\' directory=IMPDIR dumpfile=expdp_20180920.dmp logfile=expdp_20180920.log

10.5、OGG库审计表数据初始化

create table SCOTT.EMP_AUDIT
(EMPNO   NUMBER(4),CSN        NUMBER,OPTIME     TIMESTAMP(6),OPTYPE     VARCHAR2(20),INSERTTIME TIMESTAMP(6),CURDATE    TIMESTAMP(6)
);
create table SCOTT.DEPT_AUDIT
(DEPTNO   NUMBER(2),CSN        NUMBER,OPTIME     TIMESTAMP(6),OPTYPE     VARCHAR2(20),INSERTTIME TIMESTAMP(6),CURDATE    TIMESTAMP(6)
);
insert into SCOTT.EMP_AUDIT select EMPNO,1108836,sysdate,'INITIAL',sysdate,'' from SCOTT.EMP;
insert into SCOTT.DEPT_AUDIT select DEPTNO,1108836,sysdate,'INITIAL',sysdate,'' from SCOTT.DEPT;
commit;

10.6、OGG库添加ETLTIME字段

---目标表
alter table  scott.emp add etltime timestamp;
alter table  scott.dept add etltime timestamp;
---HIS表
alter table  scott.emp_HIS add etltime timestamp;
alter table  scott.dept_HIS add etltime timestamp;

10.7、OGG库ETLTIME字段数据初始化

----目标表
update scott.emp set etltime=sysdate;
update scott.dept set etltime=sysdate;
commit;

10.8、OGG库添加索引,防止进程lag过高

CREATE INDEX scott.emp_idx  ON scott.emp_audit(empno);
CREATE INDEX scott.dept_idx  ON scott.dept_audit(deptno);

11、启动应用进程

start replicat r_sc aftercsn 1108836

12、验证

12.1、源端操作

[oracle@source ~]$ sqlplus scott/tigerSQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 20 19:11:57 2018Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> alter table dept add test number;Table altered.SQL> insert into dept values(50,'a','a','1');1 row created.SQL> alter table dept drop column test;Table altered.SQL> alter system switch logfile;System altered.SQL> alter system switch logfile;
alter system switch logfile;System altered.

12.2、目的端查看

在这里插入图片描述
看一下日志,DDL也正常应用了:

2018-09-20 19:00:49  INFO    OGG-06510  Using the following key columns for target table SCOTT.DEPT_AUDIT: DEPTNO.2018-09-20 19:00:49  INFO    OGG-03010  Performing implicit conversion of column data from character set UTF-8 to zhs16gbk.2018-09-20 19:00:49  INFO    OGG-00482  DDL found, operation [alter table dept drop column test  (size 34)].2018-09-20 19:00:49  INFO    OGG-00489  DDL is of mapped scope, after mapping new operation [alter table "SCOTT"."DEPT" drop column test  (size 44)].2018-09-20 19:00:49  INFO    OGG-00487  DDL operation included [include mapped], optype [ALTER], objtype [TABLE], objowner [SCOTT], objname [DEPT].2018-09-20 19:00:49  INFO    OGG-01407  Setting current schema for DDL operation to [SCOTT].2018-09-20 19:00:49  INFO    OGG-00484  Executing DDL operation.2018-09-20 19:00:50  INFO    OGG-00483  DDL operation successful.2018-09-20 19:00:50  INFO    OGG-01408  Restoring current schema for DDL operation to [OGG].2018-09-20 19:00:50  INFO    OGG-00489  DDL is of mapped scope, after mapping new operation [alter table "SCOTT"."DEPT_HIS" drop column test  /* GOLDENGATE_DDL_REPLICATION */ (size 81)].2018-09-20 19:00:50  INFO    OGG-00487  DDL operation included [include mapped], optype [ALTER], objtype [TABLE], objowner [SCOTT], objname [DEPT_HIS].2018-09-20 19:00:50  INFO    OGG-01407  Setting current schema for DDL operation to [SCOTT].2018-09-20 19:00:50  INFO    OGG-00484  Executing DDL operation.2018-09-20 19:00:50  INFO    OGG-00483  DDL operation successful.2018-09-20 19:00:50  INFO    OGG-01408  Restoring current schema for DDL operation to [OGG].2018-09-20 19:00:50  INFO    OGG-00489  DDL is of mapped scope, after mapping new operation [alter table "SCOTT"."DEPT_AUDIT" drop column test  /* GOLDENGATE_DDL_REPLICATION */ (size 83)].2018-09-20 19:00:50  INFO    OGG-00488  DDL operation excluded [exclude objname scott.*_audit], optype [ALTER], objtype [TABLE], objowner [SCOTT], objname [DEPT_AUDIT].

总结

我用了三个章节介绍完了生产环境下如何实时异构同步Oracle->Oracle,且其中包括了如何初始化以及增量应该从哪个时间点开始才能够保证数据不重复、不丢失,如果有用到的各位可以作为参考!!!

相关文章:

【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(下)

系列文章目录 【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(上) 【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate)12.2实时异构同步Oracle数据部署方案(中) 【大数据实时数据同步】超级详细的生产环境OGG(GoldenGate…...

ESP32设备驱动-土壤湿度传感器驱动

土壤湿度传感器驱动 1、土壤湿度传感器介绍 土壤湿度传感器由两个探头组成,用于测量水的体积含量。 两个探头让电流通过土壤,然后得到电阻值来测量水分值。 当有更多的水时,土壤会传导更多的电,这意味着电阻会更小。 因此,水分含量会更高。 干燥的土壤导电性差,所以当…...

公网远程连接MongoDB数据库【内网穿透】

文章目录1. 安装数据库2. 内网穿透2.1 创建隧道映射2.2 测试随机公网地址远程连接3. 配置固定TCP端口地址3.1 保留一个固定的公网TCP端口地址3.2 配置固定公网TCP端口地址3.3 测试固定地址公网远程访问MongoDB是一个基于分布式文件存储的数据库。由C语言编写。旨在为WEB应用提供…...

SQL注入——floor报错注入

目录 一,涉及到的函数 rand() floor() concat_ws() as别名,group by分组 count() 报错原理 一,涉及到的函数 rand()函数:随机返回0~1间的小数 floor()函数:小数向…...

P6入门:在EPS下创建项目(P6Professional)

引言 在 Primavera P6 中,一旦创建了企业项目结构EPS,就可以开始向该结构添加项目。项目是一组活动和数据,它们构成了创建产品或服务的计划。项目有开始日期和结束日期,可以包括活动、资源、工作分解结构、组织分解结构、日历、关…...

Linux安装及管理应用和账号和权限管理 讲解

♥️作者:小刘在C站 ♥️个人主页:小刘主页 ♥️每天分享云计算网络运维课堂笔记,努力不一定有收获,但一定会有收获加油!一起努力,共赴美好人生! ♥️夕阳下,是最美的绽放&#xff0…...

【JDK1.8 新特性】Stream API

1. 前言 Java8中有两大最为重要的改变。第一个是 Lambda 表达式;另外一个则是 Stream API。Stream API ( java.util.stream) 把真正的函数式编程风格引入到Java中。这是目前为止对Java类库最好的补充,因为Stream API可以极大提供Java程序员的生产力&…...

Springboot Maven打包跳过测试的五种方式总结 -Dmaven.test.skip=true

使用Maven打包的时候,可能会因为单元测试打包失败,这时候就需要跳过单元测试。也为了加快打包速度,也需要跳过单元测试。 Maven跳过单元测试五种方法。 在正式环境中运行Springboot应用,需要先打包,然后使用java -ja…...

静态链接和动态链接的区别

链接即为编译(包含预编译,编译和汇编过程)完成之后的过程,此过程又分为静态链接和动态链接两种方式。 1、静态链接 静态链接就是在生成可执行文件的时候(链接阶段),把所有需要的函数的二进制代…...

MATLAB学习笔记1

MATLAB学习笔记1 - 向量和矩阵 Matlab的数组可以是行向量,列向量,矩阵形式等 1.利用[ ]创建数组 例:包含7和9的一个数组,使用空格或,为行 x [7 9]//x是一个1*2的矩阵 y[7,9]//y是一个1*2的矩阵例:包含7和…...

Gorm -- 查询记录

文章目录查询单条记录通过结构体查询对应表指定表并将查询一条记录结果放至字典中按照主键查询查询多行记录按照主键查询使用结构体查询指定表名查询并放至字典列表中指定查询字段查询条件Where 条件(、like、in)通过结构体或字典设置查询条件或非排序Li…...

「Python 基础」错误、调试与测试

文章目录1. 错误处理2. debugassertloggingpdbIDE3. unittest编写运行setUp 与 tearDown4. doctest1. 错误处理 try:# 可能有异常的代码块r 10/int(2) except ValueError as e:# 有异常时执行,捕获指定类型及其子类型的错误print(ValueError, e) except ZeroDivis…...

17万字 JUC 看这一篇就够了(一) (精华)

JUC 今天我们来进入到 Java并发编程 JUC 框架的学习 ,内容比较多,但希望我们都能静下心来,耐心的看完这篇文章 文章目录JUC进程概述对比线程创建线程ThreadRunnableCallable线程方法APIrun startsleep yieldjoininterrupt打断线程打断 park终…...

C++右值引用/移动语义

在此之前,我们所用的引用,其实都是左值引用。 int a 10; int& ra a; 下面我们来重新认识一下引用: 而何为左值?左值引用其实是什么?请往下看~ 左值是一个表示数据的表达式(如变量名或解引用的指针)&#xff…...

小樽C++ 多章⑧ (叁) 指针与字符串、(肆) 函数与指针

目录 叁、函数与字符串 肆、函数与指针 4.1 指针作为函数参数 4.2 函数返回指针 4.3 函数指针与函数指针数组 4.4 结构体指针 ​​​​​​​​​​​​​​小樽C 多章⑧ (壹) 指针变量https://blog.csdn.net/weixin_44775255/article/details/129031168 小樽C 多章⑧ …...

Mybatis-Plus

新建个项目 引入lombok devtools web mysql驱动 pom.xml引入mybatis-plus依赖 <dependency><groupId>com.baomidou</groupId><artifactId>mybatis-plus-boot-starter</artifactId><version>3.4.2</version> </dependency> sp…...

yolov8行人识别教程(2023年毕业设计+源码)

yolov8识别视频直接上YOLOv8的结构图吧&#xff0c;小伙伴们可以直接和YOLOv5进行对比&#xff0c;看看能找到或者猜到有什么不同的地方&#xff1f; Backbone&#xff1a;使用的依旧是CSP的思想&#xff0c;不过YOLOv5中的C3模块被替换成了C2f模块&#xff0c;实现了进一步的轻…...

CAD指令框找不到了怎么调出来?CAD指令框调出方法

CAD制图过程中&#xff0c;为了提高设计师的绘图效率&#xff0c;经常会用到各种CAD命令快捷键&#xff0c;可是CAD指令框突然不见了&#xff0c;这就让人很头疼了。CAD指令框找不到了怎么调出来呢&#xff1f;本节内容小编以浩辰CAD软件为例来给大家分享一下CAD指令框调出方法…...

一般用哪些工具做大数据可视化分析?

做数据分析这些年来&#xff0c;从刚开始的死磕excel&#xff0c;到现在成为数据分析行业的偷懒大户&#xff0c;使用过的工具还真不少&#xff01; 这篇分享一些我在可视化工具上的使用心得&#xff0c;由简单到复杂&#xff0c;按照可视化类型一共分为纯统计图表类、GIS地图…...

Python每日一练(20230308)

目录 1. Excel表列名称 ★ 2. 同构字符串 ★★ 3. 分割回文串 II ★★★ &#x1f31f; 每日一练刷题专栏 C/C 每日一练 ​专栏 Python 每日一练 专栏 1. Excel表列名称 给你一个整数 columnNumber &#xff0c;返回它在 Excel 表中相对应的列名称。 例如&#xff1…...

笔记工具模板系统实用指南:从效率提升到知识管理进阶

笔记工具模板系统实用指南&#xff1a;从效率提升到知识管理进阶 【免费下载链接】OB_Template OB_Templates is a Obsidian reference for note templates focused on new users of the application using only core plugins. 项目地址: https://gitcode.com/gh_mirrors/ob/…...

Uniapp集成智能客服功能实战:从选型到性能优化的完整指南

在移动应用生态中&#xff0c;客服系统已从“成本中心”转变为“增长引擎”。数据显示&#xff0c;一个响应迅速、体验流畅的在线客服系统&#xff0c;能将用户咨询转化率提升30%以上&#xff0c;并显著降低用户流失率。对于使用Uniapp开发的跨平台应用而言&#xff0c;集成一套…...

什么是绿色软件?免安装版就是绿色软件吗?

什么是绿色软件&#xff1f;免安装版就是绿色软件吗&#xff1f;古有流氓软件耍流氓&#xff0c;今有绿色软件未必真绿色。 --马彪一、什么是绿色软件&#xff1f; 绿色软件&#xff08;Portable Software&#xff09;就是指无需安装&#xff0c;且运行过程中不向运行目录之…...

如何免费阅读付费文章?终极智能内容解锁工具完全指南

如何免费阅读付费文章&#xff1f;终极智能内容解锁工具完全指南 【免费下载链接】bypass-paywalls-chrome-clean 项目地址: https://gitcode.com/GitHub_Trending/by/bypass-paywalls-chrome-clean 在这个信息爆炸的时代&#xff0c;你是否经常遇到这样的情况&#xf…...

Anthropic Economic Index: AI对软件开发的影响 — 深度解读

原文: AI’s impact on software development 发布机构: Anthropic 解读日期: 2026年3月25日 一、研究背景与方法论 1.1 研究动机 软件开发工作虽然在现代经济中占比较小&#xff0c;但影响力巨大。过去两年&#xff0c;能够辅助甚至自动化大量编程工作的AI系统的引入&#x…...

vSphere环境安全指南:使用vCenter创建受限用户的最佳实践

vSphere环境安全指南&#xff1a;精细化权限管理实战 在虚拟化基础设施管理中&#xff0c;vSphere环境的安全性直接关系到企业核心业务的稳定运行。作为高级管理员&#xff0c;我们常常面临一个两难选择&#xff1a;既要确保团队成员能够高效完成工作&#xff0c;又要防止过度授…...

OpenClaw长期运行秘诀:GLM-4.7-Flash任务守护与自动恢复机制

OpenClaw长期运行秘诀&#xff1a;GLM-4.7-Flash任务守护与自动恢复机制 1. 为什么需要长期运行方案&#xff1f; 去年冬天的一个深夜&#xff0c;我被手机警报惊醒——OpenClaw在连续处理300多份文档后突然崩溃&#xff0c;导致凌晨的自动化报表任务全部中断。这次事故让我意…...

计算机视觉领域投稿指南:如何选择适合你的顶刊顶会(附最新审稿周期与费用)

计算机视觉领域投稿策略&#xff1a;从期刊会议选择到高效发表的全流程指南 在计算机视觉领域&#xff0c;研究成果的发表渠道选择往往比研究本身更让人头疼。记得我第一次投稿时&#xff0c;面对琳琅满目的期刊和会议列表&#xff0c;整整两周都在纠结该把论文投向哪里——是追…...

基于Transformer架构解析:Nanbeige 4.1-3B 模型原理与性能调优

基于Transformer架构解析&#xff1a;Nanbeige 4.1-3B 模型原理与性能调优 最近在星图GPU平台上部署和测试Nanbeige 4.1-3B模型时&#xff0c;我发现很多朋友对Transformer架构的理解还停留在“听说过”的阶段&#xff0c;对模型参数、显存占用这些概念更是感到头疼。其实&…...

FireRedASR Pro Java集成开发指南:SpringBoot微服务语音处理实战

FireRedASR Pro Java集成开发指南&#xff1a;SpringBoot微服务语音处理实战 如果你是一个Java后端开发者&#xff0c;最近接到了要给系统加上语音识别功能的需求&#xff0c;比如处理用户上传的客服录音&#xff0c;或者分析会议纪要&#xff0c;那你可能正在寻找一个既稳定又…...