2011-07-27

how to reduce noise in your car

www.installdr.com/TechDocs/999503.pdf

how to see error messages in english

In order to see Oracle error messages in English, you must have in your registry, under HKEY_LOCAL_MACHINE... Software...Oracle  , for key NLS_LANG, the following value :  AMERICAN_AMERICA.WE8ISO8859P1

how to change hostname or domain for oracle application server

http://download.oracle.com/docs/cd/B14099_19/core.1012/b13995/host.htm#CIHJIBAG
Follow these steps for each middle-tier instance on your host. Be sure to complete the steps entirely for one middle-tier instance before you move on to the next.
  1. Log in to the host as the user that installed the middle-tier instance.
  2. Make sure your ORACLE_HOME environment variable is set to the middle-tier Oracle home. Do not use a trailing slash (UNIX) or backslash (Windows) when specifying the variable.
  3. On UNIX systems, set the LD_LIBRARY_PATH, LD_LIBRARY_PATH_64, LIB_PATH, or SHLIB_PATH environment variables to the proper values. The actual environment variables and values that you must set depend on the type of your UNIX operating system.
  4. Run the following commands in the middle-tier Oracle home:
    • On UNIX systems:
      cd ORACLE_HOME/chgip/scripts
      ./chgiphost.sh -mid
      
      
    • On Windows systems:
      cd ORACLE_HOME\chgip\scripts
      cmd /c chgiphost.bat -mid 
       
      Verify the logs 

2011-07-21

how to see how much cpu your oracle instance consumes

An excellent article: http://dboptimizer.com/2011/07/21/oracle-cpu-time/

Starting in 10g Oracle records both the CPU used by the instance as well as the load on the system in v$sysmetric. This is awesome as we can see how busy the system is and how much of the CPU Oracle is responsible for:
col metric_name for a25
col metric_unit for a25
select metric_name, value, metric_unit from v$sysmetric where metric_name like'%CPU%' where group_id=2;
 
 
with AASSTAT as (
           select
                 decode(n.wait_class,'User I/O','User I/O',
                                     'Commit','Commit',
                                     'Wait')                               CLASS,
                 sum(round(m.time_waited/m.INTSIZE_CSEC,3))                AAS
           from  v$waitclassmetric  m,
                 v$system_wait_class n
           where m.wait_class_id=n.wait_class_id
             and n.wait_class != 'Idle'
           group by  decode(n.wait_class,'User I/O','User I/O', 'Commit','Commit', 'Wait')
          union
             select 'CPU_ORA_CONSUMED'                                     CLASS,
                    round(value/100,3)                                     AAS
             from v$sysmetric
             where metric_name='CPU Usage Per Sec'
               and group_id=2
          union
            select 'CPU_OS'                                                CLASS ,
                    round((prcnt.busy*parameter.cpu_count)/100,3)          AAS
            from
              ( select value busy from v$sysmetric where metric_name='Host CPU Utilization (%)' and group_id=2 ) prcnt,
              ( select value cpu_count from v$parameter where name='cpu_count' )  parameter
          union
             select
               'CPU_ORA_DEMAND'                                            CLASS,
               nvl(round( sum(decode(session_state,'ON CPU',1,0))/60,2),0) AAS
             from v$active_session_history ash
             where SAMPLE_TIME > sysdate - (60/(24*60*60))
)
select
       ( decode(sign(CPU_OS-CPU_ORA_CONSUMED), -1, 0, (CPU_OS - CPU_ORA_CONSUMED )) +
       CPU_ORA_CONSUMED +
        decode(sign(CPU_ORA_DEMAND-CPU_ORA_CONSUMED), -1, 0, (CPU_ORA_DEMAND - CPU_ORA_CONSUMED ))) CPU_TOTAL,
       decode(sign(CPU_OS-CPU_ORA_CONSUMED), -1, 0, (CPU_OS - CPU_ORA_CONSUMED )) CPU_OS,
       CPU_ORA_CONSUMED CPU_ORA,
       decode(sign(CPU_ORA_DEMAND-CPU_ORA_CONSUMED), -1, 0, (CPU_ORA_DEMAND - CPU_ORA_CONSUMED )) CPU_ORA_WAIT,
       COMMIT,
       READIO,
       WAIT
from (
select
       sum(decode(CLASS,'CPU_ORA_CONSUMED',AAS,0)) CPU_ORA_CONSUMED,
       sum(decode(CLASS,'CPU_ORA_DEMAND'  ,AAS,0)) CPU_ORA_DEMAND,
       sum(decode(CLASS,'CPU_OS'          ,AAS,0)) CPU_OS,
       sum(decode(CLASS,'Commit'          ,AAS,0)) COMMIT,
       sum(decode(CLASS,'User I/O'        ,AAS,0)) READIO,
       sum(decode(CLASS,'Wait'            ,AAS,0)) WAIT
from AASSTAT)
/
 

norocul se termina

http://tudorgalos.ro/2011/07/a-i-se-da-in-gura/

bind peeking in Oracle Siebel

Siebel Bind peeking performance degradation future enhancement [ID 1273535.1]

_optim_peek_user_binds

A very good article about bind peeking in Oracle Database 10G : http://www.pythian.com/news/867/stabilize-oracle-10gs-bind-peeking-behaviour-by-cutting-histograms/

exec dbms_scheduler.disable('SYS.GATHER_STATS_JOB');

here are three things that might put you at risk of unstable plans due to bind variable peeking. Those are histograms, partitions, and range-based predicates.

histograms and bind variable peeking can cause an unstable plan.

In 10G, bind variable peeking happens only on a hard parse, which means that all following executions will use the same plan, regardless of the bind variable value.

It might be a good idea to wipe out all histograms in a database (gather your stats with FOR ALL COLUMNS SIZE 1 clause), and manually add them when you decide that you really need one.

 

2011-07-20

11.2.0.2.3

PSU 11.2.0.2.3 contains all fixes previously released in PSU 11.2.0.2.2 and the following new fixes:

2011-07-19

faster index creation

A good article : http://iggyfernandez.wordpress.com/2011/07/04/take-that-exadata-fast-index-creation-using-noparallel/

Leverage the Oracle cache! This is one case where “direct path reads” and parallelism hurt instead of helping. The trick is to use NOPARALLEL so that data is loaded into shared memory using “db file scattered reads”—instead of being loaded into private memory using direct path reads—and to run multiple CREATE INDEX statements simultaneously. In the words of David Aldridge, you’ll get “get 1 index creation process performing the physical reads and the other 9 (for example) processes greedily waiting for the blocks to load into the buffer.”

how to find the patch number for oracle database

Quick Reference to Patchset Patch Numbers [ID 753736.1]