时不我待。
分类: Oracle
2009-05-29 11:02:42
[root@db1 ~]# id root
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) //Oralce用户权限属于dba组,可以以OS身份登陆数据库中。 [root@db1 ~]# id oracle
uid=110(oracle) gid=110(oinstall) groups=110(oinstall),111(dba) //root用户权限属于dba组,不能OS身份登陆数据库。
[oracle@db1 ~]$ sqlplus as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 29 10:18:17 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, Real Application Clusters, OLAP, Data Mining and Real Application Testing options SQL> show parameter instance_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------ instance_name string zddb1 SQL> [oracle@db1 ~]$ ps -ef |grep ora_ oracle 11821 1 0 09:52 ? 00:00:00 ora_q002_zddb1 oracle 17047 1 0 May27 ? 00:00:13 ora_j002_zddb1 oracle 17935 1 0 May28 ? 00:00:01 ora_j001_zddb1 oracle 18755 1 0 May28 ? 00:00:00 ora_pz98_zddb1 oracle 20089 1 0 May27 ? 00:00:01 ora_pmon_zddb1 oracle 20091 1 0 May27 ? 00:00:00 ora_diag_zddb1 oracle 20093 1 0 May27 ? 00:00:00 ora_psp0_zddb1 oracle 20095 1 0 May27 ? 00:00:03 ora_lmon_zddb1 oracle 20097 1 0 May27 ? 00:00:09 ora_lmd0_zddb1 oracle 20100 1 0 May27 ? 00:00:11 ora_lms0_zddb1 oracle 20104 1 0 May27 ? 00:00:13 ora_lms1_zddb1 oracle 20108 1 0 May27 ? 00:00:00 ora_mman_zddb1 oracle 20110 1 0 May27 ? 00:00:04 ora_dbw0_zddb1 oracle 20112 1 0 May27 ? 00:00:06 ora_lgwr_zddb1 oracle 20114 1 0 May27 ? 00:00:16 ora_ckpt_zddb1 oracle 20116 1 0 May27 ? 00:00:05 ora_smon_zddb1 oracle 20118 1 0 May27 ? 00:00:00 ora_reco_zddb1 oracle 20120 1 0 May27 ? 00:00:41 ora_cjq0_zddb1 oracle 20122 1 0 May27 ? 00:00:10 ora_mmon_zddb1 oracle 20124 1 0 May27 ? 00:00:11 ora_mmnl_zddb1 oracle 20126 1 0 May27 ? 00:00:00 ora_d000_zddb1 oracle 20128 1 0 May27 ? 00:00:00 ora_s000_zddb1 oracle 20137 1 0 May27 ? 00:00:09 ora_lck0_zddb1 oracle 20201 1 0 May27 ? 00:00:00 ora_arc0_zddb1 oracle 20203 1 0 May27 ? 00:00:01 ora_arc1_zddb1 oracle 20229 1 0 May27 ? 00:00:22 ora_pz99_zddb1 oracle 20265 1 0 May27 ? 00:00:00 ora_qmnc_zddb1 oracle 20301 1 0 May27 ? 00:00:47 ora_j000_zddb1 oracle 20404 1 0 May27 ? 00:00:06 ora_q000_zddb1 oracle 24015 23925 0 10:19 pts/5 00:00:00 grep ora_ [oracle@db1 ~]$ //数据库运行正常,通过Listeners能够正常连接。 [root@db1 ~]# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/
[root@db1 ~]# export ORACLE_SID=zddb1 [root@db1 ~]# sqlplus -bash: sqlplus: command not found [root@db1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 29 09:58:12 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-01031: insufficient privileges Enter user-name: ERROR: ORA-01017: invalid username/password; logon denied //root用户连接结果正常
[root@db1 ~]# su - oracle
[oracle@db1 ~]$ export ORACLE_SID=zddb1 [oracle@db1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1/ [oracle@db1 ~]$ /u01/app/oracle/product/10.2.0/db_1/bin/sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.4.0 - Production on Fri May 29 09:59:03 2009
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> //Oracle用户连接结果异常 |
[oracle@db1 ~]$ cat .bash_profile # .bash_profile# Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export ORACLE_BASE=/u01/app/oracle/ export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs_1 export ORACLE_SID=zddb1export PATH=$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:$PATH:$HOME/bin |