[oracle@MSPDBServer ~]$ export ORACLE_SID=MSP
[oracle@MSPDBServer ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 – Production on Mon Nov 14 16:30:16 2011

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to an idle instance.

SQL>
环境变量正确,但是登陆不入数据库

 

[oracle@MSPDBServer ~]$ ps -ef|  grep oracle | grep -v LOCAL=NO
oracle    3957 30080  0 May23 ?        03:05:20 /home/oracle/product/10.2.0/MSP/jdk/bin/java -server -Xmx256M -XX:MaxPermSize=96m -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -DORACLE_HOME=/home/oracle/product/10.2.0/MSP -Doracle.home=/home/oracle/product/10.2.0/MSP/oc4j -Doracle.oc4j.localhome=/home/oracle/product/10.2.0/MSP/MSPDBServer_MSP/sysman -DEMSTATE=/home/oracle/product/10.2.0/MSP/MSPDBServer_MSP -Doracle.j2ee.dont.use.memory.archive=true -Djava.protocol.handler.pkgs=HTTPClient -Doracle.security.jazn.config=/home/oracle/product/10.2.0/MSP/oc4j/j2ee/OC4J_DBConsole_MSPDBServer_MSP/config/jazn.xml -Djava.security.policy=/home/oracle/product/10.2.0/MSP/oc4j/j2ee/OC4J_DBConsole_MSPDBServer_MSP/config/java2.policy -Djava.security.properties=/home/oracle/product/10.2.0/MSP/oc4j/j2ee/home/config/jazn.security.props -DEMDROOT=/home/oracle/product/10.2.0/MSP/MSPDBServer_MSP -Dsysman.md5password=true -Drepapi.oracle.home=/home/oracle/product/10.2.0/MSP -Ddisable.checkForUpdate=true -Djava.awt.headless=true -jar /home/oracle/product/10.2.0/MSP/oc4j/j2ee/home/oc4j.jar -config /home/oracle/product/10.2.0/MSP/oc4j/j2ee/OC4J_DBConsole_MSPDBServer_MSP/config/server.xml
root     10548 10503  0 14:23 pts/1    00:00:00 su – oracle
oracle   10549 10548  0 14:23 pts/1    00:00:00 -bash
oracle   10647 30080  0  2010 ?        13:12:10 /home/oracle/product/10.2.0/MSP/bin/emagent
root     12347 12020  0 15:37 pts/3    00:00:00 su – oracle
oracle   12348 12347  0 15:37 pts/3    00:00:00 -bash
root     13222 12748  0 16:04 pts/5    00:00:00 su – oracle
oracle   13223 13222  0 16:04 pts/5    00:00:00 -bash
oracle   13743     1  0 16:17 ?        00:00:00 /usr/libexec/gconfd-2 13
root     13810 27852  0 16:18 ?        00:00:00 sshd: oracle [priv]
oracle   13821 13810  0 16:18 ?        00:00:04 sshd: oracle@notty
oracle   13822 13821  0 16:18 ?        00:00:00 /usr/bin/gnome-session –display localhost:11.0
oracle   13850     1  0 16:18 ?        00:00:00 /usr/bin/gnome-keyring-daemon
oracle   13852     1  0 16:18 ?        00:00:00 /usr/libexec/bonobo-activation-server –ac-activate –ior-output-fd=19
oracle   13858     1  0 16:18 ?        00:00:00 /usr/libexec/gnome-settings-daemon –oaf-activate-iid=OAFIID:GNOME_SettingsDaemon –oaf-ior-fd=23
oracle   13862     1  0 16:18 ?        00:00:00 /usr/libexec/gam_server
oracle   13879     1  0 16:18 ?        00:00:00 gnome-panel –sm-client-id default2
oracle   13881     1  0 16:18 ?        00:00:00 nautilus –no-default-window –sm-client-id default3
oracle   13883     1  0 16:18 ?        00:00:00 gnome-volume-manager –sm-client-id default6
oracle   13890     1  0 16:18 ?        00:00:00 /usr/libexec/gnome-vfs-daemon –oaf-activate-iid=OAFIID:GNOME_VFS_Daemon_Factory –oaf-ior-fd=29
oracle   13897     1  0 16:18 ?        00:00:00 /usr/libexec/mapping-daemon
root     13906 27852  0 16:19 ?        00:00:00 sshd: oracle [priv]
oracle   13909 13906  0 16:19 ?        00:00:00 sshd: oracle@pts/4
oracle   13910 13909  0 16:19 pts/4    00:00:00 -bash
oracle   14025     1  0 16:20 ?        00:00:00 pam-panel-icon –sm-client-id default0
oracle   14027     1  0 16:20 ?        00:00:01 /usr/bin/python /usr/bin/rhn-applet-gui –sm-client-id default4
oracle   14208 26556  0 16:27 ?        00:00:00 sleep 59
oracle   14216 12348  0 16:28 pts/3    00:00:00 ps -ef
oracle   14217 12348  0 16:28 pts/3    00:00:00 grep oracle
oracle   15937     1  0 Oct14 ?        00:01:11 ora_q001_MSP
oracle   22109     1  6 Oct13 ?        2-00:09:02 ora_j000_MSP
oracle   22517     1  6 Oct13 ?        1-23:54:55 ora_j001_MSP
oracle   22519     1  5 Oct13 ?        1-21:47:05 ora_j002_MSP
oracle   22521     1  5 Oct13 ?        1-20:09:08 ora_j003_MSP
oracle   22523     1  6 Oct13 ?        1-23:29:54 ora_j004_MSP
oracle   22581     1  5 Oct13 ?        1-21:11:45 ora_j005_MSP
oracle   22583     1  5 Oct13 ?        1-22:23:23 ora_j006_MSP
oracle   22585     1  6 Oct13 ?        1-23:28:49 ora_j007_MSP
oracle   22587     1  6 Oct13 ?        1-23:18:27 ora_j008_MSP
oracle   22589     1  6 Oct13 ?        2-00:32:12 ora_j009_MSP
oracle   26556     1  0 Sep05 ?        00:03:26 /bin/ksh ./jgetvmstat.sh
oracle   29339     1  0  2010 ?        00:40:32 /home/oracle//product/10.2.0/MSP//bin/tnslsnr LISTENER -inherit
注意监监听目录多了个//

因此链接不了,环境变量故障
SQL> select instance_name,to_char(startup_time,’yyyy-mm-dd hh24:mi:ss’) from v$instance;

INSTANCE_NAME    TO_CHAR(STARTUP_TIM
—————- ——————-
MSP              2010-12-24 11:13:32

 

 

[oracle@MSPDBServer /]$ ps -eo pid,tty,user,comm,stime,etime,stat,cmd,comm,command | grep lsn
15292 pts/3    oracle   grep             17:06       00:00 S+   grep lsn         grep             grep lsn
29339 ?        oracle   tnslsnr           2010 325-14:27:29 Ssl /home/oracle//pr tnslsnr          /home/oracle//product/10.2.0/MSP//bin/tnslsnr LISTENER -inh

时间是2010 第325天的14:27:29秒
2010-11月21号

比实例早启动

 

 

 

 

 
To see every process on the system using standard syntax:
   ps -e
   ps -ef
   ps -eF
   ps -ely

To see every process on the system using BSD syntax:
   ps ax
   ps axu

To print a process tree:
   ps -ejH
   ps axjf

To get info about threads:
   ps -eLf
   ps axms

To get security info:
   ps -eo euser,ruser,suser,fuser,f,comm,label
   ps axZ
   ps -eM

To see every process except those running as root (real & effective ID)
   ps -U root -u root -N

To see every process with a user-defined format:
   ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
   ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
   ps -eopid,tt,user,fname,tmout,f,wchan