Wednesday, March 31, 2010

Setting directIO for UFS system

Preferred way to enable directio on Oracle is to set the following option in init.ora

FILESYSTEMIO_OPTIONS = setall


Check out the following to verify if DIRECT IO is enabled in Solaris:

http://developers.sun.com/solaris/articles/solUFSdiskIO.html

Oracle 11g background processes

Oracle 11g process:

  • smon
  • lgwr
  • dbwr (multiple process)
  • chkpt
  • pmon
  • mmon
    • process to collect statistics for AWR
  • mmnl
    • process to perform manageability related task
  • mman
    • process to manage automatic shared memory
  • pnnn (optional)
    • Process for parallel query operations
  • vktm (Virtual keeper of time
    • Process tracks wall-clock time and is used as a reference time counter
  • dia0
    • Diagnostic process to detects and resolve hangs and deadlocks
  • diag
    • Diagnosability capture process for performing diagnostic dumps
  • dbrm
    • Database resource management process
  • psp0
    • Process spawner to spawn oracle process as needed
  • reco
    • recoverer process
  • d000
    • dispatcher process to listen to and receive request from connected sessions
  • s0000
    • shared server process
  • smco
    • Space management co-ordinator ...spawns wnnn proces to carry out the task
  • fbda
    • flashback data archiver process
  • cjq0
    • Job queue process used for batch processing
  • gen0
    • General tak execution process
  • qmnc
    • Advanced queing coordination process. Spawns Qnnn process as needed

Friday, March 26, 2010

Enterprise manager : ERROR: NMO not setuid-root (Unix-only)

I was not able to login as OS user using Enterprise manager 11gR1. I kept getting the following error


ERROR: NMO not setuid-root (Unix-only)

All google results indicate that this error occurs if you have not run root.sh after installation. In my scenario , I verified that I had successfully ran and that nm? binaries in $ORACLE_HOME had the right permission:
-rwsr-s--- 1 root dba 22216 Mar 16 10:37 nmb
-rwsr-s--- 1 root dba 27056 Mar 16 10:37 nmo
-rwsr-s--- 1 root dba 95328 Mar 16 10:37 nmhs

However, I still continued to get the error.

Taking a closer look, I released that the directory which had $ORACLE_HOME installed was mounted with nosetuid options. Fixing that resolved the issue.

Out of memory error while create database

  • Issue prctl $$ command as oracle and root user and ensure that proj.max-shm-mem variable shows the value you need. Else update the /etc/system with the following and reboot the system:
    • set shmsys:shminfo_shmmax=0xb40000000
  • If you do not want to reboot the system, make sure you update the project for both root user and oracle user with prcl commands given below.
  • Create a project named oracle using following command:
    • projadd oracle
  • Verify that project was created
    • projects -l
  • Associate this project with oracle user:
    • Edit /etc/user_attr file and add the following line
      • oracle::::project=oracle (four colon)
  • Verify that project oracle is associated with oracle user:
    • login as oracle user and issue id -p. It should show oracle as project for oracle user.
  • Check the existing value of shared memory variable for this project:
    • prctl -n project.max-shm-memory -i project oracle
  • To set it to a different value:
    • To set the value dynamically for the given session...will be lost after reboot
      •  prctl -n project.max-shm-memory -v 40G -r -i project oracle
    • To set it in /etc/project file so it is persistent across reboot
      • # projmod -s -K "project.max-shm-memory=(priv,4gb,deny)" oracle

Setting up DBConsole for a database

  • Verify if dbsnmp user exist:
    • select * from all_users where username= 'DBSNMP'
  • Grant users the right privileges:
    • alter user DBSNMP identified by "<new password>" ;
    • alter user DBSNMP account unlock ;
  • Ensure remote login is enabled
    • Ensure REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE is set in the init.ora for the database
      •  show parameters remote% ;
    • Ensure password file exist in $ORACLE_HOME/dbs. Else create it as under: 
    • $ orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=< some password> entries= 5
  • Create DBConsole along with repos:
    • emca -config dbcontrol db -repos create
  • For additional info refer to
  • Verify that dbconsole is up and running
    • emctl status dbconsole
      If you recreated the db, just recreate the dbcontrol repos as under:
      emca -config dbcontrol db -repos recreate
    • If db console is running on your server, you can access EM through browser as under:

Wednesday, March 17, 2010

Location of log files in Oracle 11g

Log Location
  • Foreground process traces: $ADR_HOME/trace
  • Background process traces : $ADR_HOME/trace
  • Alert Log data : $ADR_HOME/alert and trace
  • Core dumps: $ADR_HOME/cdump
  • Incident dumps : $ADR_HOME/incident/incdir_n
  • ADR_ROOT or ADR_BASE is set to $DIAGNOSTIC_DEST initialization parameter. If this parameter is not set, the database sets $DIAGNOSTIC_DEST to $ORACLE_BASE if this variable is set. Else it sets it to $ORACLE_HOME/log
  • ADR_HOME for database is set to ADR_ROOT/diag/rdbms/DB_NAME/ORACLE_SID
  • You can find out the location of all ADR variables by following sql query
    • sql > select * from V$DIAG_INFO ;

Wednesday, March 3, 2010

Interesting AOL sites

I go to these sites quiet often and hence thought of sharing it with you all.

For yoga related info, check this out:
http://artoflivingyoga.org/index.php

For the daily dose of wisdom, check this out:
http://wisdomfromsrisriravishankar.blogspot.com/
http://www.facebook.com/#!/pages/Sri-Sri-Ravi-Shankar/330938752535?ref=ts

To check for an upcoming AOL course in your area , go to
http://us.artofliving.org/
Select the state and area and it will list all the upcoming AOL courses in that area.....


For Ramdev yoga
For controlling obesity : http://www.youtube.com/watch?v=lM6Yu1Q6u8k
English version :  http://www.youtube.com/watch#!v=2xqgW1AzBLc&feature=channel

Pranayam (Breathing excercise) http://www.youtube.com/watch#!v=1e77exc7ukI&feature=related

Upcoming AOL Course in Union City and Art Excel course in Castro Valley

There is an Art of Living course (part 1 course) happening in Union City from March 17th to March 21. You can find more information at :

http://secure.artofliving.org/course_details.aspx?course_id=6720

Also, for the first time in Castro valley (about 5 minutes from my residence) an ART Excel course is happening from March 25th to March 28th. You can find more information at :

http://secure.artofliving.org/course_details.aspx?course_id=6750

ART EXCEL course is for kids between 8 to 13 years of age. You can find more information for ART EXCEL course at http://www.artoflivingyouth.org/kidzone.html