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

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

104

积分

0

好友

4

主题
1#
发表于 2012-2-17 09:43:19 | 查看: 7008| 回复: 2
环境:
os:OEL 5.3 32bit

[oracle@rac2 admin]$ uname -a
Linux rac2 2.6.18-128.el5PAE #1 SMP Wed Jan 21 08:28:30 EST 2009 i686 i686 i386 GNU/Linux
[oracle@rac2 admin]$ cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.3 (Carthage)
Kernel \r on an \m

db:Oracle 10.2.0.1 32bit for linux

SQL> select * from v$version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE    10.2.0.1.0      Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production


vm:vmware-workstation 7.0

storage:openfiler iscsi

存储配置:
[oracle@rac1 admin]$ ls -l /dev/raw
total 0
crw-r----- 1 oracle oinstall 162, 1 Feb 17 09:24 raw1
crw-r----- 1 oracle oinstall 162, 2 Feb 17 09:24 raw2
crw-r----- 1 oracle oinstall 162, 3 Feb 17 06:44 raw3
crw-r----- 1 oracle oinstall 162, 4 Feb 17 09:24 raw4

[oracle@rac2 admin]$ /etc/init.d/oracleasm listdisks
VOL1
VOL2

[oracle@rac2 admin]$ srvctl start listener -n rac1

[oracle@rac2 admin]$ srvctl start listener -n rac2

[oracle@rac2 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    OFFLINE
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    OFFLINE
ora....C1.lsnr application    OFFLINE   OFFLINE
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@rac2 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-FEB-2012 09:27:03
Copyright (c) 1991, 2005, 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.1.0 - Production
Start Date                17-FEB-2012 09:18:49
Uptime                    0 days 0 hr. 8 min. 14 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 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
  Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@rac1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-FEB-2012 09:27:35
Copyright (c) 1991, 2005, 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.1.0 - Production
Start Date                17-FEB-2012 09:19:06
Uptime                    0 days 0 hr. 8 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=rac1)(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 "orcl" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
  Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@rac1 admin]$


[oracle@rac1 admin]$ crs_stop -all
Attempting to stop `ora.rac1.gsd` on member `rac1`
Attempting to stop `ora.rac1.ons` on member `rac1`
Stop of `ora.rac1.gsd` on member `rac1` succeeded.
Attempting to stop `ora.rac2.gsd` on member `rac2`
Stop of `ora.rac1.ons` on member `rac1` succeeded.
Attempting to stop `ora.rac2.ons` on member `rac2`
Stop of `ora.rac2.gsd` on member `rac2` succeeded.
Attempting to stop `ora.orcl.db` on member `rac1`
Stop of `ora.rac2.ons` on member `rac2` succeeded.
Stop of `ora.orcl.db` on member `rac1` succeeded.
Attempting to stop `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1`
Attempting to stop `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2`
Stop of `ora.rac1.LISTENER_RAC1.lsnr` on member `rac1` succeeded.
`ora.orcl.orcl2.inst` is already OFFLINE.
Attempting to stop `ora.rac1.ASM2.asm` on member `rac1`
Stop of `ora.rac2.LISTENER_RAC2.lsnr` on member `rac2` succeeded.
`ora.orcl.orcl1.inst` is already OFFLINE.
Attempting to stop `ora.rac2.ASM1.asm` on member `rac2`
Stop of `ora.rac1.ASM2.asm` on member `rac1` succeeded.
Target set to OFFLINE for `ora.rac1.LISTENER1_RAC1.lsnr`
Attempting to stop `ora.rac1.vip` on member `rac1`
Stop of `ora.rac1.vip` on member `rac1` succeeded.
Stop of `ora.rac2.ASM1.asm` on member `rac2` succeeded.
Target set to OFFLINE for `ora.rac2.LISTENER_RAC1.lsnr`
Target set to OFFLINE for `ora.rac2.LISTENER1_RAC2.lsnr`
Attempting to stop `ora.rac2.vip` on member `rac2`
Stop of `ora.rac2.vip` on member `rac2` succeeded.
CRS-0216: Could not stop resource 'ora.orcl.orcl1.inst'.

