I have a table in Oracle 11g with the following structure:
CREATE TABLE USER.LOG_EXECUCAO
(
ID NUMBER,
DATA DATE,
QTD_REGISTROS_INSERIDOS NUMBER,
TEMPO_EXECUCAO VARCHAR2(50 BYTE)
)
An example data:
ID DATA QTD_REGISTROS_INSERIDOS TEMPO_EXECUCAO
6356 04/04/2016 09:36:03 1074 00h:00m:58s:769ms
6355 04/04/2016 09:33:00 1074 00h:00m:56s:221ms
6354 04/04/2016 09:30:11 1074 00h:01m:06s:719ms
6353 04/04/2016 09:27:13 1074 00h:01m:08s:977ms
6352 04/04/2016 09:24:13 1074 00h:01m:09s:361ms
6351 04/04/2016 09:21:12 1074 00h:01m:07s:685ms
6350 04/04/2016 09:18:11 1074 00h:01m:06s:657ms
6349 04/04/2016 09:15:01 1074 00h:00m:57s:074ms
This table is fed by a C # executable, which runs every 3 minutes. However, it can happen that the executable stops running because the server is unavailable ... and I need to know when that stop occurred .. I confess that I could not think of nothing to be able to solve this problem ... does anyone have any idea that can return something like:
Between date X and Y, there was a failure of execution for X minutes. (differs from one date to another)
The idea was to try to solve for SQL .... Suggestions?