Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 1152450560 bytes
Fixed Size 2252584 bytes
Variable Size 855638232 bytes
Database Buffers 285212672 bytes
Redo Buffers 9347072 bytes
Database mounted.
Database opened.
SQL> show parameter cluster
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
cluster_interconnects string
SQL> select instance_number,instance_name,host_name from gv$instance; --最后确认是否起来了!
INSTANCE_NUMBER INSTANCE_NAME HOST_NAME
--------------- ---------------- ----------------------------------------------------------------
1 dominic1 dominic1.com
2 dominic2 dominic2.com
到现在已经是集群了,不过还有一些收尾的工作要做。
执行catclust.sql脚本来创建相关视图
SQL> @$ORACLE_HOME/rdbms/admin/catclust.sql
重建Temp 表空间
在恢复的时候,会自动创建TEMP 表空间。和一个前辈聊到过这个问题,他说这个temp 文件好像没有起到作用。 尤其是数据量大的时候,他建议重建添加temp 数据文件。 这个还是小心为好,反正重建一些也不费什么事。但是万一出问题,就是大麻烦。
SQL> select name from v$tempfile;
NAME
----------------------------------------------------------------------------------------------------
/dba/app/oracle/oradata/dominic/temp01.dbf --两个节点一样
SQL> alter tablespace temp add tempfile '+DATA_DISK' size 400m;
Tablespace altered.
SQL> select name from v$tempfile;
NAME
----------------------------------------------------------------------------------------------------
/dba/app/oracle/oradata/dominic/temp01.dbf
+DATA_DISK/dominic/tempfile/temp.273.850859907
SQL> alter database tempfile '/dba/app/oracle/oradata/dominic/temp01.dbf' offline;
Database altered.
SQL> alter database tempfile '/dba/app/oracle/oradata/dominic/temp01.dbf' drop including datafiles;
Database altered.
---现在两个节点查看,都是一样的,
SQL> select name from v$tempfile;
NAME
--------------------------------------------------------------------------------
+DATA_DISK/dominic/tempfile/temp.273.850859907
添加集群的监听:
之前需要确认:
[grid@dominic2 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....DISK.dg ora....up.type ONLINE ONLINE dominic1
ora....ER.lsnr ora....er.type ONLINE ONLINE dominic1
ora....N1.lsnr ora....er.type ONLINE ONLINE dominic1
ora....DISK.dg ora....up.type ONLINE ONLINE dominic1
ora....DATA.dg ora....up.type ONLINE ONLINE dominic1
ora.asm ora.asm.type ONLINE ONLINE dominic1
ora.cvu ora.cvu.type ONLINE ONLINE dominic1
ora....SM1.asm application ONLINE ONLINE dominic1
ora....C1.lsnr application ONLINE ONLINE dominic1
ora....ic1.gsd application OFFLINE OFFLINE
ora....ic1.ons application ONLINE ONLINE dominic1
ora....ic1.vip ora....t1.type ONLINE ONLINE dominic1
ora....SM2.asm application ONLINE ONLINE dominic2
ora....C2.lsnr application ONLINE ONLINE dominic2
ora....ic2.gsd application OFFLINE OFFLINE
ora....ic2.ons application ONLINE ONLINE dominic2
ora....ic2.vip ora....t1.type ONLINE ONLINE dominic2
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE dominic1
ora.oc4j ora.oc4j.type ONLINE ONLINE dominic1
ora.ons ora.ons.type ONLINE ONLINE dominic1
ora....ry.acfs ora....fs.type ONL