当前位置:操作系统 > Unix/Linux >>

RAC-DG搭建步骤及一些应用分析

RAC-DG搭建步骤及一些应用分析
 
今天的实验内容是RAC-DG的搭建及一些测试,并就在实验中遇到的一些错误进行分析并解决
 
环境:11.2.0.3+oel5.7
 
rac1:zlm1 192.168.1.171 zlm1-vip 192.168.1.172 zlm1-priv 172.168.1.192
rac2:zlm2 192.168.1.173 zlm2-vip 192.168.1.174 zlm2-priv 172.168.1.193
scan-ip:zlm-cluseter zlm-cluster-scan 192.168.1.176
dg:zlm3 192.168.1.178
 
之前已安装并配置RAC和RAC主库,准备好一个装好ORACLE软件的备库,过程略,现在开始进行RAC-DG配置
 
#先查看一下RAC主库数据文件,临时文件,日志文件存放路径
SQL> set line 200 pages 200
SQL> col file_name for a50
SQL> select tablespace_name,file_name from dba_data_files;
 
TABLESPACE_NAME                FILE_NAME
------------------------------ --------------------------------------------------
USERS                          +DATA/ora11rac/datafile/users.259.823440065
UNDOTBS1                       +DATA/ora11rac/datafile/undotbs1.258.823440063
SYSAUX                         +DATA/ora11rac/datafile/sysaux.257.823440063
SYSTEM                         +DATA/ora11rac/datafile/system.256.823440061
EXAMPLE                        +DATA/ora11rac/datafile/example.264.823440247
UNDOTBS2                       +DATA/ora11rac/datafile/undotbs2.265.823440549
 
 
6 rows selected.
 
 
SQL> col name for a50
SQL> select name from v$tempfile;
 
 
NAME
--------------------------------------------------
+DATA/ora11rac/tempfile/temp.263.823440229
 
 
SQL> select group#,member from v$logfile;
 
 
    GROUP# MEMBER
---------- --------------------------------------------------
         2 +DATA/ora11rac/onlinelog/group_2.262.823440213
         2 +BACKUPDG/ora11rac/onlinelog/group_2.258.823440215
         1 +DATA/ora11rac/onlinelog/group_1.261.823440207
         1 +BACKUPDG/ora11rac/onlinelog/group_1.257.823440211
         3 +DATA/ora11rac/onlinelog/group_3.266.823440667
         3 +BACKUPDG/ora11rac/onlinelog/group_3.259.823440669
         4 +DATA/ora11rac/onlinelog/group_4.267.823440669
         4 +BACKUPDG/ora11rac/onlinelog/group_4.260.823440671
 
 
8 rows selected.
 
 
*********
主库配置:
*********
1.开启force logging
SQL> select inst_id,name,force_logging from gv$database;
 
 
   INST_ID NAME      FOR
---------- --------- ---
         1 ORA11RAC  NO
         2 ORA11RAC  NO
 
 
SQL> alter database force logging;
 
 
Database altered.
 
 
SQL> select inst_id,name,force_logging from gv$database;
 
 
   INST_ID NAME      FOR
---------- --------- ---
         1 ORA11RAC  YES
         2 ORA11RAC  YES
 
 
2.开启归档模式(所有RAC节点实例都必须在mount状态下)
SQL> select open_mode,log_mode from gv$database;
 
 
OPEN_MODE            LOG_MODE
-------------------- ------------
MOUNTED              NOARCHIVELOG
MOUNTED              NOARCHIVELOG
 
 
SQL> alter database archivelog;
 
 
Database altered.
 
 
注:之前此处修改归档模式遇到一个ORA-00265: instance recovery required, cannotsetARCHIVELOG mode的错误提示,是由于之前实例非正常关闭,重新shutdown immediate再startup mount再修改就行了
 
 
SQL> select name,log_mode,force_logging from gv$database;
 
 
NAME      LOG_MODE     FOR
--------- ------------ ---
ORA11RAC  ARCHIVELOG   YES
ORA11RAC  ARCHIVELOG   YES
 
 
3.RAC主库用RMAN全备,备份归档,备份standby控制文件
[oracle@zlm1 ~]$ rman target /
 
 
Recovery Manager: Release 11.2.0.3.0 - Production on Thu Aug 15 11:49:32 2013
 
 
Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
 
 
connected to target database: ORA11RAC (DBID=3500433418, not open)
 
 
RMAN> run{
2> llocate channel c1 type disk;
3> allocate channel c2 type disk;
4> backup database format '/rmanbackup/full_%U.bak';
5> release channel c1;
6> release channel c2;
7> }
 
 
备份过程中出了点问题,如下
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on c2 channel at 08/15/2013 11:53:07
ORA-00206: error in writing (block 477, # blocks 35) of control file
ORA-00202: control file: '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_ora11rac1.f'
ORA-27072: File I/O error
Additional information: 4
Additional information: 477
Additional information: 49152
 
 
#查看一下磁盘容量,原来是空间不够了
[root@zlm1 rmanbackup]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       16G   15G   20M 100% /
/dev/sda1              99M   23M   71M  25% /boot
tmpfs                1002M  677M  325M  68% /dev/shm
 
 
腾空一些磁盘空间后重新备份,问题解决
 
 
#备份所有归档文件
RMAN> backup archivelog all format '/rmanbackup/arc_%U.bak';
 
&n
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,