签到成功

知道了

CNDBA社区CNDBA社区

Oracle 19c RMAN 连接PDB ORA-01017 错误解决方法

2021-02-17 16:46 291 0 原创 Oracle 19c
作者: Dave

在Oracle 19c中,RMAN 连接PDB时可能会出现ORA-01017的错误,如下:https://www.cndba.cn/dave/article/4402https://www.cndba.cn/dave/article/4402https://www.cndba.cn/dave/article/4402

[dave@www.cndba.cn admin]$ rman target '"dave/dave@dave as sysbackup"'

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Feb 17 16:33:29 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01017: invalid username/password; logon denied

该dave用户通过sqlplus 连接pdb 是正常的:

[dave@www.cndba.cn admin]$ sqlplus dave/dave@dave

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 17 16:33:17 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.

Last Successful login time: Fri Feb 05 2021 23:57:46 +08:00

Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0

SQL> exit
Disconnected from Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0
[dave@www.cndba.cn admin]$

这里实际上是缺少SYSBACKUP的权限。 RMAN备份在12cR1 之前备份用户需要授权SYSDBA, 没有较好的职责安全分享方案,在12C R1版本中引入了SYSBACKUP允许用户使用RMAN或SQLPLUS 备份恢复,但无权查看业务数据和其它越权操作。如备份登录方式是:

rman target '" / as sysbackup"'

这里使用sys用户给dave 用户增加sysbackup权限:

https://www.cndba.cn/dave/article/4402
https://www.cndba.cn/dave/article/4402

[dave@www.cndba.cn ~]$ sqlplus sys/dave@www.cndba.cn as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Wed Feb 17 16:34:51 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2020, Oracle.  All rights reserved.


Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.10.0.0.0

SQL> grant sysbackup to dave;

Grant succeeded.

SQL>

再次连接正常:注意这里连接的提示格式是CDB:PDB:CNDBA:DAVE (DBID=3516530670)

https://www.cndba.cn/dave/article/4402
https://www.cndba.cn/dave/article/4402

[dave@www.cndba.cn admin]$ rman target '"dave/dave@dave as sysbackup"'

Recovery Manager: Release 19.0.0.0.0 - Production on Wed Feb 17 16:35:07 2021
Version 19.10.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

connected to target database: CNDBA:DAVE (DBID=3516530670)

RMAN>

如果是从11g 升级到的12c+版本,那么还需要重建口令文件,增加FORMAT=12参数。
如:https://www.cndba.cn/dave/article/4402

orapwd FILE=filename ENTRIES=max_users FORMAT=12https://www.cndba.cn/dave/article/4402

具体说明参考:https://www.cndba.cn/dave/article/4402

12c: RMAN Remote Connection from Backup User Raises ORA-1017 (Doc ID 1997947.1)

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

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

Dave

关注

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

  • 1832
    原创
  • 2
    翻译
  • 417
    转载
  • 119
    评论
  • 访问:3164645次
  • 积分:2888
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by ZhiXinTech · 皖ICP备19020168号·

        QQ交流群