Posts

Showing posts from 2016

DBA_LOCKS

select l.session_id, l.oracle_username, l.os_user_name, o.object_name , o.owner from gv$locked_object l, dba_objects o where l.object_id = o.object_id; select l.session_id, l.oracle_username, l.os_user_name, o.object_name , o.owner, 'alter system kill session ''' || s.sid || ',' || s.serial# ||''';' kill_session from v$locked_object l, dba_objects o, v$session s where l.object_id = o.object_id and l.session_id = s.sid; select sid, serial# from gv$session where sid = 0000; alter sysetm kill session ''; select s.sid, s.serial#, p.spid unix_process, s.osuser, s.username, s.machine, s.program, s.sql_hash_value current_hash_value, q1.sql_text current_sql_text, s.prev_hash_value prev_hash_value, q2.sql_text prev_sql_text, to_char(s.logon_time,'DD/MM/YYYY HH24:MI') session_logon_time, o.owner ||'.'|| o.object_name locked_object, l.type lock_type, l.lmode lock_mode, l.ctime lock_time_in_sec from v$lock l, v$session s, v$pro...

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...