Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

207

积分

1

好友

4

主题
1#
发表于 2011-10-31 17:28:37 | 查看: 8074| 回复: 8
双节点中环境,在win客户端,配置的连接串只能连接上其中一个
配置如下:
[root@fzwxdb1 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Kernel \r on an \m

[root@fzwxdb1 ~]# su - oracle
[oracle@fzwxdb1 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....Y1.inst application    ONLINE    ONLINE    fzwxdb2     
ora....Y2.inst application    ONLINE    ONLINE    fzwxdb1     
ora.WICITY.db  application    ONLINE    ONLINE    fzwxdb1     
ora....SM2.asm application    ONLINE    ONLINE    fzwxdb1     
ora....B1.lsnr application    ONLINE    ONLINE    fzwxdb1     
ora....db1.gsd application    ONLINE    ONLINE    fzwxdb1     
ora....db1.ons application    ONLINE    ONLINE    fzwxdb1     
ora....db1.vip application    ONLINE    ONLINE    fzwxdb1     
ora....SM1.asm application    ONLINE    ONLINE    fzwxdb2     
ora....B2.lsnr application    ONLINE    ONLINE    fzwxdb2     
ora....db2.gsd application    ONLINE    ONLINE    fzwxdb2     
ora....db2.ons application    ONLINE    ONLINE    fzwxdb2     
ora....db2.vip application    ONLINE    ONLINE    fzwxdb2     
[oracle@fzwxdb1 ~]$ lsnctl status
-bash: lsnctl: command not found
[oracle@fzwxdb1 ~]$ lsnrctl status

LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 31-OCT-2011 17:26:20

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER_FZWXDB1
Version                   TNSLSNR for Linux: Version 10.2.0.5.0 - Production
Start Date                01-AUG-2011 21:41:03
Uptime                    90 days 19 hr. 45 min. 16 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /ora/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File         /ora/app/oracle/product/10.2.0/db_1/network/log/listener_fzwxdb1.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.46.50.196)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.46.50.195)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM2", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM2", status BLOCKED, 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 "WICITY" has 2 instance(s).
  Instance "WICITY1", status READY, has 1 handler(s) for this service...
  Instance "WICITY2", status READY, has 2 handler(s) for this service...
Service "WICITYXDB" has 2 instance(s).
  Instance "WICITY1", status READY, has 1 handler(s) for this service...
  Instance "WICITY2", status READY, has 1 handler(s) for this service...
Service "WICITY_XPT" has 2 instance(s).
  Instance "WICITY1", status READY, has 1 handler(s) for this service...
  Instance "WICITY2", status READY, has 2 handler(s) for this service...
The command completed successfully
[oracle@fzwxdb1 ~]$

客户端配置:
TNSNAME.ORA:
t1 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.50.196)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = wicity)
    )
  )

t2 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 10.46.50.198)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = wicity)
    )
  )
SQLNET.ORA:

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
# NTS

SQLNET.AUTHENTICATION_SERVICES= (NONE)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

连接测试:
C:\Users\Administrator>sqlplus wicity@t1

SQL*Plus: Release 10.1.0.2.0 - Production on 星期一 10月 31 17:23:57 2011

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

Enter password:
ERROR:
ORA-12545: Connect failed because target host or object does not exist


Enter user-name: ^C
C:\Users\Administrator>sqlplus wicity@t2

SQL*Plus: Release 10.1.0.2.0 - Production on 星期一 10月 31 17:24:12 2011

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

Enter password:

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL>
2#
发表于 2011-10-31 18:21:34
  1. C:\Users\Administrator>sqlplus wicity@t1

  2. SQL*Plus: Release 10.1.0.2.0 - Production on 星期一 10月 31 17:23:57 2011
复制代码



Oracle Client 安装的是10.1.0.2.0 建议不要用这个版本,安装11.2.0.1 的 Client 或 Server软件

回复 只看该作者 道具 举报

3#
发表于 2011-10-31 18:23:20
这个~~我想知道原因哦,换客户端的代价不小啊

回复 只看该作者 道具 举报

4#
发表于 2011-10-31 18:31:03
  1. ping 10.46.50.196

  2. telnet 10.46.50.196 1521

  3. tnsping  10.46.50.196:1521/wicity
复制代码

回复 只看该作者 道具 举报

5#
发表于 2011-10-31 20:31:54
ORA-12545: Connect failed because target host or object does not exist
这个错误估计是rac环境中配置了服务器端的loadbalance,而在win客户端中没有进行主机名解析,在重定向过程中出现无法识别host的情况。

回复 只看该作者 道具 举报

6#
发表于 2011-10-31 20:32:28
可以设置trace,把错误时的trace上传看看

回复 只看该作者 道具 举报

7#
发表于 2011-11-1 10:18:29
原帖由 kevinlin.ora 于 2011-10-31 20:32 发表
可以设置trace,把错误时的trace上传看看

在跑应用,不敢动。

回复 只看该作者 道具 举报

8#
发表于 2011-11-1 10:24:59
刚刚又折腾了下,重启了196的listener之后就可以了,但是现在变成了198的无法连接了,怪异啊。

回复 只看该作者 道具 举报

9#
发表于 2011-11-1 11:51:28
使用 你自己电脑上的client 测试下  只需要做 client sql net trace 即可, 不需要动 server的

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-5-20 12:11 , Processed in 0.048864 second(s), 21 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569