Sunday 26 May 2013

TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS

problem: 
             Message 1053 not found; No message file for product=network, facility=TNSTNS-12541:         Message 12541 not found; No message file for product=network, facility=TNS
           TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
          TNS-00511: Message 511 not found; No message file for product=network, facility=TNS
         Linux Error: 111: Connection refused

solution: 
              set below variable on OS  level :
    #export ORACLE_SID=<oracle db name>
    #export ORACLE_HOME=<oracle_home> <take oracle home location from /etc/oratab file>
    #export PATH=/usr/sbin:$PATH
     #export PATH=$ORACLE_HOME/bin:$PATH 
   
          then run the command which giving the error after execution.

  
 

Wednesday 15 May 2013

temp file monitoring sql query

Monitor temporary table space in oracle

SQL>set lines 100
      select TABLESPACE_NAME,floor(TABLESPACE_SIZE/ 1024 / 1024) "size MB",       floor(ALLOCATED_SPACE / 1024 / 1024)  "user MB",
      ceil(FREE_SPACE*100/ALLOCATED_SPACE)||'%' usd_spce_per from dba_temp_free_space;

TABLESPACE_NAME                   size MB    user MB USD_SPCE_PER
------------------------------         ----------    ---------- -----------------------------------------
TEMP                                                    54         54                99%

TABLESPACE_NAME: shows table space name.
size mb: show the total table space size.
user mb: shows the Total allocated space, in bytes, including space that is currently allocated and used     and  space that is currently allocated and available for reuse
USD_SPCE_PER: free space available in percentage