应用是oracle ebs r12.1.1
数据库的版本是 11.1.0.7.0
OS版本 SunOS text 5.10 Generic_147440-09 sun4v sparc SUNW,T5240
已经在服务器端创建了 orapwd文件
创建的语法为
orapwd file=orapwvis11g password=test force=y ignorecase=y
-bash-3.2$ cd $ORACLE_HOME/dbs
-bash-3.2$ ls -rctl
total 218
-rw-r--r-- 1 oracle dba 12920 Jun 7 15:52 initdw.ora
-rw-r--r-- 1 oracle dba 2774 Jun 7 15:52 init.ora
-rw-r--r-- 1 oracle dba 19343 Jun 7 15:52 initR1211BL.ora.1026200834633
-rw-rw---- 1 oracle dba 1552 Jun 7 15:52 hc_DBUA0.dat
-rw-r--r-- 1 oracle dba 19528 Jun 7 15:52 initR1211XB4.ora.0142009231355
-rw-r----- 1 oracle dba 6656 Jun 7 15:52 spfileR1211XB4.ora.bak
-rw-r--r-- 1 oracle dba 0 Jun 7 16:01 VIS_ifile.ora
-rw-rw---- 1 oracle dba 1544 Jun 7 17:09 hc_VIS.dat
-rw-r----- 1 oracle dba 24 Jun 7 17:09 lkVIS
-rw-r--r-- 1 oracle dba 19515 Jun 7 17:18 initVIS_noaq.ora
-rw-r--r-- 1 oracle dba 0 Jun 7 17:18 VIS_text_ifile.ora
-rw-r--r-- 1 oracle dba 19469 Jun 8 11:12 initVIS.ora
-rw-r----- 1 oracle dba 1536 Jul 5 14:14 orapwvis11g
-bash-3.2$
服务器端执行os认证
-bash-3.2$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Thu Jul 5 16:26:02 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> show parameter REMOTE_LOGIN_PASSWORDFILE;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL>
SQL> show parameter instance_name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
instance_name string VIS
SQL>
SQL> show parameter db_name;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string VIS
SQL>
bash-3.2$ ps -ef |grep smon
oracle 8896 1 0 18:18:03 ? 0:33 ora_smon_VIS
-bash-3.2$ cd $ORACLE_HOME/network/admin
-bash-3.2$ pwd
/export/home2/oracle/VIS/db/tech_st/11.1.0/network/admin
bash-3.2$ ls -rctl
total 6
-rw-r--r-- 1 oracle dba 187 Jun 7 15:51 shrept.lst
drwxr-xr-x 2 oracle dba 512 Jun 7 15:51 samples
drwxr-xr-x 2 oracle dba 512 Jun 11 11:22 VIS_text
-bash-3.2$ cd VIS_text/
-bash-3.2$ ls -rctl
total 14
-rw-r--r-- 1 oracle dba 2 Jun 7 17:16 listener_ifile.ora
-rw-r--r-- 1 oracle dba 2 Jun 7 17:16 sqlnet_ifile.ora
-rw-r--r-- 1 oracle dba 1212 Jun 7 17:17 listener.ora
-rw-r--r-- 1 oracle dba 1723 Jun 7 17:17 tnsnames.ora
-rw-r--r-- 1 oracle dba 625 Jun 7 17:17 sqlnet.ora
-rw-r--r-- 1 oracle dba 0 Jun 11 11:22 select
-bash-3.2$ more tnsnames.ora
VIS=
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=text.yahgee.com)(PORT=1531))
(CONNECT_DATA=
(SID=VIS)
)
)
然后在服务器端执行如下操作,提示没有权限
bash-3.2$ sqlplus sys/test@VIS as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jul 6 10:09:22 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
ERROR:
ORA-01031: insufficient privileges
Enter user-name:
然后冲命名了密码文件以后,以正常登录
bash-3.2$ cd $ORACLE_HOME/dbs
-bash-3.2$ ls -rctl
total 218
-rw-r--r-- 1 oracle dba 12920 Jun 7 15:52 initdw.ora
-rw-r--r-- 1 oracle dba 2774 Jun 7 15:52 init.ora
-rw-r--r-- 1 oracle dba 19343 Jun 7 15:52 initR1211BL.ora.1026200834633
-rw-rw---- 1 oracle dba 1552 Jun 7 15:52 hc_DBUA0.dat
-rw-r--r-- 1 oracle dba 19528 Jun 7 15:52 initR1211XB4.ora.0142009231355
-rw-r----- 1 oracle dba 6656 Jun 7 15:52 spfileR1211XB4.ora.bak
-rw-r--r-- 1 oracle dba 0 Jun 7 16:01 VIS_ifile.ora
-rw-rw---- 1 oracle dba 1544 Jun 7 17:09 hc_VIS.dat
-rw-r----- 1 oracle dba 24 Jun 7 17:09 lkVIS
-rw-r--r-- 1 oracle dba 19515 Jun 7 17:18 initVIS_noaq.ora
-rw-r--r-- 1 oracle dba 0 Jun 7 17:18 VIS_text_ifile.ora
-rw-r--r-- 1 oracle dba 19469 Jun 8 11:12 initVIS.ora
-rw-r----- 1 oracle dba 1536 Jul 5 14:14 orapwvis11g
-bash-3.2$ cp orapwvis11g orapwVIS
-bash-3.2$
-bash-3.2$ rm orapwvis11g
-bash-3.2$ sqlplus sys/test@VIS as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Fri Jul 6 10:12:37 2012
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
再次通过客户端,用pl/sql developer 工具,以sys用户身份登录系统成功。
因此,在手动创建密码文件的时候,必须要采用 'orapw实例名' 这种格式的文件名
不管db处于哪种状态,客户端都可以通过 pl/sql developer 工具 以sys身份登录 ,只是有些视图访问不了而已
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24862808/viewspace-734759/,如需转载,请注明出处,否则将追究法律责任。