Monday 4 July 2016

Quick Troubleshooting Steps for Daily Activities









How to detect locking issues in Database ?
-During this,, you need to find Locking sessions and Kill 1Session among those

Sql>select a.SID "Blocking Session." ,b.SID "Blocked Session" from v$lock a, v$lock b 
       where a.SID != b.SID and a.ID1 = b.ID1  and a.ID2 = b.ID2  and b.request > 0  and a.block = 1;
                 
   Blocking Session.      Blocked Session
                    -----------------            ---------------
                  56                             83

Process for Killing the session
Sql>select sid,serial# from v$session where sid=56;
Sql> alter system kill session '56,83';



How to Relink the oracle binaries
-Run the below command
$ORACLE_HOME/bin/relink all



How to gather Instance hang analysis data
-Use the Oradebug utility
$sqlplus –prelim / as sysdba
Sql>oradebug setmypid
Sql>oradebug unlimit
Sql>oradebug hanganalyze 3

Open another terminal
$sqlplus –prelim / as sysdba
Sql>oradebug setmypid
Sql>oradebug unlimit
Sql>oradebug dump systemstate 256



What will you do, If sqlplus executable is corrupted then
-Run these below commands
$cd $ORACLE_HOME/sqlplus/lib
$make –f ins_sqlplus.mk install


What will you do, If lsnrctl utility is corrupted then
$ORACLE_HOME/network/lib
$make -f ins_net_server.mk install



IF oracle, exp, imp, sqlldr, tkprof utilites are corrupted then
-run these below command
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk install


How to check the detailed error message
-using the ‘oerr’ Utility
$oerr ora 0600


What is ADR (Automatic Diagnostic Repository) ?

In 11g user_dump_dest,core_dump_dest,background_dump_dest are replace by diagnostic_dest

Sub-dirs under diagnostic_dest 
       
  Alert rdbms incidents

  The Alert log file are in two format
  Log.xml
  Alert_<SID>.log

  adrci Utility is used to see the content of alert-log or incident details
 -below are the commands 
  $ adrci
 
  Adrci>show alert
  Adrci>help
  Adrci>show incident

25 comments:

  1. Hai Bro... wonderful Job.. very nice and informative

    ReplyDelete
  2. Hai Bro... wonderful Job.. very nice and informative

    ReplyDelete
  3. Replies
    1. Thanks for the comment Akash.
      Keep Visiting

      Delete
  4. Great work...This blog has Very useful articles !!

    ReplyDelete
    Replies
    1. Thanks for your Comment

      Your comments and suggestions are always welcome

      Regards
      Nikhil

      Delete
  5. Replies

    1. Thanks for your time.

      Your comments and suggestions are always welcome

      Regards
      Nikhil

      Delete
  6. Suuuuuuuuuuuuuuuuuuuuper boss.I hope this post will be breath to DBAs.thank U & expecting more like this posts

    ReplyDelete
    Replies
    1. Sure Mr. Sudhakar, I will update the blog to add some new posts about the real-time tools

      I'm glad I could help you.

      Delete
    2. Sure Mr. Sudhakar, I will update the blog to add some new posts about the real-time tools

      I'm glad I could help you.

      Delete
  7. Great work...This blog has Very useful articles

    ReplyDelete
  8. easy and understandable for layman keep going brother.

    ReplyDelete
  9. Nikhil good work, can u pls share with me database refresh activity using rman saioracledba92@gmail.com

    ReplyDelete