duplicate报ORA-01017权限问题

 

环境:

OS:RedHat EnterPrise Linux 5.8 x64

Cluster:Oracle Grid 11.2.0.4

Database:Oracle Database EnterPrise 11.2.0.4

Archive:RAC+DG

         今天在配置DG的过程中,前期环境都已经准备好了,就差最后一步将RAC数据duplicate到standby端,可是蹊跷的事情就在这一步发生了,尝试几次都无法将数据duplicate过去,当然我尝试通过拷贝rman备份到对端也无法完毕恢复,死活就报ORA-01017错误,经过几个小时的努力,问题终于也算是得到了比較好的解决。例如以下:

 

故障现象

rmantarget sys/oracle@jetdb auxiliary sys/oracle@standby

RecoveryManager: Release 11.2.0.4.0 - Production on Mon May 26 16:14:36 2014

Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connectedto target database: JETDB (DBID=2170518470)
connectedto auxiliary database: JETDB (not mounted) RMAN>duplicate target database for standby from active database nofilenamecheck ; Startingrestore at 26-MAY-14
usingtarget database control file instead of recovery catalog
allocatedchannel: ORA_DISK_1
channelORA_DISK_1: SID=416 device type=DISK channelORA_DISK_1: restoring control file
RMAN-00571:===========================================================
RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-03002:failure of restore command at 05/26/2014 16:14:54
ORA-19870:error while restoring backup piece /DBBackup/Phycal/stdb_cntl_0fp98vq2_1_1.bkp
ORA-19504:failed to create file "+DATA001/jetdb/controlfile/control01.ctl"
ORA-17502:ksfdcre:3 Failed to create file +DATA001/jetdb/controlfile/control01.ctl
ORA-15001:diskgroup "DATA001" does not exist or is not mounted
ORA-15055:unable to connect to ASM instance
ORA-01017:invalid username/password; logon denied

问题分析:

1、  从上面告警日志来看,ORA-01017能够非常明显看出是因为权限问题导致。

随即,我们開始检查备库的password文件,$ORACLE_HOME/dbs/orapw{SID}是存在的。

[oracle@standby dbs]$ ll$ORACLE_HOME/dbs/orapw*
-rw-r----- 1 oracle oinstall 1536 May 2617:49 /DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwstandby

2、  这个时候我们应该查看的是数据库的alter告警文件:

Errorsin file/DBSoft/oracle/diag/rdbms/standby/standby/trace/standby_asmb_11087.trc  (incident=24130):
ORA-00600:internal error code, arguments: [OSDEP_INTERNAL], [], [], [], [], [], [], [],[], [], [], []
ORA-27302:failure occurred at: skfnbeqOpenI
Incidentdetails in:/DBSoft/oracle/diag/rdbms/standby/standby/incident/incdir_24130/standby_asmb_11087_i24130.trc
UseADRCI or Support Workbench to package the incident.
See Note411.1 at My Oracle Support for error and packaging details.
ORA-00210:cannot open the specified control file
ORA-00202:control file: '+DATA001/jetdb/controlfile/control01.ctl'
ORA-17503:ksfdopn:2 Failed to open file +DATA001/jetdb/controlfile/control01.ctl
ORA-15001:diskgroup "DATA001" does not exist or is not mounted
ORA-15055:unable to connect to ASM instance
ORA-15055:unable to connect to ASM instance
ORA-00600:internal error code, arguments: [OSDEP_INTERNAL], [], [], [], [], [], [], [],[], [], [], []
ORA-27302:failure occurred at: skfnbeqOpenI
ORA-1013signalled during: ALTER DATABASE MOUNT...
Mon May26 16:31:34 2014

从告警文件里我们能够非常明显的看出是ASM磁盘有问题。进入进入grid用户下用srvctl命令检查
asm状态:

[grid@standby~]$ srvctl status asm
ASM isrunning on standby SQL>select name,state,free_mb from v$asm_diskgroup; NAME STATE FREE_MB
--------------------- ----------
DATA001 MOUNTED 121112
ARC001 MOUNTED 122483
BAK001 MOUNTED 122826

结果看来ASM也是没有问题的,那么唯一的出问题的地方可能就是Oracle哪里配置的问题。

3、这个时候我们应该先看看会不会是权限的问题:

[root@standby ~]# id oracle
uid=501(oracle) gid=504(oinstall)groups=504(oinstall) ,505(dba)
[root@standby ~]# id grid
uid=500(grid) gid=504(oinstall) groups=504(oinstall),503(asmadmin),506(asmdba),507(asmoper)

到这里,我们发现问题可能出如今权限上。

oracle没有asmdba权限,随即加入上就可以。

[root@standby~]# usermod -G 503,506 oracle
[root@standby~]# id oracle
uid=501(oracle)gid=504(oinstall) groups=504(oinstall),503(asmadmin),505(dba),506(asmdba)

我们能够看到例如以下。再次运行duplicate。成功:

