天天看点

oracle 查找上一个,查看ORACLE_HOME的另外一个方法

查看ORACLE_HOME的另外一个方法[@[email protected]]

[[email protected] conf]# ps -ef |grep ora

oracle 8867 1 0 16:08 ? 00:00:00 ora_pmon_orcl

oracle 8869 1 0 16:08 ? 00:00:00 ora_mman_orcl

oracle 8871 1 0 16:08 ? 00:00:00 ora_dbw0_orcl

oracle 8873 1 0 16:08 ? 00:00:00 ora_lgwr_orcl

oracle 8875 1 0 16:08 ? 00:00:00 ora_ckpt_orcl

oracle 8877 1 0 16:08 ? 00:00:00 ora_smon_orcl

oracle 8879 1 0 16:08 ? 00:00:00 ora_reco_orcl

oracle 8881 1 0 16:08 ? 00:00:00 ora_cjq0_orcl

oracle 8883 1 0 16:08 ? 00:00:00 ora_d000_orcl

oracle 8885 1 0 16:08 ? 00:00:00 ora_s000_orcl

oracle 8891 1 0 16:08 ? 00:00:00 ora_p000_orcl

oracle 8893 1 0 16:08 ? 00:00:00 ora_p001_orcl

oracle 8895 1 0 16:09 ? 00:00:00 ora_qmnc_orcl

oracle 8897 1 2 16:09 ? 00:00:00 ora_c001_orcl

oracle 8899 1 0 16:09 ? 00:00:00 ora_a001_orcl

oracle 8901 1 2 16:09 ? 00:00:00 ora_mmon_orcl

oracle 8903 1 0 16:09 ? 00:00:00 ora_mmnl_orcl

oracle 8905 1 3 16:09 ? 00:00:00 ora_j000_orcl

oracle 8907 1 5 16:09 ? 00:00:01 ora_j001_orcl

oracle 8909 1 0 16:09 ? 00:00:00 ora_j002_orcl

oracle 8911 1 0 16:09 ? 00:00:00 ora_j003_orcl

oracle 8913 1 1 16:09 ? 00:00:00 ora_q000_orcl

oracle 8915 1 0 16:09 ? 00:00:00 ora_q001_orcl

找到ora_smon_orcl进程id,这里为8877

[[email protected] conf]# ls -l /proc/8877/cwd

lrwxrwxrwx 1 oracle oinstall 0 3 7 16:10 /proc/8877/cwd -> /oracle10/product/10.1.0/db_1/dbs

可以知道ORACLE_HOME的目录就是/oracle10/product/10.1.0/db_1/dbs了