Oracle Error

1-view alert log file for any error
2-default location of alert log file in oracle 10g
3-view alert log text from your sql statement (11g)
4-view alert log in OEM
5-OC4J Configuration issue - EM not working
6-View Oracle Port
7-ORA-01555: snapshot too old
8-TNS-12541: TNS:no listener 
9-Oracle EM Not work in Window (Reconfigure it)
10-Error Can't start listener 


1-view alert log file for any error
select * from v$diag_info

This code is used to view location of alert log file and another audit file
It works with Oracle 11G only (10g not support)


2-default location of alert log file in oracle 10g
/u01/app/oracle/admin/XXX/bdump

3-view alert log text from your sql statement (11g)

View Data From Alert log File --Work with Oracle 11G or higher only user: sys

select message_text from  X$DBGALERTEXT
where to_char(originating_timestamp,'DD-MON-YYYY')=TO_CHAR(SYSDATE,'DD-MON-YYYY');

Now in 11g, Oracle gives us an x$ fixed table that maps to the alert log, allowing for native SQL queries against the alert log.

4-view alert log in OEM

5-OC4J Configuration issue - EM not working

[oracle@testmachine ~]$ emctl status dbconsole
OC4J Configuration issue. /home/oracle/11.2.0/product/db_1/oc4j/j2ee/OC4J_DBConsole_testmachine_orcldb not found.
cd /home/oracle/11.2.0/product/db_1/oc4j/j2ee/
ls -l
" In our case the folder shown in Red was missing" .If it is present in ur case check the permission
-rw-r--r--  1 oracle oinstall  985 Mar 22 10:50 deploy_db_wf.ini
drwxr-xr-x 14 oracle oinstall 4096 Mar 22 10:49 home
drwxr-xr-x  3 oracle oinstall 4096 Mar 22 10:48 oc4j_applications
drwxr-x---  6 oracle oinstall 4096 Mar 22 10:48 OC4J_DBConsole
drwxr-xr-x 10 oracle oinstall 4096 May 14 15:49 OC4J_DBConsole_gnoctest_orcldb
drwxr-xr-x  5 oracle oinstall 4096 Mar 22 10:48 OC4J_Workflow_Component_Container
drwxr-xr-x  5 oracle oinstall 4096 Mar 22 10:48 OC4J_Workflow_Management_Container

drwxr-xr-x  2 oracle oinstall 4096 Mar 22 10:49 utilities

Drop and create Em Repositary 

emca -deconfig dbcontrol db -repos drop
(need sid,port,password of user sys/sysman)
emca -config dbcontrol db -repos create





C:\Windows\system32>emctl status agent
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation.  All rights reserved.
Missing either emdctl.exe or emagent.exe from E:\app\chounghuy.lim\product\11.2.
0\dbhome_2/bin.

Restore emdctl.exe or emagent.exe and start your em again
emctl start dbconsole

6-View Oracle Port
view oracle port
ORACLE_BASE\ORACLE_HOME\install directory\portlist.ini

7-ORA-01555: snapshot too old

"ORA-01555: snapshot too old: rollback segment number 23 with name "_SYSSMU23_357762382$" too small ORA-02063: preceding line from LNK_246"

UNDO_RETENTION increase 36000 (second) 36000/60/60 -->10 hours

This error related to Undo Tablespace and Undo_retention parameter

8-TNS-12541: TNS:no listener
TNS-12541: TNS:no listener
ORA-12541: TNS no listener
Cause: Listener for the source repository has not been started.
Action: Start the Listener on the machine where the source repository resides.

TNS-12560: TNS:protocol adapter error
Edit environment variable tns_admin and point it to your tnsnames.ora file location

Connect by using sqlplus tool of oracle (not cmd)

  TNS-00511: No listener
   64-bit Windows Error: 61: Unknown error

9-Oracle EM Not work in Window (Reconfigure it)

emca -deconfig dbcontrol db -repos drop

emca -config dbcontrol db -repos create

10-Error Can't start listener 
lsncrtl start : hang 
find listener process and kill it, then start listener again it will work.

No comments:

Post a Comment