It can be performed through a script.
Write a small script that will fire the tabanalys and output it to a .txt file.
Once the process is complete just send it through mail
cat tab.txt | mailx -s "TAB Report" <receiver mail id >
or send the file as attachment
Arshad
mailx -s "TAB Report" <email or sendmail alias> < tab.txt
ex. mailx -s "TAB Report"
dba@company.com < tab.txt
ex w/alias. mailx -s "TAB Report" dba < tab.txt
Also works.
I am not a huge fan of using cat within my mailx commands. May be a personal preference. However, it could save a byte or 2
If you use aliases, which I love to use, I hate hardcoding scripts with email addresses
- edit the /etc/mail/aliases file (may need to be root if your directory permissions are correct).
- add a line with something like - dba:dba@company.com
- save the file
- run /usr/sbin/newaliases
If you intend to do this within a script and run it in the future, I have found this a helpful practice.
If the person receiving the scripts is let go, you just need to change how the alias is referenced - dba:newdba@company.com - and follow the same steps to instantiate the alias.
My two cents.