oracle11g rac开启关闭、设置归档小结
2014-10-21来源:

关闭

1.先关数据库:

代码如下:

[oracle@oeltan1 ~]$ srvctl stop database -d tantest

2.再关闭crs服务

代码如下:

root@oeltan1 ~]# crsctl stop crs

启动:

代码如下:

[root@oeltan1 ~]# crsctl start crs

[oracle@oeltan1 ~]$srvctl start asm -n node_name

上述开机一般已经启动

代码如下:

[oracle@oeltan1 ~]$ srvctl start database -d tantest

归档设置:

1. 分别创建两个实例的asm目录

任意一个实例,grid用户下:

代码如下:

# su - grid

[grid@oeltan1 ~]$ sqlplus /as sysasm

sql> select name from v$asm_diskgroup;

name

--------------------------------------------------------------------------------

crs

data1

fri

12 sql> alter diskgroup fri add directory '+fri/tantest'; sql> alter diskgroup fri add directory '+fri/tantest/arch1';

还可以通过asmcmd创建目录:

123 asmcmd> pwd +fri/tantest asmcmd> mkdir arch2

2.修改归档参数

任意一个实例,oracle用户下:

12 alter system set log_archive_dest_1='location=+fri/tantest/arch1' scope=both sid='tantest1'; alter system set log_archive_dest_1='location=+fri/tantest/arch2' scope=both sid='tantest2';

3.两个节点上分别都执行:

1234 sql> shutdown immediate; sql> startup mount; sql> alter database archivelog; sql> alter database open;

--修改一个实例时,另一个实例不能在open状态,否则报ora-01126: database must be mounted in this instance and not open in any

4.分别检查:

12345678910111213141516 sql> archive log list database log mode archive mode automatic archival enabled archive destination +fri/tantest/arch1 oldest online log sequence 14 next log sequence to archive 15 current log sequence 15 sql> archive log list database log mode archive mode automatic archival enabled archive destination +fri/tantest/arch2 oldest online log sequence 6 next log sequence to archive 7 current log sequence 7 sql>

更多信息请查看IT技术专栏

推荐信息
Baidu
map