[oracle@standby~]$ rman target sys/oracle@jetdb auxiliary sys/oracle@standby

RecoveryManager: Release 11.2.0.4.0 - Production on Mon May 26 17:48:39 2014

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

connectedto target database: JETDB (DBID=2170518470)
connectedto auxiliary database: JETDB (not mounted) RMAN>duplicate target database for standby from active database nofilenamecheck; StartingDuplicate Db at 26-MAY-14
usingtarget database control file instead of recovery catalog
allocatedchannel: ORA_AUX_DISK_1
channelORA_AUX_DISK_1: SID=122 device type=DISK contentsof Memory Script:
{
backup as copy reuse
targetfile '/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwjetdb1' auxiliaryformat
'/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwstandby' ;
}
executingMemory Script Startingbackup at 26-MAY-14
allocatedchannel: ORA_DISK_1
channelORA_DISK_1: SID=14 instance=jetdb1 device type=DISK
Finishedbackup at 26-MAY-14 contentsof Memory Script:
{
backup as copy current controlfile forstandby auxiliary format '+DATA001/jetdb/controlfile/control01.ctl';
}
executingMemory Script Startingbackup at 26-MAY-14
usingchannel ORA_DISK_1
channelORA_DISK_1: starting datafile copy
copyingstandby control file
outputfile name=+BAK001/rman/snapcf_jetdb1.f tag=TAG20140526T174956 RECID=11STAMP=848598598
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finishedbackup at 26-MAY-14 contentsof Memory Script:
{
sql clone 'alter database mount standbydatabase';
}
executingMemory Script sqlstatement: alter database mount standby database
RMAN-05529:WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed todisk group only. contentsof Memory Script:
{
set newname for tempfile 1 to
"+data001";
switch clone tempfile all;
set newname for datafile 1 to
"+data001";
set newname for datafile 2 to
"+data001";
set newname for datafile 3 to
"+data001";
set newname for datafile 4 to
"+data001";
set newname for datafile 5 to
"+data001";
backup as copy reuse
datafile 1 auxiliary format
"+data001" datafile
2 auxiliary format
"+data001" datafile
3 auxiliary format
"+data001" datafile
4 auxiliary format
"+data001" datafile
5 auxiliary format
"+data001" ;
sql 'alter system archive log current';
}
executingMemory Script executingcommand: SET NEWNAME renamedtempfile 1 to +data001 in control file executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME Startingbackup at 26-MAY-14
usingchannel ORA_DISK_1
channelORA_DISK_1: starting datafile copy
inputdatafile file number=00001 name=+DATA001/jetdb/datafile/system.268.848240089
outputfile name=+DATA001/standby/datafile/system.257.848598605 tag=TAG20140526T175005
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:15
channelORA_DISK_1: starting datafile copy
inputdatafile file number=00002 name=+DATA001/jetdb/datafile/sysaux.260.848240091
outputfile name=+DATA001/standby/datafile/sysaux.258.848598619 tag=TAG20140526T175005
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
channelORA_DISK_1: starting datafile copy
inputdatafile file number=00003 name=+DATA001/jetdb/datafile/undotbs1.263.848240091
outputfile name=+DATA001/standby/datafile/undotbs1.259.848598627tag=TAG20140526T175005
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channelORA_DISK_1: starting datafile copy
inputdatafile file number=00005 name=+DATA001/jetdb/datafile/undotbs2.264.848240331
outputfile name=+DATA001/standby/datafile/undotbs2.260.848598627tag=TAG20140526T175005
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
channelORA_DISK_1: starting datafile copy
inputdatafile file number=00004 name=+DATA001/jetdb/datafile/users.267.848240091
outputfile name=+DATA001/standby/datafile/users.261.848598629 tag=TAG20140526T175005
channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:02
Finishedbackup at 26-MAY-14 sqlstatement: alter system archive log current contentsof Memory Script:
{
switch clone datafile all;
}
executingMemory Script datafile1 switched to datafile copy
inputdatafile copy RECID=11 STAMP=848598635 filename=+DATA001/standby/datafile/system.257.848598605
datafile2 switched to datafile copy
inputdatafile copy RECID=12 STAMP=848598635 file name=+DATA001/standby/datafile/sysaux.258.848598619
datafile3 switched to datafile copy
inputdatafile copy RECID=13 STAMP=848598635 filename=+DATA001/standby/datafile/undotbs1.259.848598627
datafile4 switched to datafile copy
inputdatafile copy RECID=14 STAMP=848598635 file name=+DATA001/standby/datafile/users.261.848598629
datafile5 switched to datafile copy
inputdatafile copy RECID=15 STAMP=848598635 filename=+DATA001/standby/datafile/undotbs2.260.848598627
FinishedDuplicate Db at 26-MAY-14

