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

Goldengate common commands

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

The start and stop of 1.Goldengate starts goldengate a > when starting Gold, it is best to start with the target node, and then the source node. Otherwise, the data pump process may exit abnormally because it does not receive a response from the target side. B > the manager process is a hypervisor for other processes and needs to be started first. If the AUTOSTART parameter is set in the manager configuration parameter, other processes can be started automatically by the manager process. For example: log in target server: cd ggsci GGSCI > start mgr GGSCI > start log in source server: cd ggsci GGSCI > start mgr GGSCI > start GGSCI > start

When closing goldengate a > closing goldengate, it is best to start with the source node, then the target node. Otherwise, the data pump process may exit abnormally because it does not receive a response from the target side. B > the manager process usually shuts down last, and the manager process does not have the option to automatically shut down other processes. For example: log in source server: cd ggsci GGSCI > stop manager log in target server: cd ggsci GGSCI > stop GGSCI > stop manager

two。 Monitoring goldengate replication latency goldengate is divided into multiple components (extract,lag,replicat), so the delay should also be specific to which component. As a replication solution, we are usually concerned about replication latency, that is, the time between the generation of messages in the source database and the time from the apply to the target database. The lag command of a > GGSCI can query replication delay, for example: GGSCI > lag b > in practical applications, we usually use heartbeat table to monitor replication delay. Its advantage is that it can monitor not only timely replication delay, but also historical delay. The disadvantage of this mechanism is that when the goldengate itself is abnormally stopped and the heartbeat data can not be updated, the delay data in the table can not reflect the real delay. The way to avoid this problem is to subtract the source message generation time in the heartbeat table from the current system time, which can more accurately reflect the real delay at this time. However, if there is an exception in heartbeat job to stop updating the heartbeat table, the generation time of the source message in the heartbeat table is no longer timely, and the calculated delay data is not accurate, so we should pay attention to the monitoring of the heartbeat table itself when using heartbeat to monitor the delay. 3. Monitor goldengate replication errors by default, when goldengate encounters a replication error, goldengate terminates abnormally and is in abended state. However, in practical use, this default setting is usually modified so that goldengate can continue to work after encountered replication errors to avoid excessive replication delay. In this case, the error message is usually written to the discard file. To monitor the number of errors in the discard file, use the following command: GGSCI > STATS latest,totalsonly *. * Latest statistics since 2013-08-14 07:17:33 * Total inserts 18840062.00 Total updates 26221878.00 Total deletes 6471532.00 Total discards 0.00 Total operations 51533472.00 where the Total discards statistic is the number of error messages. The details of the error are recorded in the discard file and, of course, may exist in a table, depending on how the error message is handled in your goldengate configuration. After we have processed the error messages, such as manually fix these problems, we do not want the above check command to report these error records again. We can run the following command to reset goldengate's statistics of error messages: GGSCI > STATS latest,reset,totalsonly *. *

4. To monitor goldengate message processing a > to monitor the total message processing volume of goldengate since startup, you can use the following command: GGSCI > STATS, totalsonly *. * you can query the replicat process here. Similarly, you can also query extract and pump processes b > count the message processing volume by table, and use the following command: GGSCI > STATS or make a table for statistics: GGSCI > STATS, table. C > in practice, we are usually concerned about the processing power in a certain unit of time, such as how many messages are processed per second. At this time, we can use the statistics of the heartbeat table to monitor. The RDMLDELTASTATS column in the heartbeat table records the total number of DML, and divided by time, we can get the goldengate processing capacity statistics. D > in addition to the above methods, you can also set the REPORTCOUNT parameter to make goldengate write the processed message statistics to the goldengate report file at regular intervals, such as ReportCount Every 30 Minutes, Rate

5.goldengate transaction commands are one of the important factors that affect replication performance for commonly used replication solutions, whether advanced replication, stream or goldengate, large transactions or long transactions. There are some transaction operation commands in goldengate that can help us better monitor or manually intervene in these large / long transactions. A > look at the transactions currently open by the extract process: GGSCI > send, showtrans b > when we realize that there may be a problem with a transaction, we may want to see the specific information in the transaction, we can use the following command: GGSCI > send extract, the above command showtrans file detail will write the details of the transaction to the file. C > when we see a transaction running for a long time and think that it can be committed or ignored directly, we can use the following command: GGSCI > send extract, skiptrans-- skip a transaction GGSCI > send extract, forcetrans-- force a transaction to commit

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: 279

*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

Servers

Wechat

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

12
Report