Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Tuesday, August 23, 2011

use truss to find the process execution


$ truss -aefo logfile
$ truss -rall -wall -p

make sure the logfile is stored where enough size is available.

NFS mount options for Oracle on Solaris

NFS mounts need to have the correct mount options so the following document may help:

- Mount Options for Oracle files when used with NAS devices (Doc ID 359515.1)


rw,bg,vers=3,hard,intr,proto=tcp,rsize=32768,wsize=32768,llock,suid,timeo=600,actimeo=0


when we used these options

rw,bg,hard,nointr,rsize=32768,wsize=32768,proto=tcp,noac,forcedirectio,vers=3,suid

we had some issues while backing up the controlfile with the below command:

>rman

Recovery Manager: Release 11.2.0.1.0 - Production on Thu May 19 21:50:38 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

RMAN> connect target /

connected to target database: Database (DBID=482)


RMAN> backup current controlfile format '/icm_stage/sshaik/backup_controlfile.ctl';

Starting backup at 19-MAY-11
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
channel ORA_DISK_1: starting piece 1 at 19-MAY-11
channel ORA_DISK_1: finished piece 1 at 19-MAY-11
piece handle=/icm_stage/sshaik/backup_controlfile.ctl tag=TAG20110519T215129 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 19-MAY-11

RMAN> backup tag 'RapidClone_RAC' as copy current controlfile format '/icm_stage/sshaik/backup_controlfile1.ctl';

Starting backup at 19-MAY-11
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
channel ORA_DISK_1: starting datafile copy
copying current control file

<--- BACKUP NEVER FINISHES AND NEVER RELEASES THE CURSOR------>
<--- HAVE TO USE BREAK OUT OPTIONS CTRL C TO COME OUT OF THE SESSION--->

Wednesday, August 17, 2011

unix cpu info

find number of cpu's and cores in Solaris;

cpu_info|grep core_id|sort -u|wc -l
4

>psrinfo -pv
The physical processor has 8 virtual processors (0-7)
SPARC64-VII (portid 1024 impl 0x7 ver 0xa1 clock 2750 MHz)

sockets:
echo "`psrinfo -p` socket(s)"



In RHEL:
$ grep processor /proc/cpuinfo

Tuesday, August 9, 2011

using coreadm to dump coredump files

When ever you want to analyze a process or generate core dump of an active process.

we can use
$core

and this dumps the active state dump of the particular process

what if you want to dump the core to another location with pid attached to it.

$core -p /location/core.%f.%p

use coreadm to learn more on core dumps

Friday, August 5, 2011

Find users with particular resposiblity in R12 oracle apps

from DB

SELECT fu.user_name,fu.description,fu.creation_date,fu.start_date,fu.end_date,fu.last_logon_date,fu.email_address
FROM apps.fnd_user_resp_groups_direct furgd, apps.fnd_responsibility_vl frvl, apps.fnd_user fu
WHERE furgd.responsibility_id = frvl.responsibility_id
AND fu.user_id = furgd.user_id
AND(to_char(furgd.end_date) is null
OR furgd.end_date > sysdate)
AND frvl.end_date is null
AND frvl.responsibility_name in ( 'System Administrator', 'System Administration');
/

Tuesday, August 2, 2011

UNIX prstat vs top

While digging for problems in UNIX prstat comes handy in looking at the some of the statistics of the server.

prstat - report active process statistics

example:

Now
statistics are sorted by cpu high -low
prstat -s cpu
or -u for a particular user
prstat -u oracle -s cpu

or top 5 cpu events
prstat -s cpu -n 5

or
prstat -T (total)
Other options available to prstat are:

-a Report information about processes and users
-T Report information about processes and tasks.
  -u    Report only processes whose effective user  ID
  -v    Report  verbose  process  usage

-s key Sort output lines (that is, processes, lwps, or users) by key in descending order. Only one key can be used as an argument. There are five possible key values: cpu Sort by process CPU usage. This is the default. pri Sort by process priority. rss Sort by resident set size. size Sort by size of process image.
-n ntop[,nbottom] (comes with ntop or nbottom)