Wednesday, June 23, 2010

OC4J Configuration issue, EM Configuration issue emctl - Oracle Enterprise Manager

1 comments
This is how I solved this issue . I have mentioned below my server details and how I get around this issue

1.Linux x86 64 Bit Operating System

2. I have two Oracle Homes - One for Oracle 10G R2 and other Oracle 11G R2

I have seen this error, even when we set the correct ORACLE_HOME and ORACLE_SID and when we try to start emctl it shows the following error

OC4J Configuration issue...

Now, even if I rename the file OC4J_DBConsole ( as mentioned in some of the forums) , in any of your Oracle home$oc4j/j2ee/OC4J_DBConsole_<MachineName>_<InstanceName> , it will not work.

The correct solution is to set the correct ORACLE_HOME , go to your ORACLE_HOME and execute ./bin/emctl status dbconsole

-bash-3.00$ pwd
/applns/oracle11g/oracle/oc4j/j2ee
-bash-3.00$ cd $ORACLE_HOME
-bash-3.00$ ls
apex         config  dc_ocm                has               j2ee    lib         nls     oracore      plsql      slax             ucp
assistants   crs     deinstall             hs                javavm  log         oc4j    oraInst.loc  precomp    sqldeveloper     uix
bin          csmig   demo                  ide               jdbc    md          odbc    ord          racg       sqlj             utl
ccr          css     diagnostics           install           jdev    mesg        olap    oui          rdbms      sqlplus          wwg
cdata        ctx     dv                    install.platform  jdk     mgw         ons     owb          relnotes   srvm             xdk
cfgtoollogs  cv      emcli                 instantclient     jlib    N850_CBA04  OPatch  owm          root.sh    sysman
clone        dbs     EMStagePatches_CBA04  inventory         ldap    network     opmn    perl         scheduler  timingframework
-bash-3.00$ ./bin/emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://N850:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /applns/oracle11g/oracle/N850_CBA04/sysman/log

 
 

Monday, June 21, 2010

Oracle Database Software Release Numbers Meaning

0 comments

Here is what Each Oracle Database Software Release Number means.

 
 

What is an Oracle INDEXTYPE

0 comments
An INDEXTYPE is  an object that specifies the routines that manage a domain (application-specific) index . Use the CREATE INDEXTYPE statement to create an indextype, which is. Indextypes reside in the same namespace as tables, views, and other schema objects. This statement binds the indextype name to an implementation type, which in turn specifies and refers to user-defined index functions and procedures that implement the indextype. Create any INDEXTYPE is a privilege in RESOURCE role.

 
 

Tuesday, June 15, 2010

Oracle SQL Parsing Steps Involved

0 comments
Oracle SQL is parsed before execution, and a hard parse includes these steps:

1.        Loading into shared pool - The SQL source code is loaded into RAM for parsing. (the "hard" parse step)

2.        Syntax parse - Oracle parses the syntax to check for misspelled SQL keywords.

3.        Semantic parse - Oracle verifies all table & column names from the dictionary and checks to see if you are authorized to see the data.

4.        Query Transformation - If enabled (query_rewrite=true), Oracle will transform complex SQL into simpler, equivalent forms and replace aggregations with materialized views, as appropriate.

5.        Optimization - Oracle then creates an execution plan, based on your schema statistics (or maybe with statistics from dynamic sampling in 10g).

6.        Create executable - Oracle builds an executable file with native file calls to service the SQL query.

 
 

Friday, June 11, 2010

Disk Space used by a Table in Oracle

0 comments
 How to find the Disk Space used by a table in Oracle, Here is the query

SELECT   segment_name table_name,
         SUM(BYTES) /(1024 * 1024) table_size_meg
FROM     user_extents
WHERE    segment_type = 'TABLE' AND
         segment_name = 'MY_TABLE'
GROUP BY segment_name

 
 

Error while Installing Oracle 11G on 64Bit Linux - You do not have sufficient permissions to access the inventory

0 comments
/data2/Oracle11G_setup/database

-bash-3.00$ ./runInstaller

You do not have sufficient permissions to access the inventory '/applns/oracle9204/oraInventory'. Installation cannot continue. Make sure that you have read/write permissions to the inventory directory and restart the installer.: Permission denied

If you get this error, rename  /etc/oraInst.loc  to oraInst.loc.bak

 
 

Unix Command to Display Directories as Tree

0 comments
Here is the command you can use to Display  Unix Directories like Tree structure, exactly like you use Tree command in windows which will give a similar out put like

N20:/data1/maxim/user01/mytest $ ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/   /' -e 's/-/|/'
   .
   |-test1
   |-test2
   |-test3
   |-index
 
 
 

Thursday, June 10, 2010

Unable to open DISPLAY-Xming

0 comments
XXX$ DISPLAY=12.18.84.120:0
XXX$ set $DISPLAY
XXX$ echo $DISPLAY
12.18.84.120:0
XXX$ xclock

Error: Can't open display:

Launch XLaunch and in the third screen, select 'No Access Control' and click Finish.
 
 

How to get a quick response / Immediate Support from Oracle

0 comments
I have followed these steps if we want to get a quick response from Oracle

1. Pick up the phone and open the SR via phone.
2. Request for duty manager, to contact you immediately on phone or on email.
3. Request the duty manager to assign the subject matter expert directly, without going through the Mandatory QA with some help desk person who is absolutely ignorant about real Oracle features.
4. Keep your .trc file, .log file, and rda report ready and upload(ftp)  directly to Oracle server from your Unix server, not from your PC/laptop/client. (ftp link will be provided by the Oracle  support person)
5. Doing this way you won't even have to login to metalink and use it's Service request system.

 S S Nair

Oracle DBA/ Developer

http://ora-ssn.blogspot.com

 
 

How to start and stop Oracle Enterprise Manager DB Console in Unix

0 comments

Login to target Server.

echo $ORACLE_SID
export ORACLE_SID=MYDB
emctl start dbconsole
TZ set to Asia/Calcutta
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.  All rights reserved.
http://N850:1158/em/console/aboutApplication
Oracle Enterprise Manager 10g is running.

You can use emctl status dbconsole to know the console status and
emctl stop  dbconsole to stop the dbconsole service.


S S Nair

Oracle DBA/ Developer

http://ora-ssn.blogspot.com

 

Wednesday, June 9, 2010

How to Determine Oracle Session Information given UNIX PID ?

0 comments

This will become useful when you notice that a db is consuming more time for response, all SQL and PL/SQL statements are running slow.
Now if you are in a Unix / Linux machine, you will issue the top command on the Unix.


Here you can see that CPU % used by 12231 is 90.9 % which might have caused my other server process to wait. If you want to determine what process or which Instance( if you have multiple instances in same machine) corresponds to this PID-12231, Issue the following query


Track or Tune the SQL issues by that session.


S S Nair

Oracle DBA/ Developer

http://ora-ssn.blogspot.com

 
 

 

ORA-BLOG. Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com