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

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

104

积分

0

好友

4

主题
1#
发表于 2012-2-22 13:44:44 | 查看: 8682| 回复: 2
环境:
OS:OEL5.3 x86
DB :Oracle 10.2.0.4 RAC
DB  VERSION:
SQL> select * from gv$version;
   INST_ID BANNER
---------- ----------------------------------------------------------------
         1 Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
         1 PL/SQL Release 10.2.0.4.0 - Production
         1 CORE 10.2.0.4.0      Production
         1 TNS for Linux: Version 10.2.0.4.0 - Production
         1 NLSRTL Version 10.2.0.4.0 - Production
         2 Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
         2 PL/SQL Release 10.2.0.4.0 - Production
         2 CORE 10.2.0.4.0      Production
         2 TNS for Linux: Version 10.2.0.4.0 - Production
         2 NLSRTL Version 10.2.0.4.0 - Production


[oracle@rac2 bdump]$ more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       rac2    localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.7.90   rac1
192.168.7.91   rac2

10.10.10.1    rac1-priv
10.10.10.2    rac2-priv

192.168.7.92  rac1-vip
192.168.7.93  rac2-vip

节点一:
[oracle@rac1 admin]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.orcl.db    application    ONLINE    ONLINE    rac1        
ora....l1.inst application    ONLINE    ONLINE    rac2        
ora....l2.inst application    ONLINE    ONLINE    rac1        
ora....SM2.asm application    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    ONLINE    ONLINE    rac1        
ora.rac1.ons   application    ONLINE    ONLINE    rac1        
ora.rac1.vip   application    ONLINE    ONLINE    rac1        
ora....SM1.asm application    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    ONLINE    ONLINE    rac2        
ora.rac2.vip   application    ONLINE    ONLINE    rac2        
[oracle@rac1 admin]$

[oracle@rac1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 22-FEB-2012 17:36:58
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused
[oracle@rac1 admin]$

节点二:
[oracle@rac2 admin]$ crs_stat -t -v
Name           Type           R/RA   F/FT   Target    State     Host        
----------------------------------------------------------------------
ora.orcl.db    application    0/0    0/1    ONLINE    ONLINE    rac1        
ora....l1.inst application    0/5    0/0    ONLINE    ONLINE    rac2        
ora....l2.inst application    0/5    0/0    ONLINE    ONLINE    rac1        
ora....SM2.asm application    0/5    0/0    ONLINE    ONLINE    rac1        
ora....C1.lsnr application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.gsd   application    0/5    0/0    ONLINE    ONLINE    rac1        
ora.rac1.ons   application    0/3    0/0    ONLINE    ONLINE    rac1        
ora.rac1.vip   application    0/0    0/0    ONLINE    ONLINE    rac1        
ora....SM1.asm application    0/5    0/0    ONLINE    ONLINE    rac2        
ora....C2.lsnr application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.gsd   application    0/5    0/0    ONLINE    ONLINE    rac2        
ora.rac2.ons   application    0/3    0/0    ONLINE    ONLINE    rac2        
ora.rac2.vip   application    0/0    0/0    ONLINE    ONLINE    rac2        
[oracle@rac2 admin]$
[oracle@rac2 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.4.0 - Production on 22-FEB-2012 13:32:03
Copyright (c) 1991, 2007, Oracle.  All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 10.2.0.4.0 - Production
Start Date                22-FEB-2012 13:04:34
Uptime                    0 days 0 hr. 27 min. 28 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /opt/oracle/product/10.2.1/db_1/network/admin/listener.ora
Listener Log File         /opt/oracle/product/10.2.1/db_1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "+ASM_XPT" has 1 instance(s).
  Instance "+ASM1", status BLOCKED, has 1 handler(s) for this service...
Service "orcl" has 2 instance(s).
  Instance "orcl1", status READY, has 2 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 2 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 2 instance(s).
  Instance "orcl1", status READY, has 2 handler(s) for this service...
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac2 admin]$



[oracle@rac2 admin]$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:EF:00:BE  
          inet addr:192.168.7.91  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:feef:be/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:79243 errors:0 dropped:0 overruns:0 frame:0
          TX packets:61261 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:103291035 (98.5 MiB)  TX bytes:16370636 (15.6 MiB)
          Interrupt:51 Base address:0x2024
eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:EF:00:BE  
          inet addr:192.168.7.92  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:51 Base address:0x2024



[oracle@rac1 ~]$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:29:4B:32:89  
          inet addr:192.168.7.90  Bcast:192.168.7.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe4b:3289/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33555 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27039 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43180702 (41.1 MiB)  TX bytes:5928923 (5.6 MiB)
          Interrupt:51 Base address:0x2024
eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:4B:32:89  
          inet addr:192.168.7.93  Bcast:192.168.7.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:51 Base address:0x2024

各位,这个监听和tns有啥问题?。如果不正确,那该怎么配置两个节点的监听?
还有就是ASM的实例是BLOCKED的状态,但是sqlplus后是正常的。关于这个问题MOS上的ID 742817.1文章有说,但是我做了不凑效。

[ 本帖最后由 orafans 于 2012-2-22 17:32 编辑 ]

alert_orcl2.txt

444.41 KB, 下载次数: 1064

alert_orcl1.txt

13.89 KB, 下载次数: 1034

rac2_tnsnames.txt

2.25 KB, 下载次数: 977

rac1_tnsnames.txt

2.25 KB, 下载次数: 985

rac2_listener.txt

554 Bytes, 下载次数: 970

rac1_listener.txt

557 Bytes, 下载次数: 989

2#
发表于 2012-2-22 17:51:07
1.
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.7.93)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2)(PORT=1521)))

监听地址不太正常 , RAC一般监听在 public-ip 和  vip上


Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.163)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.164)(PORT=1521)))



2.

Document <
ASM Access From DBCA or OEM Fails With "IO Exception: The Network Adapter Could Not Establish a Connection" [ID 604155.1]>

Check to make certain that:

a) the listeners related to the RAC cluster are all up and running;

b) the listeners are listening on correct and valid VIP hostnames (make certain that the local HOSTS file does not specify that the VIP hostname is linked in any way to the localhost IP address of 127.0.0.1);

c) when 'lsnrctl services' is issued on each listener, that they show the +ASM instances in the services summary (the status of "Blocked" is normal);

d) at least one IPC address entry is included in the listener.ora file for all RAC listeners that may be used to access the ASM instances. The IPC key can be anything at all as it will only be used by DBCA access for ASM. If External Procedures will be run on the nodes, then this will be required anyway.



10g 中 lsnrctl service/status  显示+ASM实例 blocked 是正常现象。

回复 只看该作者 道具 举报

3#
发表于 2012-2-22 20:37:42
Thanks a lot Liu.
Issue addressed!

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-12-24 00:35 , Processed in 0.053849 second(s), 24 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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