EM12c – Clear the agent

$AGENT_HOME/bin/emctl stop agent rm -rf $AGENT_HOME/sysman/emd/recv rm -rf $AGENT_HOME/sysman/emd/collection rm -rf $AGENT_HOME/sysman/emd/state rm -rf $AGENT_HOME/sysman/emd/upload rm -rf  $AGENT_HOME/sysman/emd/lastupld.xml $AGENT_HOME/bin/emctl clearstate agent $AGENT_HOME/bin/emctl start agent

BIND variables

col sid format 9999999999 col username format a8 col sql_hash_value format 999999999999 col sqlid format a14 col sql_child_number format 9 col name format a4 col value_string format a15 col last_captured format a25 select s.sid, s.username, s.sql_hash_value, s.sql_id, s.sql_child_number, spc.name, spc.value_string, last_captured from v$sql_bind_capture spc, v$session s,v$sql sq where s.sql_hash_value = spc.hash_value and s.sql_address = spc.address…

Get the list of patches

set lin 600 col action format a10 col namespace format a7 col version format a10 col bundle_series format a30 col comments format a30 select id,action,namespace,version,bundle_series,comments from registry$history; Another solution: cat /u01/app/oracle/product/

Find the last JOB run status

set lin 300 col JOB_NAME format a30 col STATUS format a15 col ADDITIONAL_INFO format a100 select JOB_NAME,STATUS,ADDITIONAL_INFO from dba_scheduler_job_run_details where log_id in(select max(log_id) from dba_scheduler_job_run_details where job_name like upper(‘&job_name’));