#!/bin/bash
# Get the current date and time curr_dt=$(date +"%Y-%m-%d-%H-%M-%S") # Connect to the apps schema and run the command output=$(sqlplus -S apps/[apps_password]@[database] << EOF set serveroutput on; exec VERRTEXOICTAXEXAMPLE; exit; EOF ) # Email subject and body subject="Output of VERRTEXOICTAXEXAMPLE" body="<html><body><p>Please find below the output of VERRTEXOICTAXEXAMPLE:</p><pre>$output</pre></body></html>" # Send email with output in the body echo "$body" | mailx -a "Content-Type: text/html" -s "$subject" [email protected] # Remove output log file rm vertex_validation_$curr_dt.log
No comments:
Post a Comment