精华内容
下载资源
问答
  • ORA-12545

    2014-09-22 16:41:35
    ORA-12545 TNS:name lookup failure() Cause: A protocol specific ADDRESS parameter cannot be resolved.  Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorr

    官方描述:

    ORA-12545 TNS:name lookup failure()
    Cause: A protocol specific ADDRESS parameter cannot be resolved. 
    Action: Ensure the ADDRESS parameters have been entered correctly; the most likely incorrect value is the node name


    遇到的:

    1. 

    DB版本:11.2.0.1.0

    OS版本:WIN XP SP3


    处理过程:

    错误提示:ORA-12545:因目标主机或对象不存在,连接失败

    1.首先TNSPING orcl
       发现正常.(注意解析中的HOST=这项)
    2.到ORACLE_HOME目录的network/admin下打开tnsnames.ora文件,找到orcl这项.
       注意里面的HOST一项是否是数据库的IP地址或电脑名称(测试是否能PING通).
       这里修改为与TNSPING中一致的就正常了.


    tnsnames.ora文件示例:

    # tnsnames.ora Network Configuration File: F:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle configuration tools.
    
    <pre name="code" class="plain">ORCL =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.229)(PORT = 1521))
        )
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = orcl)
        )
      )
    

    
    
    展开全文
  • BLOG_【故障处理】Oracle_lhr_ORA-12545 Connect failed because target host or object does not existBLOG_【故障处理】Oracle_lhr_ORA-12545 Connect failed because target host or object does not exist
  • ORA-01017: invalid username/password; logon denied ORA-12545 Connect failed because target host or object does ...

    ORA-01017: invalid username/password; logon denied

    ORA-12545 Connect failed because target host or object does not exist

    最近遇到上面这两个问题,目前以上两个问题已解决,下面是具体解决方法

    ORA-01017解决方法

    这个错误主要是因为RAC各个实例的密码文件不同步,可以将某个节点上密码文件复制到其它节点然后将文件外修改后,就可以解决。

    ORA-12545解决方法

    这个错误是因为没有对各个实例的local_listener 这个参数值设置不对,导致出现这个错误。解决方法,是正确设置local_listener参数,下面是具体命令:

    SQL> alter system set LOCAL_LISTENER="(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))" scope=both sid='instance_name';

    下面提供一个事例:

    SQL>ALTER system set local_listener=" (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.45)(PORT=1521)) " scope=both sid=’racdb1’;

    SQL>ALTER system set local_listener=" (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.46)(PORT=1521)) " scope=both sid=’racdb2’;

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

    转载于:http://blog.itpub.net/526592/viewspace-687611/

    展开全文
  • 使用PLSQL客户端登录ORACLE时报ORA-12502和ORA-12545错误的解决方案

    使用PLSQL客户端登录ORACLE时报ORA-12502和ORA-12545错误的解决方案

    参考文章:

    (1)使用PLSQL客户端登录ORACLE时报ORA-12502和ORA-12545错误的解决方案

    (2)https://www.cnblogs.com/flyzz/p/9897736.html


    备忘一下。


    展开全文
  • 一、案例某dba反馈前几天刚安装好的rac,让一个小白碰过后,就变得不能用scan-ip访问了,报如下错误“ora-12545 Connect failed because target host or object does not exist”;但是用vip是可以访问的。二、问题为...

    一、案例

    某dba反馈前几天刚安装好的rac,让一个小白碰过后,就变得不能用scan-ip访问了,报如下错误“ora-12545 Connect failed because target host or object does not exist”;但是用vip是可以访问的。

    二、问题

    为什么使用scan-vip连接DB时会报“ora-12545 Connect failed because target host or object does not exist”,用VIP就不会?

    三、数据收集与分析

    3.1 网络检查

    根据经验,这时最有可能是网络问题,于是执行如下检查:

    • 客户端上执行telnet , tnsping都没有发现异常。
    • 服务器端上检查没有实施iptables ,selinux等网络限制。

    3.2 监听服务检查

    scan与local listener服务检查:

    su - grid
    grid> lsnrctl status
    ............服务正常
    grid> lsnrctl status LISTENER_SCAN1
    ............服务正常

    分析:监听服务正常。

    3.3 日志检查

    • 实例、集群日志没有发现异常。
    • scan的监听日志发现客户端已经与scan ip 建立连接。
    • local listener的日志没有发现连接失败与成功的记录。

    分析:根据oracle的原理,scan listener接到客户端连接请求后会转交local listener提供服务,但是从日志上看,local listener就没有收到scan listener的移交请求。

    3.4 案例收集

    根据错误号在support.oracle.com下搜查相关的案例,结果如下:[已过滤无效结果] Client Connection to RAC Intermittently Fails-ORA-12545 TNS: Host or Object Does not Exist (文档 ID 364855.1)

    CAUSE
    
    Whe LOCAL_LISTENER is not set at all or is not set correctly, PMON can register both the VIP hostname and the physical hostname with the REMOTE_LISTENER.  This is incorrect in RAC but if it does occur, the client can intermittently be routed to a listener endpoint on either of these addresses.  If the client is unable to resolve the physical hostname or even the vip hostname, the connection will fail with ORA-12545.
    
    Additionall, if the VIP hostname cannot be resolved, but the VIP numerical address is reachable; then this VIP numerical address should be used as the HOST value for LOCAL_LISTENER instead.
    
    And important first set is to check the output for :  lsnrctl services <listener_name>
    
    You should not see the physical hostname in the handler information for your RAC instances.   Here's an example of an incorrect lsnrctl services <listener_name> output for a 2-node RAC cluster:
    
    lsnrctl services oracle_rac_listener 
    Service "oracle.oracle.com" has 2 instance(s). 
    Instance "orcl1", status READY, has 2 handler(s) for this service... 
    Handler(s): 
    "DEDICATED" established:0 refused:0 state:ready 
    REMOTE SERVER 
    (ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost1)(PORT=1521)) 
    "DEDICATED" established:326 refused:0 state:ready 
    LOCAL SERVER 
    
    Instance "orcl2", status READY, has 1 handler(s) for this service... 
    Handler(s): 
    "DEDICATED" established:394371 refused:0 state:ready 
    REMOTE SERVER 
    (ADDRESS=(PROTOCOL=TCP)(HOST=myphysicalhost2)(PORT=1521))
     
    
    Here's an example of what it ought to look like when LOCAL_LISTENER is configured correctly:
    
    lsnrctl services oracle_rac_listener 
    Service "oracle.oracle.com" has 2 instance(s). 
    Instance "orcl1", status READY, has 2 handler(s) for this service... 
    Handler(s): 
    "DEDICATED" established:0 refused:0 state:ready 
    REMOTE SERVER 
    (ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host1)(PORT=1521)) 
    "DEDICATED" established:326 refused:0 state:ready 
    LOCAL SERVER 
    
    Instance "orcl2", status READY, has 1 handler(s) for this service... 
    Handler(s): 
    "DEDICATED" established:394371 refused:0 state:ready 
    REMOTE SERVER 
    (ADDRESS=(PROTOCOL=TCP)(HOST=myVIP_host2)(PORT=1521))
    
     
    
    SOLUTION
    
    Log in with privileges to the instance and issue the following commands so that LOCAL_LISTENER is set correctly:
    
     
    
    alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=<your_vip_node1>))" scope=both sid='INSTANCE_NAME1';
    
    Do the same for the 2nd instance where host is set to the <vip_host_node2> and the sid is set to the 2nd instance name.
    
    alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=<your_vip_node2>))" scope=both sid='INSTANCE_NAME2'; 
    
    
    
    Now the correct address using the VIP hostname will be registered against the listeners in the cluster.
    
    The client should be able to resolve all forms of the VIP host via their /etc/hosts file.  i.e. short name and fully qualified.
    
     
    
    In the case that a VIP hostname cannot be resolved by the client, the following syntax can be used with LOCAL_LISTENER to tell the client to connect using an IP address instead of the VIP hostname
    
    alter system set LOCAL_LISTENER="(address=(protocol=tcp)(port=1521)(host=1.2.3.4))"
    ... where "1.2.3.4" is the IP address of your VIP interface

    分析:大概的意思就是说local_listener没有设置或设置不正确,remote_listener就会把vip及主机名都注册为对接的借口,如果客户端不能解释主机名或 vip时就会报“ora-12545"错误。

    3.5 检查参数

    show parameter listener
    local_listener                       string      (DESCRIPTION=(ADDRESS_LIST=(AD
                                                     DRESS=(PROTOCOL=TCP)(HOST=rac1                                               -vip)(PORT=1521))))
    remote_listener                      string      rac-scan:1521

    分析:rac1-vip没有在DNS上解释,也没有添加在客户端的hosts上。

    3.6 修复

    修改local_listener以VIP连接:

    su - oracle
    sqlplus / as sysdba
    alter system set local_listener="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.1)(PORT=1521))))" scope=both sid='rac1';
    alter system set local_listener="(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.0.2)(PORT=1521))))" scope=both sid='rac2';
    
    su - grid
    srvctl stop listener
    srvctl stop scan_listener
    
    
    srvctl start listener
    srvctl start scan_listener
    
    lsnrctl status 
    lsnrctl status LISTENER_SCAN1

    重试,故障解决。

    四、结论

    • 估计小白是修改过loacl_listener这个参数,因为与其他库对比发现,默认就是使用vip地址的。
    • scan listener接收到请求后,验证通过后就会把请求移交给local_listener处理,这时客户端就会收到一个答复“请连接local_listener参数所指定值”,此时客户端就会连接host所指定的值,如解释不了,就会报错“ora-12545”
    • 3.6方法验证有效

    五、延伸阅读

    PRCR-1006 : Failed to add resource ora.lhrdg.db for lhrdg
    PRCR-1071 : Failed to register or update resource ora.lhrdg.db
    CRS-2566: User 'oracle' does not have sufficient permissions to operate on resource 'ora.LISTENER_LHRDG.lsnr', which is part of the dependency specification.
    DBCA_PROGRESS : 100%
     
    [ZFXDESKDB3:oracle]:/oracle>dbca -silent -createDatabase -templateName General_Purpose.dbc \
    > -gdbname LHRDG  -sid LHRDGZK \
    > -sysPassword lhr -systemPassword lhr \
    > -datafileDestination 'DATA/' -redoLogFileSize 50 -recoveryAreaDestination '/arch' \
    > -storageType ASM -asmsnmpPassword lhr  -diskGroupName 'DATA' -responseFile NO_VALUE \
    > -characterset ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -automaticMemoryManagement true \
    > -totalMemory 1024  -nodeinfo ZFXDESKDB3,ZFXDESKDB4
     
     
     
    Copying database files
    100% complete
    Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/LHRDG/LHRDG.log" for further details.
    [ZFXDESKDB3:oracle]:/oracle>
    [ZFXDESKDB3:oracle]:/oracle>
    [ZFXDESKDB3:oracle]:/oracle>
    [ZFXDESKDB3:oracle]:/oracle>more /oracle/app/oracle/cfgtoollogs/dbca/LHRDG/LHRDG.log"
    >
    >
    [ZFXDESKDB3:oracle]:/oracle>more /oracle/app/oracle/cfgtoollogs/dbca/LHRDG/LHRDG.log
    Copying database files
    PRCR-1006 : Failed to add resource ora.lhrdg.db for lhrdg
    PRCR-1071 : Failed to register or update resource ora.lhrdg.db
    CRS-2566: User 'oracle' does not have sufficient permissions to operate on resource 'ora.LISTENER_LHRDG.lsnr', which is part of the dependency specification.
    DBCA_PROGRESS : 100%
     
     
    [ZFXDESKDB3:oracle]:/oracle>oerr crs 2566
    2566, 1, "User '%s' does not have sufficient permissions to operate on resource '%s', which is part of the dependency specification."
    // *Cause: User does not have permissions to operate on the resource as it will prevent the current resource from starting or staying online in future.
    // *Action: The user performing the operation must have access
    // privileges to operate on the entire resource dependency tree. The
    // user must either be given those privileges by modifying the dependent
    // resources' access rights or another user having permissions should
    // perform this operation.
     
    《《《《---------------------简单点还是没有权限,且和 resource 'ora.LISTENER_LHRDG.lsnr'有关,这个资源是我创建dg的时候单独开的监听,且看看该资源的配置情况
     
    [ZFXDESKDB3:grid]:/home/grid>srvctl config listener -l LISTENER_LHRDG -a
    Name: LISTENER_LHRDG
    Network: 1, Owner: root《《《《----------很明显的错误,ownerroot
    Home: <CRS home>
      /oracle/app/11.2.0/grid on node(s) zfxdeskdb3,zfxdeskdb4
    End points: TCP:1523
     
     
    《《《《-----下边删除该资源重新添加
    [ZFXDESKDB3:grid]:/home/grid>srvctl remove listener -l LISTENER_LHRDG
    PRCR-1025 : Resource ora.LISTENER_LHRDG.lsnr is still running
    [ZFXDESKDB3:grid]:/home/grid>crsctl  stop resource ora.LISTENER_LHRDG.lsnr
    CRS-0245:  User doesn't have enough privilege to perform the operation
    CRS-4000: Command Stop failed, or completed with errors.
    [ZFXDESKDB3:grid]:/home/grid>exit
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>crsctl  stop resource ora.LISTENER_LHRDG.lsnr
    CRS-2673: Attempting to stop 'ora.LISTENER_LHRDG.lsnr' on 'zfxdeskdb4'
    CRS-2673: Attempting to stop 'ora.LISTENER_LHRDG.lsnr' on 'zfxdeskdb3'
    CRS-2677: Stop of 'ora.LISTENER_LHRDG.lsnr' on 'zfxdeskdb4' succeeded
    CRS-2677: Stop of 'ora.LISTENER_LHRDG.lsnr' on 'zfxdeskdb3' succeeded
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>srvctl remove listener -l LISTENER_LHRDG
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>
    [ZFXDESKDB3:root]:/>su - grid
    [ZFXDESKDB3:grid]:/home/grid>
    [ZFXDESKDB3:grid]:/home/grid>
    [ZFXDESKDB3:grid]:/home/grid>srvctl add listener -l LISTENER_LHRDG -p 1523 -o $ORACLE_HOME
    [ZFXDESKDB3:grid]:/home/grid>
    [ZFXDESKDB3:grid]:/home/grid>srvctl config listener -l LISTENER_LHRDG -a
    Name: LISTENER_LHRDG
    Network: 1, Owner: grid
    Home: <CRS home>
      /oracle/app/11.2.0/grid on node(s) zfxdeskdb3,zfxdeskdb4
    End points: TCP:1523
    展开全文
  • ORA-12545 导出dmp出错

    2021-04-09 15:17:35
    exp test/test@192.168.2.18:1521@orcl file=/opt/test.dmp --错误 ORA-12545: Connect failed because target host or object does not exist exp test/test@192.168.2.18:1521/orcl file=/opt/test.dmp -
  • 【故障处理】ORA-12545: Connect failed because target host or object does not exist 1BLO...
  • 遇到的问题ORA-12545 因目标主机或对象不存在的解决方法 因为数据库是rac集群,所以有两个节点,客户反应在1节点客户端登录不上数据库,经过排查,发现是监听文件配置问题
  • ora-12545 错误解决一例

    2019-03-28 09:42:08
    在win2000 上用sqlplus远程登陆一台alpha机器时抱错:ora-12545连接因对象主机或对象不存在而失败经检查ping和tnsping都没有其他.解决办法: 在 c:winntsystem32driversetc...
  • 11gR2 ORA-12545故障处理报错如下:ORA-12545:因目标主机或对象不存在,连接失败错误原因分析如下:由于RAC故障恢复过程中,直接使用sqlplu / as sysdba ,启动实例。未注册local_listener导致一步部分用户连接...
  • Navicat premium连接Oracle报ORA-12545错误

    千次阅读 2017-12-21 17:52:06
    1:ORA-12545 原因: 这里填localhost,127.0.0.1,或者远程ip。
  • ORA-12545: Connect failed because target host or object does not exist
  • ORA-12545: 因目标主机或对象不存在, 连接失败 C:\Users\Administrator>sqlplus system/manager@172.16.80.24/dbserver SQL*Plus: Release 10.2.0.1.0 - Production on 星期五 8月 14 23:57:53 2020 ...
  • pl/sql能连接上oracle Navicat Premium连接时报ORA-12545 试试用TNS连接 连接前提准备: 连接教程:https://blog.csdn.net/weixin_43564627/article/details/105438813
  • ORA-12545 / TNS-12545

    千次阅读 2011-01-04 02:14:00
    ORA-12545 / TNS-12545
  • 【故障处理】ORA-12545: Connect failed because target host or object does not exist 【故障处理】ORA-12545: Connect failed because target host or object does not exist 1 BLOG文档结构图 ....
  • 对数据库不太熟悉,今天连接数据库时出现了一个问题:ORA-12545 百度结果是:因目标主机或对象不存在 我的问题原因是: 数据库连接时,数据库名写错了,127.0.0.1:1521/orcl写成了127.0.0.1:1521:orcl 把":"改成"/"就...
  • 如果使用scan-ip远程连接出现“ORA-12545: 因目标主机或对象不存在, 连接失败”,则执行如下: alter system set local_listener='(ADDRESS=(PROTOCOL=TCP...
  • 最近集团部分oracle 11.2.0.1的RAC数据库在使用scanip作为tnsnames.ora配置后,总是会报出ORA-12545 or ORA-12537 的错误查metalink发现原来是oracle11.2.0.1...
  • 12C 通过SID 连接PDB 报ora-12545 通过在监听listener.ora加上配置:USE_SID_AS_SERVICE_listener name=ON 在重新配置TNS: 测试连接: 参考文档:文档 ID 1644355.1 ...
  • oracle 12c rac ora-12545错误解决

    千次阅读 2017-08-28 13:40:03
    client端连接数据库,使用scan ip,出现ora-12545错误 检查SQL> show parameter localNAME TYPE VALUE ------------------------------------ ----------- ------------------------------ l
  • ORA-12545: 因目标主机或对象不存在,登录失败 环境 本机 Oracle + PLSQL 现象 连接失败 原因 Oracle配置的主机名 和 当前电脑的主机名不一致 经常见到 HOST名字内容格式 主机名.net 估计是连网安装 引起的变动 方案...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,209
精华内容 483
关键字:

ora-12545