OPW-00001: 无法打开口令文件
cmd.exe 使用管理员身份登录
找到xxx\product\11.2.0\dbhome_1\database\PWDorcl.ora文件,删除
执行orapwd file=D:\app\product\11.2.0\dbhome_1\database\PWDorcl.ora password=tiger
(orapwd 在\product\11.2.0\dbhome_1\BIN目录下)
登录system,报错
ORA-28000: the account is locked
详细更改命令如下:
C:\WINDOWS\system32>orapwd file=D:\app\product\11.2.0\dbhome_1\database\PWDorcl.ora password=tiger entries=40 force=y
C:\WINDOWS\system32>sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 22 19:45:24 2023
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL> conn sys/tiger as sysdba
Connected.
SQL> grant connect to sys identified by tiger;
Grant succeeded.
SQL> alter user SYSTEM account unlock;
User altered.
SQL> grant connect to system identified by tiger;
Grant succeeded.
SQL>alter user scott identified by tiger;
User altered.
参考:
关于Oracle使用管理员账号登录失败的问题
https://www.cnblogs.com/lcword/p/15992907.html