签到成功

知道了

CNDBA社区CNDBA社区

Oracle 11g Data Guard 环境 备库ORA-28000 错误解决方法

2022-02-16 18:09 1785 0 原创 Oracle 19c
作者: dave

Oracle 11.2.0.4 的Data Guard 环境,主库用户被锁,解锁后,备库用户还是锁定状态,无法登陆。 http://www.cndba.cn/dave/article/107735

在MOS上有几篇这个错误的描述。

http://www.cndba.cn/dave/article/107735
http://www.cndba.cn/dave/article/107735http://www.cndba.cn/dave/article/107735http://www.cndba.cn/dave/article/107735

该问题的2个方法如下:

1.主库解锁用户,手工切换归档,检查DG同步情况。
2.重启备库实例。http://www.cndba.cn/dave/article/107735http://www.cndba.cn/dave/article/107735http://www.cndba.cn/dave/article/107735

http://www.cndba.cn/dave/article/107735
http://www.cndba.cn/dave/article/107735

官方对该问题的描述:

Note 1600401.1: ORA-28000 "the account is locked" in the standby database, even after the account was unlocked in the primary

Noticed one user account was locked in primary and its Active Data Guard instances. It was fine Primary Database after unlocking the User, but at the Active Data Guard Standby Database, it was showing ORA-28000 that the account is still locked. Followed

Note 1600401.1: ORA-28000 "the account is locked" in the standby database, even after the account was unlocked in the primary

but it is still unlocked and user can not connect to standby database. Here is log:



SQL> select name,database_role , open_mode from v$database ;

NAME DATABASE_ROLE OPEN_MODE
--------- ---------------- --------------------
ELFVRFI1 PHYSICAL STANDBY READ ONLY

SQL> select username,account_status from dba_users where username = 'A472033';

USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
A472033 LOCKED(TIMED)


SQL> alter user A472033 account unlock ;
SQL> alter user A472033 account unlock
*
ERROR at line 1:
ORA-28015: Account unlocked, but the database is open for read-only access


CAUSE
This issue is detailed in 
Bug 16345308: LOGGING INTO ADG STANDBY GETS ORA-28000: THE ACCOUT IS LOCKED. AND IS NOT

It is not a bug, but a limitation of an Active Data Guard READ ONLY Database 



SOLUTION
Regardless of how the account becomes locked once locked it will stay locked in the Active Data Guard standby that is open read only.
You may have an account profile that sets how many times an incorrect password can be used before the account is locked.
In this case the standby instance needs to be restarted to reflect the correct status of the account again in the primary.

Or the profile may lock the account after it times out depending on the settings.
You can then unlock the account in the primary and the data dictionary is updated, but that which locks the account in memory is not.
So again you must restart the ADG standby.  This is not a bug it is a limitation of a read only standby database.

The issues with applications that have Identity in the database and applications that have Identity in the front end app. 
The later is not a problem for this issues.  With Identity in the database it can be.



Per this note  Bug 17732353 - ORA-28000 "the account is locked" attempting to log in as a remote SYSDBA user if SYS account is locked (Doc ID 17732353.8)

it is fixed in 12.1 and 12.2

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2264
    原创
  • 3
    翻译
  • 579
    转载
  • 192
    评论
  • 访问:8094249次
  • 积分:4356
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