ITPub博客

首页 > 数据库 > Oracle > srvctl无法启动实例,sqlplus可正常启动

srvctl无法启动实例,sqlplus可正常启动

原创 Oracle 作者:骑驴射大飞机 时间:2020-11-24 16:02:07 0 删除 编辑

####srvctl无法启动实例,sqlplus可正常启动


[oracle@erpdb2 ~]$ srvctl start instance -d PROD -i PROD2

PRCR-1013 : Failed to start resource ora.prod.db

PRCR-1064 : Failed to start resource ora.prod.db on node erpdb2

CRS-5017: The resource action "ora.prod.db start" encountered the following error:

ORA-00119: invalid specification for system parameter REMOTE_LISTENER

ORA-00132: syntax error or unresolved network name 'PROD_REMOTE'

. For details refer to "(:CLSN00107:)" in "/orahome/app/11.2.0/grid/log/erpdb2/agent/crsd/oraagent_oracle/oraagent_oracle.log".


CRS-2674: Start of 'ora.prod.db' on 'erpdb2' failed



今天客户的一套11g rac 一个节点关闭,客户通过srvctl启动报错,后来发现使用sqlplus可以正常启动。

远程连接上以后,发现环境稍微有些复杂,就一套库,有两个监听器:一个默认的LISTENER(1521),一个oracle用户创建的PROD(1601);

oracle用户监听文件路径是重新设置的$TNS_ADMIN下。

集群服务中可发现PROD监听服务的target是offline。

报错比较明显,实例参数REMOTE_LISTENER配置的值是PROD_REMOTE,PROD_REMOTE是oracle用户下tnsname.ora文件(该文件的路径并不在常规路径下,而是在$TNS_ADMIN下)中的连接串名字:

PROD_REMOTE=

        (DESCRIPTION=

            (ADDRESS_LIST=

                (ADDRESS=(PROTOCOL=tcp)(HOST=erpdb1-vip.megmeet.com)(PORT=1609))

                (ADDRESS=(PROTOCOL=tcp)(HOST=erpdb2-vip.megmeet.com)(PORT=1609))

            )

        )


关于默认监听LISTENER的配置都是常规配置。

这个问题在官方文档【Doc ID 1581021.1】和【Doc ID 1318026.1】都有详解介绍。

大体意思就是你这个PROD监听器是oracle用户创建的,srvctl有意  =.=!


官方给出了相关解决方案,比较复杂,由于是客户的生成环境,没有操作。


官方文档【Doc ID 1581021.1】

SOLUTION :


Create the IFILE or symbolic link for common path of these files under ORACLE_HOME/network/admin folder and set TNS_ADMIN exclusively in OCR for shared oracle homes with below commands:     


On each node add the AutoConfig listener.ora as an ifile in the $ORACLE_HOME/network/admin/listener.ora

On each node add the AutoConfig tnsnames.ora as an ifile in the $ORACLE_HOME/network/admin/tnsnames.ora

On each node add the AutoConfig sqlnet.ora as an ifile in the $ORACLE_HOME/network/admin/sqlnet.ora

    

-- Add TNS_ADMIN environment variable to the database resource:


srvctl setenv database -d <database_name> -T TNS_ADMIN= $ORACLE_HOME/network/admin

-- Verify TNS_ADMIN is set correctly:


srvctl getenv database -d <dbname>

 Now start the database instances using srvctl.


 


Also see 'Section 3.7.4 Update SRVCTL for New listener.ora' in Doc ID:


Using Oracle 11g Release 2 Real Application Clusters with Oracle E-Business Suite Release 12 (Doc ID 823587.1)



官方文档【Doc ID 1318026.1】:

CAUSE:


NAMES.DIRECTORY_PATH in sqlnet.ora does not have EZCONNECT


If sqlplus and srvctl have different TNS_ADMIN, the issue may look like sqlplus can start database but srvctl not or vice verse



SOLUTION:


To fix the issue, make sure EZCONNECT is included in NAEMS.DIRCTORY_PATH in sqlnet.ora, for example:


NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)


If NAMES.DIRECTORY_PATH is not presented, the default value is:

      NAMES.DIRECTORY_PATH=(tnsnames, ldap, ezconnect)


The default setting is sufficient for most environment.


Scalability RAC Community


To discuss this topic further with Oracle experts and industry peers, we encourage you to review, join or start a discussion in the My Oracle Support Scalability RAC Community.




来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69900971/viewspace-2736480/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: ORA-12516或ORA-12519
下一篇: Linux切换用户卡
请登录后发表评论 登录
全部评论

注册时间:2018-12-03

  • 博文量
    11
  • 访问量
    9505