时间:2021-07-01 10:21:17 帮助过:38人阅读
Oracle 11gR2 RAC 添加节点最佳实践可参见:http://www.linuxidc.com/Linux/2012-08/69270.htmOS信息:[grid@11grac1 ~]$ uname -
Oracle 11gR2 RAC 添加节点最佳实践可参见:
OS信息:
[grid@11grac1 ~]$ uname -a
Linux 11grac1 2.6.32-300.10.1.el5uek #1 SMP Wed Feb 22 17:22:40 EST 2012 i686 i686 i386 GNU/Linux
DB信息:
SQL> select * from v$version where rownum
BANNER
------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
查看当前资源状态
[grid@11grac1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE 11grac1
ora....C1.lsnr application ONLINE ONLINE 11grac1
ora....ac1.gsd application ONLINE ONLINE 11grac1
ora....ac1.ons application ONLINE ONLINE 11grac1
ora....ac1.vip ora....t1.type ONLINE ONLINE 11grac1
ora....SM2.asm application ONLINE ONLINE 11grac2
ora....C2.lsnr application ONLINE ONLINE 11grac2
ora....ac2.gsd application ONLINE ONLINE 11grac2
ora....ac2.ons application ONLINE ONLINE 11grac2
ora....ac2.vip ora....t1.type ONLINE ONLINE 11grac2
ora.DATA.dg ora....up.type ONLINE ONLINE 11grac1
ora....ER.lsnr ora....er.type ONLINE ONLINE 11grac1
ora....N1.lsnr ora....er.type ONLINE ONLINE 11grac1
ora.asm ora.asm.type ONLINE ONLINE 11grac1
ora.eons ora.eons.type ONLINE ONLINE 11grac1
ora.gsd ora.gsd.type ONLINE ONLINE 11grac1
ora....network ora....rk.type ONLINE ONLINE 11grac1
ora.oc4j ora.oc4j.type ONLINE ONLINE 11grac1
ora.ons ora.ons.type ONLINE ONLINE 11grac1
ora.racdb.db ora....se.type ONLINE ONLINE 11grac1
ora.scan1.vip ora....ip.type ONLINE ONLINE 11grac1
[grid@11grac1 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node 11grac1
Instance racdb2 is running on node 11grac2
写入测试数据
[oracle@11grac1 ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 29 10:02:08 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn /as sysdba
Connected.
SQL> sho user
USER is "SYS"
SQL> create table test (id number,name varchar2(10));
Table created.
SQL> insert into test values (1,'yallonking');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test;
ID NAME
---------- ----------
1 yallonking
删除节点实例(可用DBCA,,也可用后边的命令静默删除)
运行dbca,根据向导删除相关信息
instance management-> delete an instance-> 输入sysdba用户的账户和密码-> 选定删除的节点实例
[oracle@11grac1 ~]$ export DISPLAY=192.168.137.1:0.0
[oracle@11grac1 ~]$ dbca
查看数据库状态
[grid@11grac1 ~]$ srvctl status database -d racdb
Instance racdb1 is running on node 11grac1
[grid@11grac1 ~]$ crsctl check cluster -all
**************************************************************
11grac1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
11grac2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
[grid@11grac1 ~]$