首页 > 数据库 >搭建rac dg备库连接数据库时报错ORA-12514

搭建rac dg备库连接数据库时报错ORA-12514

时间:2022-11-28 21:32:11浏览次数:53  
标签:... 备库 rac 12514 11.2 1521 ADDRESS PROTOCOL PORT

文档课题:搭建rac dg备库连接数据库时报错ORA-12514,如下所示:
[oracle@hisdb3 ~]$ sqlplus sys/oracle_4U@healdg as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Nov 27 12:01:15 2022

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

ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor


Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
[oracle@hisdb3 ~]$ tnsping healdg

TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 27-NOV-2022 12:17:13

Copyright (c) 1997, 2013, Oracle. All rights reserved.

Used parameter files:


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.220)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.221)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = healdg)))
OK (0 msec)

[oracle@hisdb3 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 27-NOV-2022 10:44:44

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 27-NOV-2022 10:44:11
Uptime 0 days 0 hr. 0 min. 32 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/hisdb3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.220)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.222)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "heal" has 1 instance(s).
Instance "healdg1", status UNKNOWN, has 1 handler(s) for this service...
Service "healdg" has 1 instance(s).
Instance "healdg1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
异常原因:
监听文件中GLOBAL_DBNAME应该是healdg,被写成heal.
[grid@hisdb3 admin]$ cat listener.ora
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.133.220)(PORT = 1521))
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = healdg)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)
(SID_NAME= healdg1)
)
)
说明:按如上将global_dbname从heal修改为,此后监听状态正常.
[oracle@hisdb3 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 27-NOV-2022 12:17:25

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 27-NOV-2022 12:16:36
Uptime 0 days 0 hr. 0 min. 48 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/hisdb3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.220)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.133.222)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "healdg" has 2 instance(s).
Instance "healdg1", status UNKNOWN, has 1 handler(s) for this service...
Instance "healdg1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
--同时正常连接
[oracle@hisdb3 ~]$ sqlplus sys/oracle_4U@healdg as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Nov 27 12:19:22 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

标签:...,备库,rac,12514,11.2,1521,ADDRESS,PROTOCOL,PORT
From: https://blog.51cto.com/u_12991611/5893721

相关文章

  • Oracle 数据库 alert 日志及 trace 日志的清理
    Oracle数据库alert日志及trace日志的清理 Oracle数据库alert日志及trace日志的清理方案一:暂停数据库的trace登录到数据库sqlplus/assysdba修改参数:SQL......
  • 完美方案:win7/win10下正确安装oracle 10g
    我打算安装Oracle10g作为开发数据库,但是由于Oracle10g太老了,兼容性问题严重,在windows10和windows7下安装均遇到困难。经过我两天的反复摸索和实验,终于找到完美方案。记......
  • oracle 链接 sqlserver 链接服务器
    1.下载驱动包base包:instantclient-basic-windows.x64-11.2.0.3.0.zipODBC包:instantclient-odbc-windows.x64-11.2.0.3.0.zip我下载的是11.2.0.3版本的,......
  • Linux安装tesseract教程
    前言因为之前做一个登陆获取Cookie来记录登陆状态的功能时。需要识别登陆时的验证码。原本是在本地测试,后来上线那么没办法也就需要在Linux环境下再安装一下Tesseract-OCR......
  • Oracle 分组统计,并显示百分比的实现
    需求:在分组统计的时候,显示每个分组所占的百分比效果图:实现代码:SELECTCOUNT(1)rs,100*round(COUNT(*)/SUM(COUNT(*))OVER(),4)||'%'FROMTB_USERtGROUPBYt.AREA......
  • Oracle中ALTER TABLE的五种用法(三)
    首发微信公众号:SQL数据库运维原文链接:https://mp.weixin.qq.com/s?__biz=MzI1NTQyNzg3MQ==&mid=2247485212&idx=1&sn=450e9e94fa709b5eeff0de371c62072b&chksm=ea37536cdd......
  • java.lang.Exception: DEBUG -- CLOSE BY CLIENT STACK TRACE 的理解
    [2013-12-0611:06:21,715][C3P0PooledConnectionPoolManager[identityToken->2tl0n98y1iwg7cbdzzq7a|719f1f]-HelperThread-#2]DEBUG-com.mchange.v2.c3p0.impl.NewPoo......
  • Oracle的sys_context函数
    概述sys_context函数是Oracle提供的一个获取环境上下文信息的预定义函数。该函数用来返回一个指定namespace下的parameter值。该函数可以在SQL和PL/SQL语言中使用。sys_cont......
  • Oracle 中的Userenv
    USEREVN()返回当前用户环境的信息,opt可以是:ENTRYID,SESSIONID,TERMINAL,ISDBA,LABLE,LANGUAGE,CLIENT_INFO,LANG,VSIZE1.ISDBA查看当前用户是否是DBA如果是则返回tru......
  • 了解Oracle RAC Brain Split Resolution集群脑裂协议
    CSS工作原理在理解脑裂(BrainSplit)处理过程前,有必要介绍一下OracleRACCss(ClusterSynchronizationServices)的工作框架:OracleRACCSS提供2种后台服务包括群组管理(G......