您的位置:首页 > 数据库 > Oracle

操作系统认证登录Oracle

2009-12-15 15:21 204 查看
按照视频学习一步步来,出现的错误

sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

SQL> show parameter auth

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE
SQL> create user ops$bbker2009 identified externally
2 default tablespace mytbs;

User created.

SQL> grant create session to ops$bbker2009;

Grant succeeded.

[root@Oracle9iDemo ~]# su - bbker2009
[bbker2009@Oracle9iDemo ~]$ export ORACLE_SID=pitts #换成我的正在运行的DB wade也不行
[bbker2009@Oracle9iDemo ~]$ export ORACLE_HOME=/u01/oracle
[bbker2009@Oracle9iDemo ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[bbker2009@Oracle9iDemo ~]$ sqlplus /
sqlplus: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory

网上有人的建议:chmod -R a+rX $ORACLE_HOME

[oracle@Oracle9iDemo ~]$ chmod -R a+rX $ORACLE_HOME
chmod: changing permissions of `/u01/oracle/bin/extjob': Operation not permitted
chmod: changing permissions of `/u01/oracle/bin/nmb': Operation not permitted
chmod: changing permissions of `/u01/oracle/bin/oradism': Operation not permitted
chmod: changing permissions of `/u01/oracle/bin/nmo': Operation not permitted

还有的说是要装两个包才行,我发现其实我已经装过了,重新登录导入环境变量登入sqlplus可是不行:

[root@Oracle9iDemo ~]# rpm -vih libaio-0.3.105-2.i386.rpm
warning: libaio-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... (########################################### [100%]
package libaio-0.3.105-2 is already installed
[root@Oracle9iDemo ~]# rpm -ivh libaio-devel-0.3.105-2.i386.rpm
warning: libaio-devel-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing... (########################################### [100%]
package libaio-devel-0.3.105-2 is already installed

没办法只有按照教材上说的来了,环境变量我也不导入了,直接敲sqlplus /, 直接就登陆了,原因是什么,有待进一步学习。。。

[bbker2009@Oracle9iDemo ~]$ sqlplus /

SQL*Plus: Release 10.2.0.1.0 - Production on Mon Dec 14 21:50:27 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> show user
USER is "OPS$BBKER2009"

[bbker2009@Oracle9iDemo ~]$ id
uid=502(bbker2009) gid=503(bbker2009) groups=503(bbker2009)

教材:

Username for operating system authentication
The OS_AUTHENT_PREFIX initializationparameter is used to specify the format of the
usernames for operating system authentication. This value defaults to OPS$ to make it
backward compatible with earlier releases of the Oracle server. To set the prefix to a NULL
value, specify this initialization parameter as:
OS_AUTHENT_PREFIX = ““
The example in the slide shows how a user, aaron, is defined in the database. This
specifies that the operating system user aaron will be allowed access to the database
without being validated by the Oracle server. Thus, to use SQL*Plus to log on to the
system, the UNIX user aaron must enter the following command from the operating
system:
$ sqlplus /
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: