DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过

在用DBCA创建数据库的时候,遇到了不少问题,下来来分析一下解决的过程:

先是到59%,以及往后,都会报一些错误,如RPCR-1071,PRCR-1066,CRS-2566 等,点“ok”确认会自动跳过,直到完成。但是最后加载数据库资源的时候还是会报错,先是提示ora.asm11g.db资源不存在,用srvctl手动添加数据库资源到CRS时,又报无法添加数据库资源,以及CRS-2566:Oracle用户没有权限去创建ora.one资源
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
用Oracle用户添加不上数据库的资源,停止has提示权限不足
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
查看dbca的安装过程日志:
 
[oracle@zlm ~]$ tail -3000f /u01/app/oracle/cfgtoollogs/dbca/asm11g/trace.log|grep PRCR
[Thread-168] [ 2015-01-06 17:45:07.740 CST ] [HASIDBRegistrationStep.executeImpl:253]  Exception while registering with HAS PRCR-1006 : Failed to add resource ora.asm11g.db for asm11g
PRCR-1071 : Failed to register or update resource ora.asm11g.db
PRCR-1001 : Resource ora.asm11g.db does not exist
 
也都是报资源不存在,添加和注册数据库资源失败,用grid用户重启一下has
 
[grid@zlm bin]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zlm'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'zlm'
CRS-2677: Stop of 'ora.DATA.dg' on 'zlm' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'zlm'
CRS-2677: Stop of 'ora.asm' on 'zlm' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'zlm'
CRS-2677: Stop of 'ora.cssd' on 'zlm' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'zlm'
CRS-2677: Stop of 'ora.evmd' on 'zlm' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zlm' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[grid@zlm bin]$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[grid@zlm bin]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    zlm        
ora.asm        ora.asm.type   ONLINE    ONLINE    zlm        
ora.cssd       ora.cssd.type  ONLINE    ONLINE    zlm        
ora.diskmon    ora....on.type OFFLINE   OFFLINE              
ora.evmd       ora.evm.type   ONLINE    ONLINE    zlm        
ora.ons        ora.ons.type   OFFLINE   OFFLINE      
 
[oracle@zlm asm11g]$ srvctl add database -d asm11g -o $ORACLE_HOME--没有报错,资源添加上了
[oracle@zlm asm11g]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    zlm        
ora.asm        ora.asm.type   ONLINE    ONLINE    zlm        
ora.asm11g.db  ora....se.type OFFLINE   OFFLINE              
ora.cssd       ora.cssd.type  ONLINE    ONLINE    zlm        
ora.diskmon    ora....on.type OFFLINE   OFFLINE              
ora.evmd       ora.evm.type   ONLINE    ONLINE    zlm        
ora.ons        ora.ons.type   OFFLINE   OFFLINE              
[oracle@zlm asm11g]$ srvctl start database -d asm11g
PRCR-1079 : Failed to start resource ora.asm11g.db
ORA-12547: TNS:lost contact
CRS-5017: The resource action "ora.asm11g.db start" encountered the following error: 
ORA-12547: TNS:lost contact
. For details refer to "(:CLSN00107:)" in "/g01/app/11.2.0/grid/log/zlm/agent/ohasd/oraagent_grid/oraagent_grid.log".
 
CRS-2674: Start of 'ora.asm11g.db' on 'zlm' failed
ORA-12547: TNS:lost contact
[oracle@zlm asm11g]$ 
 
重启has后,资源依然没有自动主导到CRS,但是可以通过srvctl添加数据库资源到CRS了,不再报没有权限等错误,不知道是否是Oracle 11gR2的一个bug。DBCA前需要重启一下has,或者先DBCA装完,然后重启has再添加数据库资源,我使用的是后者的方法
 
虽然资源添加上了,但是要启动数据库实例这个资源,还是报错,现在是提示TNS丢失连接,既然是TNS的错,那么就先用Oracle用户创建一个tnsnames.ora,完了再用Grid把监听启动(使用GI时,通常是用grid用户创建监听的)
 
[grid@zlm bin]$ lsnrctl start
 
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 07-JAN-2015 00:19:36
 
Copyright (c) 1991, 2011, Oracle.  All rights reserved.
 
Starting /g01/app/11.2.0/grid/bin/tnslsnr: please wait...
 
TNSLSNR for Linux: Version 11.2.0.3.0 - Production
System parameter file is /g01/app/11.2.0/grid/network/admin/listener.ora
Log messages written to /g01/app/grid/diag/tnslsnr/zlm/listener/alert/log.xml
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zlm)(PORT=1521)))
TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use
 
Listener failed to start. See the error message(s) above...
 
启动监听依然是报错
 
根据Linux Error: 98可以判断,发生这种问题是由于端口被程序绑定而没有释放造成
可以使用netstat -lp命令查询当前处于连接的程序以及对应的进程信息
然后用ps pid 察看对应的进程,并使用kill pid 关闭该进程即可
 
[grid@zlm bin]$ cat /g01/app/11.2.0/grid/network/admin/listener.ora
# listener.ora Network Configuration File: /g01/app/11.2.0/grid/network/admin/listener.ora
# Generated by Oracle configuration tools.
 
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = asm11g)
      (ORACLE_HOME = /g01/app/11.2.0/grid)
      (SID_NAME = asm11g)
    )
  )
 
LISTENER =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = zlm)(PORT = 1521))
  )
 
ADR_BASE_LISTENER = /g01/app/grid
 
[grid@zlm bin]$ echo $ORACLE_SID
+ASM
[grid@zlm bin]$ netca
 
用grid创建监听,提示1521端口已经被占用了
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
DBCA创建数据库出现RPCR-1071,PRCR-1066,CRS-2566错误的解决过
 
[root@zlm ~]# netstat -nalp|grep 1521
tcp        0      0 0.0.0.0:1521                0.0.0.0:*                   LISTEN      27855/tnslsnr  
[root@zlm ~]# kill 27855
[root@zlm ~]# netstat -nalp|grep 1521
[root@zlm ~]#
 
直接启动也是报错:
 
[oracle@zlm asm11g]$ sqlplus / as sysdba
 
SQL*Plus: Release 11.2.0.3.0 Production on Wed Jan 7 00:53:52 2015
 
Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 
Connected to an idle instance.
 
SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/asm11g/spfileasm11g.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/asm11g/spfileasm11g.ora
ORA-12547: TNS:lost contact
 
 <txt>Started with pid=28061
 </txt>
</msg>
<msg time='2015-01-07T01:13:47.048+08:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='zlm'
 host_addr='180.168.41.175'>
 <txt>Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=zlm)(PORT=1521)))
 </txt>
</msg>
<msg time='2015-01-07T01:13:47.048+08:00' org_id='oracle' comp_id='tnslsnr'
 type='UNKNOWN' level='16' host_id='zlm'
 host_addr='180.168.41.175'>
 <txt>TNS-12542: TNS:address already in use
 TNS-12560: TNS:protocol adapter error
  TNS-00512: Address already in use
   Linux Error: 98: Address already in use
 </txt>
</msg>
[grid@zlm alert]$ vi /etc/hosts
[grid@zlm alert]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
180.168.41.175          zlm
 
一直报监听被占用的问题原来出在这里,这个主机名的IP地址是自动生成的,没有对其进行过改动,把IP改成正确的,重新启动监听

 

相关推荐