🍇Fix Password File Missing on Oracle
Cause : สาเหตุเนื่องมาจาก Password File ถูกลบไป ทำให้ไม่สามารถ Grant SYSDBA ให้ User ได้
SQL> grant sysdba to scott ;
ORA-01994: GRANT failed: password file missing or disabled
รวมถึงจะไม่สามารถทำการ Remote Login ด้วย User ที่มี Privilege DBA ได้เช่นเดียวกัน

Configuration
ทำการ Connect Database ด้วย SQL*Plus
sqlplus / as sysdba
Check User in Password File
select * from v$pwfile_users ;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
Create Password File
orapwd file=orapwORCL password=sys_password entries=3
Check User in Password File Again
select * from v$pwfile_users ;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
Grant SYSDBA to SCOTT
grant sysdba to scott ;
Check User in Password File Again
select * from v$pwfile_users ;
USERNAME SYSDB SYSOP SYSAS
------------------------------ ----- ----- -----
SYS TRUE TRUE FALSE
SCOTT TRUE FALSE FALSE
Show Parameter Password
show parameter password ;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
อ่านเพิ่มเติม : https://bit.ly/2XoFWMn
Last updated
Was this helpful?