In check_db_role.sh use $DB_ROLE_FILE from .bash_profile_cron instead of
hard-coded value.
In Perl scripts use sub CheckDBRole instead of query sys_context.