ORA-12545: 因目标主机或对象不存在,连接失败
上一篇 / 下一篇 2008-04-02 14:51:52 / 个人分类:Oracle DBA
http://www.itpub.net/283924.html
F:\>sqlplus system/manager@prod10g
SQL*Plus: Release 9.0.1.0.1 - Production on 星期五 10月 29 11:15:39 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
system@RACA> exit
从Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options中
断开
F:\>sqlplus system/manager@prod10g
SQL*Plus: Release 9.0.1.0.1 - Production on 星期五 10月 29 11:15:43 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
ERROR:
ORA-12545: 因目标主机或对象不存在,连接失败
在客户端设置跟踪
TRACE_TIMESTAMP_CLIENT = TRUE
TRACE_DIRECTORY_CLIENT = f:\trace\prod10g
TRACE_LEVEL_CLIENT = 16
trace_unique_client=true
在跟踪文件中发现如下信息
…………………………………….…………………………………….
[01-11月-2004 14:10:08] nsprecv: 00 38 00 00 05 00 00 00 |.8......|
[01-11月-2004 14:10:08] nsprecv: 00 2E 28 41 44 44 52 45 |..(ADDRE|
[01-11月-2004 14:10:08] nsprecv: 53 53 3D 28 50 52 4F 54 |SS=(PROT|
[01-11月-2004 14:10:08] nsprecv: 4F 43 4F 4C 3D 54 43 50 |OCOL=TCP|
[01-11月-2004 14:10:08] nsprecv: 29 28 48 4F 53 54 3D 52 |)(HOST=R|
[01-11月-2004 14:10:08] nsprecv: 41 43 42 29 28 50 4F 52 |ACB)(POR|
[01-11月-2004 14:10:08] nsprecv: 54 3D 31 35 32 31 29 29 |T=1521))|
[01-11月-2004 14:10:08] nsprecv: normal exit
[01-11月-2004 14:10:08] nscon: got NSPTRD packet
[01-11月-2004 14:10:08] nscon: got 46 bytes connect data
[01-11月-2004 14:10:08] nscon: exit (0)
[01-11月-2004 14:10:08] nsdo: nsctxrnk=0
[01-11月-2004 14:10:08] nsdo: normal exit
[01-11月-2004 14:10:08] nscall: redirected
[01-11月-2004 14:10:08] nsclose: entry
[01-11月-2004 14:10:08] nstimarmed: entry
[01-11月-2004 14:10:08] nstimarmed: no timer allocated
[01-11月-2004 14:10:08] nstimarmed: normal exit
………………………………………………………………………………………..
[01-11月-2004 14:10:08] nttgetport: exit
[01-11月-2004 14:10:08] nttbnd2addr: looking up IP addr for host: RACB
[01-11月-2004 14:10:30] nttbnd2addr: *** hostname lookup failure! ***
[01-11月-2004 14:10:30] nttbnd2addr: exit
…………………………………………………………………………………………
初看最后面的错误信息是因为不能解析RACA,但为何有时候可以连接而有时候不能呢?
原因是出在[01-11月-2004 14:10:08] nscall: redirected上面。
nscall: redirected的解析如下:
nscall: redirected
The client has been redirected to a differenct address.
The next step should be to call the new address. The address
should appear in an earlier data packet.
我们先看看客户端的tnsname的配置:
test10g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <raca ip>
(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = <racb ip>
(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <sid>
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
RACB把客户端的连接redirect到了RACA,而客户端不能解析RACA因而出错(网络环境没有配置DNS)。
在进一步的实验中发现客户端不能连接到RACA上,客户端配置如下:
prod1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <raca ip>
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = <sid>
)
)
出错信息:
SQL*Plus: Release 9.0.1.0.1 - Production on 星期一 11月 1 14:38:10 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
ERROR:
ORA-12545: 因目标主机或对象不存在,连接失败
通过设置跟踪发现如下信息:
…………………………………………………………………………………………
[01-11月-2004 14:42:48] nsdo: nsctxrnk=0
[01-11月-2004 14:42:48] nsdo: normal exit
[01-11月-2004 14:42:48] nscall: redirected
[01-11月-2004 14:42:48] nsclose: entry
[01-11月-2004 14:42:48] nstimarmed: entry
[01-11月-2004 14:42:48] nstimarmed: no timer allocated
[01-11月-2004 14:42:48] nstimarmed: normal exit
…………………………………………………………………………………………
[01-11月-2004 14:42:48] nttgetport: exit
[01-11月-2004 14:42:48] nttbnd2addr: looking up IP addr for host: RACB
[01-11月-2004 14:42:50] nttbnd2addr: *** hostname lookup failure! ***
[01-11月-2004 14:42:50] nttbnd2addr: exit
…………………………………………………………………………………………
由于RACA正在import数据,RACA自作聪明的把客户端的连接load balance到RACB上!
在import操作结束后,再次进行连接的时候就成功了:
SQL*Plus: Release 9.0.1.0.1 - Production on 星期一 11月 1 15:01:31 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
system@RACA>
Question:
为何在客户端没有配置负载均衡的情况下oracle仍然尝试redirect到其他node上呢?而且为何其他node不能连接的情况下不能redirect回原始节点呢?
又要啃文档了.
--
F:\>sqlplus system/manager@prod10g
SQL*Plus: Release 9.0.1.0.1 - Production on 星期五 10月 29 11:15:39 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
system@RACA> exit
从Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options中
断开
F:\>sqlplus system/manager@prod10g
SQL*Plus: Release 9.0.1.0.1 - Production on 星期五 10月 29 11:15:43 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
ERROR:
ORA-12545: 因目标主机或对象不存在,连接失败
在客户端设置跟踪
TRACE_TIMESTAMP_CLIENT = TRUE
TRACE_DIRECTORY_CLIENT = f:\trace\prod10g
TRACE_LEVEL_CLIENT = 16
trace_unique_client=true
在跟踪文件中发现如下信息
…………………………………….…………………………………….
[01-11月-2004 14:10:08] nsprecv: 00 38 00 00 05 00 00 00 |.8......|
[01-11月-2004 14:10:08] nsprecv: 00 2E 28 41 44 44 52 45 |..(ADDRE|
[01-11月-2004 14:10:08] nsprecv: 53 53 3D 28 50 52 4F 54 |SS=(PROT|
[01-11月-2004 14:10:08] nsprecv: 4F 43 4F 4C 3D 54 43 50 |OCOL=TCP|
[01-11月-2004 14:10:08] nsprecv: 29 28 48 4F 53 54 3D 52 |)(HOST=R|
[01-11月-2004 14:10:08] nsprecv: 41 43 42 29 28 50 4F 52 |ACB)(POR|
[01-11月-2004 14:10:08] nsprecv: 54 3D 31 35 32 31 29 29 |T=1521))|
[01-11月-2004 14:10:08] nsprecv: normal exit
[01-11月-2004 14:10:08] nscon: got NSPTRD packet
[01-11月-2004 14:10:08] nscon: got 46 bytes connect data
[01-11月-2004 14:10:08] nscon: exit (0)
[01-11月-2004 14:10:08] nsdo: nsctxrnk=0
[01-11月-2004 14:10:08] nsdo: normal exit
[01-11月-2004 14:10:08] nscall: redirected
[01-11月-2004 14:10:08] nsclose: entry
[01-11月-2004 14:10:08] nstimarmed: entry
[01-11月-2004 14:10:08] nstimarmed: no timer allocated
[01-11月-2004 14:10:08] nstimarmed: normal exit
………………………………………………………………………………………..
[01-11月-2004 14:10:08] nttgetport: exit
[01-11月-2004 14:10:08] nttbnd2addr: looking up IP addr for host: RACB
[01-11月-2004 14:10:30] nttbnd2addr: *** hostname lookup failure! ***
[01-11月-2004 14:10:30] nttbnd2addr: exit
…………………………………………………………………………………………
初看最后面的错误信息是因为不能解析RACA,但为何有时候可以连接而有时候不能呢?
原因是出在[01-11月-2004 14:10:08] nscall: redirected上面。
nscall: redirected的解析如下:
nscall: redirected
The client has been redirected to a differenct address.
The next step should be to call the new address. The address
should appear in an earlier data packet.
我们先看看客户端的tnsname的配置:
test10g =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <raca ip>
(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = <racb ip>
(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <sid>
(FAILOVER_MODE =
(TYPE = SELECT)
(METHOD = BASIC)
(RETRIES = 180)
(DELAY = 5)
)
)
)
RACB把客户端的连接redirect到了RACA,而客户端不能解析RACA因而出错(网络环境没有配置DNS)。
在进一步的实验中发现客户端不能连接到RACA上,客户端配置如下:
prod1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = <raca ip>
(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = <sid>
)
)
出错信息:
SQL*Plus: Release 9.0.1.0.1 - Production on 星期一 11月 1 14:38:10 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
ERROR:
ORA-12545: 因目标主机或对象不存在,连接失败
通过设置跟踪发现如下信息:
…………………………………………………………………………………………
[01-11月-2004 14:42:48] nsdo: nsctxrnk=0
[01-11月-2004 14:42:48] nsdo: normal exit
[01-11月-2004 14:42:48] nscall: redirected
[01-11月-2004 14:42:48] nsclose: entry
[01-11月-2004 14:42:48] nstimarmed: entry
[01-11月-2004 14:42:48] nstimarmed: no timer allocated
[01-11月-2004 14:42:48] nstimarmed: normal exit
…………………………………………………………………………………………
[01-11月-2004 14:42:48] nttgetport: exit
[01-11月-2004 14:42:48] nttbnd2addr: looking up IP addr for host: RACB
[01-11月-2004 14:42:50] nttbnd2addr: *** hostname lookup failure! ***
[01-11月-2004 14:42:50] nttbnd2addr: exit
…………………………………………………………………………………………
由于RACA正在import数据,RACA自作聪明的把客户端的连接load balance到RACB上!
在import操作结束后,再次进行连接的时候就成功了:
SQL*Plus: Release 9.0.1.0.1 - Production on 星期一 11月 1 15:01:31 2004
(c) Copyright 2001 Oracle Corporation. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
system@RACA>
Question:
为何在客户端没有配置负载均衡的情况下oracle仍然尝试redirect到其他node上呢?而且为何其他node不能连接的情况下不能redirect回原始节点呢?
又要啃文档了.
-- 补充
windows 在hosts 中添加。(目录: C:\WINDOWS\system32\drivers\etc)
编辑 host 文件 添加 对应的地址
另见:
http://space.itpub.net/471666/viewspace-254458
导入论坛 引用链接 收藏 分享给好友 推荐到圈子 管理 举报
TAG:
标题搜索
日历
|
|||||||||
| 日 | 一 | 二 | 三 | 四 | 五 | 六 | |||
| 1 | 2 | 3 | 4 | 5 | 6 | ||||
| 7 | 8 | 9 | 10 | 11 | 12 | 13 | |||
| 14 | 15 | 16 | 17 | 18 | 19 | 20 | |||
| 21 | 22 | 23 | 24 | 25 | 26 | 27 | |||
| 28 | 29 | 30 | |||||||
数据统计
- 访问量: 7130
- 日志数: 667
- 建立时间: 2007-12-21
- 更新时间: 2008-09-05