duplicate报ORA-01017权限问题的更多相关文章

  1. 新版本eclipse Neon 4.6.1,登录git报401 没有权限

    新版本eclipse Neon 4.6.1,登录git报401 没有权限 经过查找原因竟然是新的eclipse需要进行update.比较坑,新版eclipse竟然需要先更新一下才能用! eclipse ...

  2. plsql 连接oralce数据库,报ora 12557 tns 协议适配器不可加载错误

    使用plsql 连接oracle 数据库报ora 12557 错误: 解决方案: 1:首先确保服务中的service以及监听器都开启 2:F:\app\Administrator\product\11 ...

  3. npm报错没有权限

    在npm install经常会报错没有权限 这个时候需要清除一下缓存 npm cache clean --force

  4. 本地以sysdba 身份登录数据库实例时,报错ORA-01031 权限不足

    在linux 操作系统的数据库服务器上,使用"sqlplus / as sysdba" 登录Oracle 10.2 数据库实例时,登录失败,显示ORA-01031:  权限不足. ...

  5. PLSQL登录数据库 报ORA -12154的诡异问题

    https://q.cnblogs.com/q/89420/ 现象: 1.机器上先后安装了oracle两个版本的client.在装第一个client后,plsql可以顺利连接数据库a并登录. 2.安装 ...

  6. Rac grid用户启停监听报错无权限

    [grid@max1 ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-NOV-2016 00:20: ...

  7. 执行存储过程报错——ora-01031:权限不足

    1. 执行DDL报错 在oracle存储过程中,默认是可以直接执行DML和DQL的,但是执行CREATE这种的DDL则需要借助EXECUTE IMMEDIATE ···了,如下备份表语句 --抄表表备 ...

  8. Oracle执行存储过程报错——ora-01031:权限不足

    执行DDL报错 在oracle存储过程中,默认是可以直接执行DML和DQL的,但是执行CREATE这种的DDL则需要借助EXECUTE IMMEDIATE 如: create or replace p ...

  9. DG duplicate报错:RMAN-05001:auxiliary file name /u01/app/oracle/oradata/fratbs01.dbf conflicts with a file used by the target database

    问题:rman duplicate时报错: RMAN-05001:auxiliary file name /u01/app/oracle/oradata/fratbs01.dbf conflicts ...

随机推荐

  1. 5.3.5 namedtuple() 创建命名字段的元组结构

    在命名元组里.给每一个元组的位置加入一个名称,而且能够通过名称来訪问.大大地提高可读性,以便写出清晰代码,提高代码的维护性.事实上它就像C++里的结构体. collections.namedtuple ...

  2. 【LeetCode-面试算法经典-Java实现】【145-Binary Tree Postorder Traversal(二叉树非递归后序遍历)】

    [145-Binary Tree Postorder Traversal(二叉树非递归后序遍历)] [LeetCode-面试算法经典-Java实现][全部题目文件夹索引] 原题 Given a bin ...

  3. HDU 5228 ZCC loves straight flush( BestCoder Round #41)

    题目链接:pid=5228">ZCC loves straight flush pid=5228">题面: pid=5228"> ZCC loves s ...

  4. adt-bundle-windows加入NDK支持

    近期换了个硬盘,曾经都是用eclipse安装adt插件的,如今老了,图省事就下载了adt-bundle-windows,解压缩出来就直接用.但是这个adt-bundle没有集成NDK支持,于是手动安装 ...

  5. JAVA设计模式之【命令模式】

    命令模式 为了降低耦合度,将请求的发送者和接收者解耦 发送请求的对象只需要哦知道如何发送请求,而不必知道如何完成请求 对请求排队 记录请求日志 支持撤销操作 核心在于引入命令类 角色 抽象命令类Com ...

  6. ES API 备忘

    本文所列的所有API在ElasticSearch文档是有详尽的说明,但它的结构组织的不太好. 这篇文章把ElasticSearch API用表格的形式供大家参考. https://www.iteblo ...

  7. [JZOJ 5465] [NOIP2017提高A组冲刺11.9] 道路重建 解题报告 (e-dcc+树的直径)

    题目链接: http://172.16.0.132/senior/#main/show/5465 题目: 小X所居住的X国共有n个城市,有m条无向道路将其连接.作为一个统一的国家,X 城的任意两个城市 ...

  8. POJ 1990 线段树

    题意: 思路: 线段树 (一棵就够啦 不像树状数组,还得用两棵) 先对v从小到大排序.每回插入的时候当前的v是最大的,只需要统计它到各个坐标的距离就好了. 里面存两个东西: 这个坐标左边的坐标个数和这 ...

  9. PHP正则表达式函数总结

    /* 测试环境:PHP5.3.29(PCRE8.32) */ 常用函数:(正则表达式规则基本同JS_RE_Read.txt) PS:1.PHP中的PCRE一般仅使用这三个修饰符:"i&quo ...

  10. 中文版 Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks

    Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks 摘要 最先进的目标检测网络依靠区域提出算法 ...