I use this command on linux:
for db in `ps -ef|grep ckpt|awk '{print $2}'`; do
ps -fp $db; ls -l /proc/$db/cwd
done
sample output:
UID PID PPID C STIME TTY TIME CMD
oracle 2452 1 0 Feb19 ? 00:05:30 ora_ckpt_DB1
lrwxrwxrwx 1 root root 0 Feb 19 11:50 /proc/2452/cwd -> /u01/app/oracle/product/11.2.0.3EE/dbs
UID PID PPID C STIME TTY TIME CMD
oracle 9221 1 0 Feb26 ? 00:02:05 ora_ckpt_DB2
lrwxrwxrwx 1 root root 0 Mar 1 12:40 /proc/9221/cwd -> /u01/app/oracle/product/12.1.0.2/dbs
UID PID PPID C STIME TTY TIME CMD
...
for db in `ps -ef|grep ckpt|awk '{print $2}'`; do
ps -fp $db; ls -l /proc/$db/cwd
done
sample output:
UID PID PPID C STIME TTY TIME CMD
oracle 2452 1 0 Feb19 ? 00:05:30 ora_ckpt_DB1
lrwxrwxrwx 1 root root 0 Feb 19 11:50 /proc/2452/cwd -> /u01/app/oracle/product/11.2.0.3EE/dbs
UID PID PPID C STIME TTY TIME CMD
oracle 9221 1 0 Feb26 ? 00:02:05 ora_ckpt_DB2
lrwxrwxrwx 1 root root 0 Mar 1 12:40 /proc/9221/cwd -> /u01/app/oracle/product/12.1.0.2/dbs
UID PID PPID C STIME TTY TIME CMD
...
for Solaris:
ReplyDeletefor db in `pgrep -lf _pmon_|awk '{print $1}'`; do
pwdx $db
done
http://www.dba-oracle.com/t_find_oracle_home.htm