Rem: This script is used to merge output of all datafile dbv status and identify encryption status.
Rem: This execution requires only in 11g R2 and earlier to verify TDE implementation status
Rem: In 12c, data file header contains TDE implementation status
Note: This script is used for testing purpose, the author claims no responsibility of it.
[oracle@billdb ~]$ vi w.sh
###Hayat code - dbv output filter
cd /home/oracle
rm mydbv.log
echo "-----dbv started for file -------`date +"%Y-%m-%d %T"` " >> mydbv.log
echo " " >> mydbv.log
dbv file=/u01/app/oracle/oradata/BILLDB/avdf_aud_data01.dbf >> mydbv.log 2>&1
dbv file=/u01/app/oracle/oradata/BILLDB/users01.dbf >> mydbv.log 2>&1
dbv file=/u01/app/oracle/oradata/BILLDB/sysaux01.dbf >> mydbv.log 2>&1
dbv file=/u01/app/oracle/oradata/BILLDB/undotbs01.dbf >> mydbv.log 2>&1
echo " " >> mydbv.log
echo "--------------------dbv ended for files ---------------`date +"%Y-%m-%d %T"`" >> mydbv.log
##### filter revlent data
rm /home/oracle/dbv_enc_apply_status.txt
echo " ----------- filter DB verify encryption checking started -----------`date +"%Y-%m-%d %T"`" >> dbv_enc_apply_status.txt
echo " " >> dbv_enc_apply_status.txt
grep -E -w 'DBVERIFY - Verification starting|Total Pages Encrypted' mydbv.log >> dbv_enc_apply_status.txt
echo " " >> dbv_enc_apply_status.txt
echo " ----------- filter DB verify encryption checking ended -----------`date +"%Y-%m-%d %T"`" >> dbv_enc_apply_status.txt
Extra command to merge multiple files:
If parallel log files generated for large number of data files
cat mylog*.txt >> alldf_mylog.txt
Or
$ cat file1 file2 file3 file4 file5 > alldf_mylog.txt
Or
for i in mylog*.txt ; do cat $i >>
alldf_mylog.txt ; done
Or
awk '1' mylog*.txt
> alldf_mylog.txt
No comments:
Post a Comment