Skip to main content

Posts

Showing posts from August, 2011

Oracle 10g Performance Tuning Scripts (Sure Shot)

Oracle 10g Performance Tuning Scripts (Sure Shot) ----------------------------------------------------------- -- SHARED POOL TUNING -- Library Cache Hit Ratio should be less than 90%. if not, increase the size of SHARED POOL select gethitratio * 100 "Library Cache Hit Ratio"   from v$librarycache  where namespace = 'SQL AREA'; -- "RELOADS TO PINS RATIO" ratio should be less than 1 percent. Other wise SHARED_POOL_SIZE need to be increased. SELECT SUM(PINS) "EXECUTIONS",        SUM(RELOADS) "CACHE MISSES",        (SUM(RELOADS) / SUM(PINS)) * 100 "RELOADS TO PINS RATIO"   FROM V$LIBRARYCACHE; -- "CACHE HIT RATIO" should be greaer than 90 percent SELECT SUM(PINS) / (SUM(PINS) + SUM(RELOADS)) * 100 "CACHE HIT RATIO"   FROM V$LIBRARYCACHE;     -- check invalidations SELECT NAMESPACE,PINS,RELOADS,INVALIDATIONS FROM V$LIBRARYCACHE; --take advice for shared pool size SELECT SHARED_PO

Configuring EMCTL oracle in 10g

Open a new command prompt on your DB server: bash# emca -config dbcontrol db -------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- (This command will create and configure repository for dbcontrol In background it will create synonyms, roles for sysman users) You need to know the SID of database , port on which LISTNER for database in running, the password for sysman and system user.   for that go to LSNRCTL and look for services and status STARTED EMCA at Jul 6, 2010 12:33:45 PM EM Configuration Assistant, Version 10.2.0.1.0 Production Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information: Database SID: Listener port number: 1521 Password for SYS user: ******** Password for DBSNMP user: ******* Password for SYSMAN user:

Step By Step Cloning Oracle Database Using RMAN

~`~` Step By Step Cloning Oracle Database 10g Using RMAN`~`~ Delete existing DataFile folder in oradata location.  Login to SQLprompt. SQL> shutdown abort; (target database) Now login to RMAN and set DBID: RMAN>  set DBID 123456 ; (Get it from source database, by connecting RMAN.) Now, if there is no database i.e. you have just installed the target database (software only), then check if the dump destination folders are created at dump destination.Ex. - /app/oracle/admin/ULTIMUS/bdump/. Startup the database in no mount state : SQL> startup nomount; Restore pfile: SQL> restore spfile to pfile '$ORACLE_HOME/dbs/initULTIMUS.ora' from 'BACKUP_DESTINATION/autobackup/2011_06_20/o1_mf_s_744258937_6pofdsx4_.bkp’; (or copy pfile i.e. initULTIMUS.ora from live server then paste it to dbs folder, if the following command is not working). Restart the database with new pfile: SQL> startup force nomount pfile=' $ORACLE