Posts

Showing posts from August, 2016

ODA administration

you can do with oakcli Deploy Oracle Database Appliance Configure network for Oracle Database Appliance deployment Patching Oracle Database Appliance Unpacking packages into oakcli repository Troubleshoot Oracle Database Appliance Monitor Oracle Database Appliance Validate Oracle Database Appliance Applying the Core Configuration key Copying the deployment configuration file Locate a disk on ODA Manage ODA Repository Manage ODA diagnostics collection oakcli -h command to list the different options available with oakcli: oakcli show -h check if whether ODA deployment is Bare Metal or Virtualized [root@raj ~]# oakcli show env_hw o get the ODA software version [root@raj ~]# oakcli show version oakcli show -h o get the ODA software and component version [root@raj ~]# /opt/oracle/oak/bin/oakcli show version -detail oakcli show disk To list ASM disk groups on ODA [root@raj ~]# oakcli show diskgroup To list the Local file system and ACFS file system ...

Blocking session on RAC database

Blocking session on RAC database Blocking session of the databases Generate the report for Blocking session The SQL will provide Blocking sessions with SID, node information SELECT DISTINCT S1.USERNAME || '@' || S1.MACHINE || ' ( INST=' || S1.INST_ID || ' SID=' || S1.SID || ' ) IS BLOCKING ' || S2.USERNAME || '@' || S2.MACHINE || ' ( INST=' || S1.INST_ID || ' SID=' || S2.SID || ' ) ' AS BLOCKING_STATUS FROM GV$LOCK L1, GV$SESSION S1, GV$LOCK L2, GV$SESSION S2 WHERE S1.SID=L1.SID AND S2.SID=L2.SID AND S1.INST_ID=L1.INST_ID AND S2.INST_ID=L2.INST_ID AND L1.BLOCK > 0 AND L2.REQUEST > 0 AND L1.ID1 = L2.ID1 AND L1.ID2 = L2.ID2; Blockers information select s1.username || '@' || s1.machine  || ' ( SID=' || s1.sid || ' ) is blocking '  || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status from gv$lock l1, gv$session s...

ASH scripts

USER session from ASH select a.snap_id,a.dbid,a.instance_number,a.session_id,a.session_serial#,a.sql_id,a.user_id,a.session_state,a.blocking_session, a.time_waited,to_char(a.sample_time,'mm-dd-yyyy hh24:mi:ss') as stime,a.event from dba_hist_active_sess_history a where sample_time between TIMESTAMP'2012-09-13 12:25:00' AND TIMESTAMP'2012-09-13 12:30:00' select snap_id,END_INTERVAL_TIME from dba_hist_snapshot where END_INTERVAL_TIME > sysdate-1  order by 1; It runs faster if you use the snap_id; Lock prompt +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ prompt    Following output gives the details of blocker sessions prompt ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ select * from gv$lock where block=1; select distinct blocking_instance,blocking_session from gv$session where blocking_session is not null order by 1,2; set lines 199 select /*+ rule */ inst_id blocker_instance, sid blocker_sid, s...