Simple summary:
1, the internal network system failure need to troubleshoot 2, operators are not familiar with database operations, can not be connected to the database and execute SQL statements to troubleshoot the database and data is normal3, Solution: Write a bat script, operation and maintenance personnel double-click to run.
Original link:http://www.lookdaima.com/WebForms/WebPages/Blanks/Pm/Docs/DocItemDetail.aspx?id=d861e977-87d1-4ac0-ab63-91dacb9ccc9e
Background notes:
Vehicle management system involves 2 servers: 101: Data Receiving program, Application 102: The database in the early morning encountered the location of the data can not receive the problem, need to troubleshoot the cause and maintenance. There are usually several reasons why the location data is not received: 1. The data receiving program is down and the program needs to be restarted. (usual cause) program name: Gps-server Process Name: VTS.exe program path: D:\GPS\server\VTS.exe 2, mobile network failure, GPS positioning data can not be returned 3, the application and database communication problems, data can not be written. This article focuses on the role and implementation of the bat script, troubleshooting and maintenance guidelines In addition to this article
reasons to write the bat script1, the system has a problem to maintain, the telephone request operation and maintenance personnel to assist the remote server and do restart service operation. The results found that after the service restart, the data is still not received (because of reasons 2 and 3); 2, because the data can be received successfully, I wrote a monitoring program to sweep the database and alarm, timed program run a certain time interval, operation and maintenance personnel can not directly help me see whether the data received success, only wait for the monitoring program notification; 3 This is a problem, can not directly through the database to confirm whether the data received, operation and maintenance response lag of 4, but operators are not familiar with the system, can not ask operators understand Oracle and table structure, by telephone assistance to directly check the table and data.
SolutionsThere are a number of solutions: it can be a perfect monitoring program code; The solution here is to write a bat script that is placed on the computer's desktop to assist the OPS staff.
effect
BAT Check the GPS system location data Desktop effect
OPS people can see the data effects of the database by double-clicking the bat file
BAT Check GPS system location Data Execution effect
implementation Steps
BAT script and SQL statement storage directory
1. sql file to write SQL script in D:\Apps\Bats directory Gpsdbchecksql.sql
Gpsdbchecksql.sql
--Get database Current time--SelectTo_char (Sysdate,'YYYY-MM-DD HH24:mi:ss') as"Database Current Time" fromdual; --Query Vt_last_location_data (latest location data table)----get the latest positioning time -SelectVid as"Vehicle id", To_char (Gpstime,'YYYY-MM-DD HH24:mi:ss') as"Location Data Time" from(Select * fromVt_last_location_datawhereGpstime>Sysdate- 1 Order byGpstimedesc)whereRowNum< 6;--Exit Oracle--Exit;
2. Write bat script Gpsdbcheck.bat
Gpsdbcheck.bat
: Connect to the database and execute the SQL statement to determine if there is data written to Dbsqlplus Gpsmisuser /* * * * * * @HNAGPS @ "D:\Apps\Bats\GpsDbCheckSql.sql": Wait for input, exit cmd window pause
Write a bat script to assist operations personnel when they are having problems debugging the database is a successful operation strategy