SQL>
這實際上就是無法通過口令文件驗證身份
4.假如丟失了passwdfile
假如你使用passwdfile后卻意外丟失,那么此時將不能啟動數(shù)據(jù)庫。
SQL> startup force;
ORACLE instance started.
Total System Global Area 131142648 bytes
Fixed Size 451576 bytes
Variable Size 104857600 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
ORA-01990: error opening password file '/opt/oracle/product/9.2.0/dbs/orapw'
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
我們可以通過orapwd重建口令文件來解決此問題
此處我們恢復(fù)口令文件就可以了
SQL> !
[oracle@jumper oracle]$ mv $ORACLE_HOME/dbs/orapwhsjf.bak orapwhsjf
[oracle@jumper oracle]$ exit
exit
SQL> alter database open;
Database altered.
SQL>
5. remote_login_passwordfile = shared
Oracle9i文檔說明:
SHARED
More than one database can use a password file. However, the only user recognized by the password file is SYS.
--多個數(shù)據(jù)庫可以共享一個口令文件,但是只可以識別一個用戶:SYS
SQL> select * from v$pwfile_users;
USERNAME SYSDB SYSOP
------------------------------ ----- -----
SYS TRUE TRUE
SQL> grant sysdba to eygle;
grant sysdba to eygle
*
ERROR at line 1:
ORA-01994: GRANT failed: cannot add users to public password file
SQL> show parameter password
NAME TYPE VALUE
---------------------- ----------- ----------------------------
remote_login_passwordfile string SHARED
大家可以發(fā)現(xiàn),此時的口令文件中是不能添加用戶的。很多人可能會問:口令文件的缺省名稱是orapw,如何才能共享?
其實Oracle數(shù)據(jù)庫在啟動時,首先查找的是orapw的口令文件,假如該文件不存在,則開始查找,orapw的口令文件。如果口令文件命名為orapw,多個數(shù)據(jù)庫就可以共享。
再來看一下測試:
[oracle@jumper dbs]$ sqlplus "/ as sysdba"
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 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !
[oracle@jumper dbs]$ ls
hsjf initdw.ora inithsjf.ora init.ora lkHSJF orapwhsjf spfilehsjf.ora
[oracle@jumper dbs]$ mv orapwhsjf orapwhsjf.bak
[oracle@jumper dbs]$ exit
exit
SQL> startup
ORACLE instance started.
Total System Global Area 235999908 bytes
Fixed Size 451236 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
ORA-01990: error opening password file '/opt/oracle/product/9.2.0/dbs/orapw'
--它是最后查找的文件
ORA-27037: unable to obtain file status
Linux Error: 2: No such file or directory
Additional information: 3
建立orapw口令文件,此時可以打開數(shù)據(jù)庫。
SQL> !
[oracle@jumper dbs]$ ls
hsjf initdw.ora inithsjf.ora init.ora lkHSJF orapwhsjf.bak spfilehsjf.ora
本新聞共
3頁,當(dāng)前在第
2頁
1 2 3