sql*plus: release 9.2.0.3.0 - production on thu apr 15 09:58:45 2004
copyright (c) 1982, 2002, oracle corporation. all rights reserved.
connected to:oracle9i enterprise edition release 9.2.0.3.0 - productionwith the partitioning, olap and oracle data mining optionsjserver release 9.2.0.3.0 - production
sql> alter user sys identified by oracle;
user altered.
sql> show parameter pass
name type value--------------------- ----------- ------------------------------remote_login_passwordfile string none
remote:
e:/oracle/ora92/bin>sqlplus /nologsql*plus: release 9.2.0.4.0 - production on 星期四 4月 15 09:39:22 2004copyright (c) 1982, 2002, oracle corporation. all rights reserved.sql> connect sys/[email protected] as sysdbaerror:ora-01017: invalid username/password; logon denied
此处实际上是无法通过口令文件验证
2.remote_login_passwordfile = exclusive
sql> alter system set remote_login_passwordfile=exclusive scope=spfile;
system altered.
sql> startup force;oracle instance started.
total system global area 131142648 bytesfixed size 451576 bytesvariable size 104857600 bytesdatabase buffers 25165824 bytesredo buffers 667648 bytesdatabase mounted.database opened.sql> show parameter pass
name type value------------------------------------ ----------- ------------------------------remote_login_passwordfile string exclusivesql> alter user sys identified by oracle;
user altered.
remote:
e:/oracle/ora92/bin>sqlplus /nologsql*plus: release 9.2.0.4.0 - production on 星期四 4月 15 09:47:11 2004copyright (c) 1982, 2002, oracle corporation. all rights reserved.sql> connect sys/[email protected] as sysdba已连接。sql> show useruser 为"sys"sql>
sql*plus: release 9.2.0.4.0 - production on 星期四 4月 15 09:50:14 2004
copyright (c) 1982, 2002, oracle corporation. all rights reserved.
sql> connect sys/[email protected] as sysdbaerror:ora-01031: insufficient privileges
sql>
这实际上就是无法通过口令文件验证身份
4.如果丢失了passwdfile
如果使用passwdfile却意外丢失,此时将不能启动数据库
sql> startup force;oracle instance started.
total system global area 131142648 bytesfixed size 451576 bytesvariable size 104857600 bytesdatabase buffers 25165824 bytesredo buffers 667648 bytesora-01990: error opening password file '/opt/oracle/product/9.2.0/dbs/orapw'ora-27037: unable to obtain file statuslinux error: 2: no such file or directoryadditional information: 3
sql*plus: release 9.2.0.3.0 - production on tue jul 6 09:40:34 2004
copyright (c) 1982, 2002, oracle corporation. all rights reserved.
connected to:oracle9i enterprise edition release 9.2.0.3.0 - productionwith the partitioning, olap and oracle data mining optionsjserver release 9.2.0.3.0 - production
total system global area 235999908 bytesfixed size 451236 bytesvariable size 201326592 bytesdatabase buffers 33554432 bytesredo buffers 667648 bytesora-01990: error opening password file '/opt/oracle/product/9.2.0/dbs/orapw'--这是最后查找的文件ora-27037: unable to obtain file statuslinux error: 2: no such file or directoryadditional information: 3
name type value------------------------------------ ----------- ------------------------------remote_login_passwordfile string sharedsql>
那么你可能会有这样的疑问,多个exclusive的数据库是否可以共享一个口令文件(orapw)呢?
我们继续这个实验:
sql> show parameter passwordname type value------------------------------------ ----------- ------------------------------remote_login_passwordfile string shared
[[email protected] oracle]$ orapwdusage: orapwd file=<fname> password=<password> entries=<users> wherefile - name of password file (mand),password - password for sys (mand),entries - maximum number of distinct dba and opers (opt), there are no spaces around the equal-to (=) character.