Monday, November 28, 2011

Oracle JDBC Connection issue

I have been experiencing a JDBC connection issue after I have restarted a performance server. JDBC has issues with /dev/random. Use /dev/urandom instead.


After every restart random should be replaced with urandom:
  rm /dev/random
  ln -s /dev/urandom /dev/random







Friday, November 25, 2011

OBIEE11g Advanced Development with Mark Rittman

Yesterday I took Mark Rittman's OBIEE 11g Advanced Development class. The class was amazing - very informative and practical. It is rare to find someone who has the knowledge and is able to explain it. Mark covered obiee development with practical examples.

He was presenting his slides and then he was showing in the Administration tool and in Enterprise Management. It was very interesting to see how he was using OBIEE. I definitely recommend his class.

Wednesday, November 9, 2011

Oracle session time out when it trying to drop or create and replace object

If something is locked it can not be dropped or create or replace. The error message make it seem as if it is timed out.

One solution is to wait and eventually the lock might be resolved.
In the past I have resolved this my restarting the instance. I did not know what the real problem was.


A more elegant solution is to provided here

Killing an oracle session to remove a lock

 I will copy the queries in case the post is lost:

Identifying the locks:

  1. SELECT  l.inst_id,  
  2. SUBSTR(L.ORACLE_USERNAME,1,8) ORA_USER,   
  3. SUBSTR(L.SESSION_ID,1,3) SID,  
  4. S.serial#,  
  5. SUBSTR(O.OWNER||'.'||O.OBJECT_NAME,1,40) OBJECT, P.SPID OS_PID,  
  6. DECODE(L.LOCKED_MODE,   0,'NONE',  
  7. 1,'NULL',  
  8. 2,'ROW SHARE',  
  9. 3,'ROW EXCLUSIVE',  
  10. 4,'SHARE',  
  11. 5,'SHARE ROW EXCLUSIVE',  
  12. 6,'EXCLUSIVE',  
  13. NULL) LOCK_MODE  
  14. FROM    sys.GV_$LOCKED_OBJECT L  
  15. , DBA_OBJECTS O  
  16. , sys.GV_$SESSION S  
  17. , sys.GV_$PROCESS P  
  18. WHERE     L.OBJECT_ID = O.OBJECT_ID  
  19.   and     l.inst_id = s.inst_id  
  20.   AND     L.SESSION_ID = S.SID  
  21.   and     s.inst_id = p.inst_id  
  22.   AND     S.PADDR = P.ADDR(+)  
  23. order by l.inst_id
Kill the session:

ALTER SYSTEM KILL SESSION 'sid,serial#' IMMEDIATE; 

The hard part here is to realize to check whether there is a lock.

Tuesday, November 1, 2011

Create Or Replace ORA-00955: name is already used by an existing object

ORA-00955: name is already used by an existing object

when create or replace is used look at the synonyms to see whether synonym with that name exists.

For example

CREATE OR REPLACE test_synonym ..............

check whether synonym test_synonym already exists.