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

Tracking and handling of failure of to-do data on integrated mobile platform (Mongodb, Oracle, SQLServer)

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

Tracking and handling of failure of to-do data on Integrated Mobile platform

Mongodb 、 Oracle 、 SQLServer

Scene:

The company's integrated mobile platform backstage core database uses Mongodb read-write separation architecture, all heterogeneous system platforms (finance, ERP, planning.) (corresponding databases ORACLE, SQLServer, Mysql.) The to-do process will be pushed to the Mongodb database in real time to achieve mobile approval on the mobile side of all systems.

Question:

The system level of each system supplier's docking integrated mobile phone platform is uneven, and there are often problems that individual systems have not been pushed to the integrated mobile phone platform or failed to be transferred to the integrated mobile phone platform.

Solution:

It takes a long time for each system supplier to optimize the interface, so before the optimization is completed, there needs to be a manual processing mechanism, that is, the problem of unpushed or unsuccessful transfer can be known and dealt with manually in time.

One: when there is a problem to be done, send an early warning email to the relevant system administrator as soon as possible, and intervene manually in time to avoid escalating the problem.

Second, the monitoring screen displays failed to-do information in real time.

Third: when the number of failures to do is very large, batch repair and regularly focus on dealing with historical failures.

One: when there is a problem to be done, send an early warning email to the relevant system administrator as soon as possible, and intervene manually in time to avoid escalating the problem.

Since a log record is generated in the corresponding system database when there is a problem to be done, you can use triggers to achieve email early warning. Take SQLServer database as an example:

Second, the monitoring screen displays failed to-do information in real time.

Through the Grafana monitoring platform, you can add data sources such as SQLServer to show the failure to-do information in real time.

Third: when the number of failures to do is very large, batch repair or regularly deal with historical failures.

You can compare the to-do list of integrated mobile platform database (Mongodb) with that of various system databases (ORACLE, SQLServer, Mysql):

1 the to-do data of the integrated mobile platform database (Mongodb) is more than that of each system database, indicating that the to-do transfer has failed, and the redundant to-do information needs to be deleted manually.

(2) the to-do data of the integrated mobile platform database (Mongodb) is less than that of each system database, indicating that the to-do push failed and needs to be manually repushed.

So how to batch find out all the data that have failed to transfer to the system?

(1) Export the to-do data of the integrated mobile platform database (Mongodb) to execl

The operating system of Mongodb server is Centos7.5. You can install a Mongodb client on your computer and use mongoexport tools to export data.

Export statement:

D:\ MongoDB\ Server\ 3.4\ bin >

Mongoexport.exe-- csv-- host 192.100.100.100 host 27017 / d testdb / c TEST_TdUndo / f "_ id,userName,account,createTime,content" / Q "{" delete ": false}" / OC:\ Users\ Administrator\ Desktop\ all cjc _ Undo1219a.csv

By default, opening a CSV file is garbled in Chinese:

Solve the garbled problem in the following ways:

-Open method (notepad)-format-Font-Chinese GB2312--- save-csv open-adjust format-Save as execl format file

(2) Export the to-do data of each system database (ORACLE, SQLServer, Mysql) to execl

For example, system 1:

Select Name, Account, Ini Date, content from undoerp

Where UnDoStatus=' to do'

And CreateDate > = '2019-11-01 08ambiguo 00.000'

And CreateDate

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

Database

Wechat

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

12
Report