[oracle@rac1 admin]$ crs_start -all

CRS-0223: Resource 'ora.rac1.LISTENER_RAC1.lsnr' has placement error.
CRS-0223: Resource 'ora.rac1.ons' has placement error.
CRS-0215: Could not start resource 'ora.rac2.LISTENER1_RAC2.lsnr'.
CRS-0223: Resource 'ora.rac2.LISTENER_RAC1.lsnr' has placement error.
CRS-0223: Resource 'ora.rac2.LISTENER_RAC2.lsnr' has placement error.
CRS-0223: Resource 'ora.rac2.ons' has placement error.

start后:
oracle@rac2 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    OFFLINE
ora....C1.lsnr application    ONLINE    OFFLINE
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    OFFLINE
ora....C1.lsnr application    OFFLINE   OFFLINE
ora....C2.lsnr application    ONLINE    OFFLINE
ora.rac2.gsd   application    ONLINE    ONLINE    rac2
ora.rac2.ons   application    ONLINE    ONLINE    rac2
ora.rac2.vip   application    ONLINE    ONLINE    rac2

监听conf:
[oracle@rac2 admin]$ more listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/10.2.1/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER_RAC2 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = rac1-vip)(PORT = 1521)(IP = FIRST))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.7.90)(PORT = 1521)(IP = FIRST))
    )
  )
SID_LIST_LISTENER_RAC2 =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /opt/oracle/product/10.2.1/db_1)
      (PROGRAM = extproc)
    )
  )



1.监听有两个是多余的,这两个多余的监听在srvctl命令行里面能删除吗?
ora....C2.lsnr application    ONLINE    OFFLINE
ora....C1.lsnr application    OFFLINE   OFFLINE

2.在做了crs_start -all后,监听不能启动,需要手动执行srvctl start listener -n rac1和srvctl start listener -n rac2才能把相关的监听拉起来有没有办法在执行crs_start -all就能拉起监听?
3.以上的监听和TNS配置有没有问题?
4.这几个错误能不能规消除:
CRS-0223: Resource 'ora.rac1.LISTENER_RAC1.lsnr' has placement error.
CRS-0223: Resource 'ora.rac1.ons' has placement error.
CRS-0215: Could not start resource 'ora.rac2.LISTENER1_RAC2.lsnr'.
CRS-0223: Resource 'ora.rac2.LISTENER_RAC1.lsnr' has placement error.
CRS-0223: Resource 'ora.rac2.LISTENER_RAC2.lsnr' has placement error.
CRS-0223: Resource 'ora.rac2.ons' has placement error.

谢谢各位解答,不知道所提供的信息够不够。

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

tnsnames.txt

1.98 KB, 下载次数: 1291

messages.txt

411.99 KB, 下载次数: 805

alert_orcl1.txt

3.26 KB, 下载次数: 1333

alert_orcl2.txt

30.87 KB, 下载次数: 1359

2#
发表于 2012-2-17 10:58:53
action plan:

运行以下命令 , 注意你可能没有 安装 较新的cluvfy ,去OTN下载一个

runcluvfy.sh stage -post crsinst -n all  -verbose

用diagcollection.pl 收集 log

目前上传的这些日志 意义都不大。

回复 只看该作者 道具 举报

3#
发表于 2012-2-17 10:59:41
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 17-FEB-2012 09:27:03

PS:
10.2.0.1 的RAC 是很不稳定的, 一些CRS resource 无法启动或 状态不正常 属于 常见现象, 建议至少升级到10.2.0.5

回复 只看该作者 道具 举报

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

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

GMT+8, 2024-11-15 02:12 , Processed in 0.051791 second(s), 24 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

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