Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Analysis of goldengate configuration adding pump process deadlock

2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Create a directory:

GGSCI (jq-prod-oracle-wms3-12024) 3 > CREATE SUBDIRS

Creating subdirectories under current directory / u01/app/goldengate

Parameter file / u01/app/goldengate/dirprm: created.

Report file / u01/app/goldengate/dirrpt: created.

Checkpoint file / u01/app/goldengate/dirchk: created.

Process status files / u01/app/goldengate/dirpcs: created.

SQL script files / u01/app/goldengate/dirsql: created.

Database definitions files / u01/app/goldengate/dirdef: created.

Extract data files / u01/app/goldengate/dirdat: created.

Temporary files / u01/app/goldengate/dirtmp: created.

Credential store files / u01/app/goldengate/dircrd: created.

Masterkey wallet files / u01/app/goldengate/dirwlt: created.

Dump files / u01/app/goldengate/dirdmp: created.

two。 Edit mgr:

Edit param mgr

Port 7809

Autostart er *

Autorestart er *

PURGEOLDEXTRACTS / s01 MINKEEPDAYS, USECHECKPOINTS, MINKEEPDAYS 3

Start:

GGSCI (chuanqiu) 9 > start mgr

Manager started.

GGSCI (chuanqiu) 10 > info all

Program Status Group Lag at Chkpt Time Since Chkpt

MANAGER RUNNING

3. Add a pump process:

GGSCI (scm02db01.baozunops.com) 2 > edit params p_wmsjq

Extract p_wmsjq

Rmthost 192.168.101, mgrport 7809, compress

Passthru

Numfiles 5000

Rmttrail. / dirdat/sz

-- dynamicresolution

Ddl

Table wms.T_USER

Table wms.T_BRAND

Table wms.T_CHANNEL

Table wms.T_CUSTOMER

ADD EXTRACT p_wmsjq, EXTTRAILSOURCE. / dirdat/ea, BEGIN now

Add rmttrail. / dirdat/sz extract p_wmsjq

Start the process:

Start p_wmsjq

View the status of the added process:

Stats P_WMSJQ

Sending STATS request to EXTRACT P_WMSJQ...

2018-09-19 16:34:33 ERROR OGG-15149 EXTRACT P_WMSJQ is initializing, please try the command later.

GGSCI (chunqiu) 40 > info P_WMSJQ

EXTRACT P_WMSJQ Initialized 2018-09-19 16:27 Status RUNNING

Checkpoint Lag 00:00:00 (updated 00:12:20 ago)

Process ID 11252

Log Read Checkpoint File. / dirdat/ea000000000

2018-09-19 16 140 2715 03.000000

Why did this happen?

This is because the extraction process has been running for a long time, and the log volume is very large, and many previous files have been deleted, so the P_WMSJQ process keeps searching for the log that just started with BEGIN now in the background. You can see the following log confirmation from the background:

Tail-f ggserr.log view the backend log:

2018-09-19T16:41:03.194+0800 INFO OGG-02232 Oracle GoldenGate Capture for Oracle, p_wmsjq.prm: Switching to next trail file / u01/goldengate/dirdat/ea000001813 at 2018-09-19 16 Switching to next trail file 41 due to EOF. With current RBA 499998509.

2018-09-19T16:41:07.781+0800 INFO OGG-02232 Oracle GoldenGate Capture for Oracle, p_wmsjq.prm: Switching to next trail file / u01/goldengate/dirdat/ea000001814 at 2018-09-19 16 Switching to next trail file 41 due to EOF 07.781704. With current RBA 499999232.

2018-09-19T16:41:12.339+0800 INFO OGG-02232 Oracle GoldenGate Capture for Oracle, p_wmsjq.prm: Switching to next trail file / u01/goldengate/dirdat/ea000001815 at 2018-09-19 16 Switching to next trail file 41 due to EOF 12.339296. With current RBA 499998210.

So how long will it take to finish? We can confirm from the latest trail file generated by extract's extraction process:

View the serial number of the trail file:

Ls-l ea000002*

-rw-r- 1 oracle oinstall 477m Sep 19 15:58 ea000002146

-rw-r- 1 oracle oinstall 477m Sep 19 16:03 ea000002147

-rw-r- 1 oracle oinstall 477m Sep 19 16:07 ea000002148

-rw-r- 1 oracle oinstall 477m Sep 19 16:11 ea000002149

-rw-r- 1 oracle oinstall 477m Sep 19 16:25 ea000002150

-rw-r- 1 oracle oinstall 477m Sep 19 16:40 ea000002151

-rw-r- 1 oracle oinstall 477m Sep 19 16:52 ea000002152

-rw-r- 1 oracle oinstall 6.0m Sep 19 16:52 ea000002153

Or check out another pump process:

GGSCI (chunqiu) 41 > info PUMP_lbs

EXTRACT PUMP_WMS Last Started 2018-09-19 06:55 Status RUNNING

Checkpoint Lag 00:00:03 (updated 00:00:03 ago)

Process ID 92773

Log Read Checkpoint File / u01/goldengate/dirdat/ea000002152

2018-09-19 16 42V 10.000000 RBA 85805949

From this process, we can see that there is still some time to go from ea000001815 to ea000002151, but it is getting closer and closer.

After waiting for a long time, take a look again:

GGSCI (scm02db01.baozunops.com) 54 > info P_WMSJQ

EXTRACT P_WMSJQ Initialized 2018-09-19 16:27 Status RUNNING

Checkpoint Lag 00:00:00 (updated 00:42:57 ago)

Process ID 11252

Log Read Checkpoint File. / dirdat/ea000000000

2018-09-19 16 140 2715 03.000000

42 minutes have passed, and the trail file is quite large.

Final confirmation:

GGSCI (scm02db01.baozunops.com) 79 > info P_WMSJQ

EXTRACT P_WMSJQ Last Started 2018-09-19 17:32 Status RUNNING

Checkpoint Lag 00:00:00 (updated 00:00:07 ago)

Process ID 71325

Log Read Checkpoint File / s01/goldengate/dirdat/ea000002156

2018-09-19 17 32 RBA 04.000000 37332782

GGSCI (chunqiu) 80 > stats P_WMSJQ

Sending STATS request to EXTRACT P_WMSJQ...

Start of Statistics at 2018-09-19 17:33:07.

DDL replication statistics (for all trails):

* Total statistics since extract started * *

Operations 0.00

Mapped operations 0.00

Unmapped operations 0.00

Other operations 0.00

Excluded operations 0.00

Output to. / dirdat/sz:

Extracting from wms.T_USER to WMS.T_USER:

* Total statistics since 2018-09-19 17:32:22 * *

Total inserts 7041.00

Total updates 108651.00

Total deletes 178000.00

Total discards 0.00

Total operations 293692.00

Look at the target file that has been transferred:

-rw-r- 1 oracle oinstall 499999847 Sep 19 17:31 sz000000000

-rw-r- 1 oracle oinstall 499999640 Sep 19 17:31 sz000000001

-rw-r- 1 oracle oinstall 499999561 Sep 19 17:43 sz000000002

-rw-r- 1 oracle oinstall 50584137 Sep 19 17:47 sz000000003

In addition, this will not happen if it is a new environment or if the number of logs is very small.

Therefore, in logging work, especially in the production environment, if you encounter goldengate problems, do not panic, as long as you understand the principle, it is quite easy to solve the problem.

Wednesday, 2018-09-19

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report