Use Oracle date function to implement alert in shell script

  1         Practice: calculate diff of DB time column in shell script 1.1        Practice: oracle@oraclevm01: /monitoring/bin  % : more #!/bin/bash lag=$(sqlplus -s  TESTUSER/oracle@pstg <<END set pagesize 0 feedback off verify off heading off echo off; select ROUND(TO_NUMBER(cast(target_commit as date)-cast(source_commit as date))*24*60) as lag_time from TESTUSER.HEARTBEAT exit; END ) echo $lag […]