1. ORA-12505
完整报错:
Listener refused the connection with the following error: ORA-12505,
TNS:listener does not currently know of SID given in connect descriptor
报错原因: 连接数据库时, 服务名/SID填写错误! 解决方法: 查询自己的真实SID, 修改连接时的SID定义, 重新连接即可 !
2. ORA-28001
完整报错:
[99999][28001] ORA-28001: the password has expired.
报错原因: 密码长时间未修改, 超过密码更新过期策略设置的过期时间 解决方法: 方法一: 使用sysdba 修改密码 方法二: 将密码过期策略中的过期时间设置为永不过期
- 查看当前的过期时长 :180天
select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';

- 修改过期策略
alter profile default limit password_life_time unlimited;
- 再次查看过期时长, 现在为永不失效
select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
 4. 重新为用户设置密码, 如scott用户
alter user scott identified by tiger
持续更新中…! 欢迎大家留言一起讨论学习!
|