快3网上购买

Oracle 11g RAC 到 单案例 DG 环境搭建

电脑杂谈  发布时间:2019-09-02 22:02:51  来源:网络整理

桑德环境官网_oracle11g rac环境_桑德环境 官网

1 环境说明

Primary Database 是一个两节点的RAC,存储采取ASM 方式,具体如下图:

RAC Primary

Public IP

192.168.1.60/24

192.168.1.62/24

Private IP

192。168。56。80/24

192.168.56.82/24

桑德环境官网_桑德环境 官网_oracle11g rac环境

Vritual IP

快3网上购买192.168.1.61/24

快3网上购买192。168。1。63/24

San IP

192.168.1.125

Instance

DB_NAME

Data、Control File、Redo File

Standby Database (Single Instance) 环境介绍

oracle11g rac环境_桑德环境 官网_桑德环境官网

Single instance Standby

说明

192.168.1.65/24

Oracle

实例

Instance

DB_NAME

/u01/app/oracle/oradata/orcl/data tempfile

Control File

桑德环境官网_oracle11g rac环境_桑德环境 官网

/u01/app/oracle/oradata/orcl/control01.ctl

/u01/app/oracle/fast_recovery_area/orcl

Redo FileRedo File

快3网上购买/u01/app/oracle/oradata/orcl/redo

2 主库修改为 force logging 模式

rac 节点1 执行
SQL> alter database force logging;
Database altered.
SQL> select force_logging from v$database; 
FOR
---
YES
3 修改主库为归档模式
SQL>  archive log list
Database log mode	       No Archive Mode
Automatic archival	       Disabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     30
Current log sequence	       31
切换归档,将所有节点都必须处于 mount 状态。 在其中一个节点修改模式,然后在其他节点正常启动即可。
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1269366784 bytes
Fixed Size		    2252864 bytes
Variable Size		  872419264 bytes
Database Buffers	  385875968 bytes
Redo Buffers		    8818688 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> archive log list;
Database log mode	       Archive Mode
Automatic archival	       Enabled
Archive destination	       USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     30
Next log sequence to archive   31
Current log sequence	       31
SQL> select name , open_mode, log_mode,force_logging from gv$database;
NAME	  OPEN_MODE	       LOG_MODE     FOR
--------- -------------------- ------------ ---
LEO	  READ WRITE	       ARCHIVELOG   YES
LEO	  READ WRITE	       ARCHIVELOG   YES
SQL>  show parameter db_recover 
NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest		     string	 +DATA
db_recovery_file_dest_size	     big integer 4407M
我 2 个节点的归档都指向了+DATA 这个磁盘组。 也可以指向其他的磁盘组或者本地的位置,如: 
SQL> alter system set log_archive_dest_1='location=/u01/leo1arch' sid='leo1'; 
SQL> alter system set log_archive_dest_1='location=/u01/leo2arch' sid='leo2';
4 主备库添加 standby Redo log 文件
RAC 每个 Redo Thread 都需要创建对应的 Standby Redo Log。 创建原则和单实例一样,包括日志 文件大小相等,日志组数量要多 1 组。
主库
SQL> set lines 120
SQL> col member for a50
SQL> select a.thread#,a.group#,a.bytes/1024/1024,b.member from v$log a,v$logfile b where a.group#=b.group#;
   THREAD#     GROUP# A.BYTES/1024/1024 MEMBER
---------- ---------- ----------------- --------------------------------------------------
	 1	    2		     50 +DATA/leo/onlinelog/group_2.277.943664411
	 1	    2		     50 +DATA/leo/onlinelog/group_2.278.943664413
	 1	    1		     50 +DATA/leo/onlinelog/group_1.275.943664407
	 1	    1		     50 +DATA/leo/onlinelog/group_1.276.943664409
	 2	    3		     50 +DATA/leo/onlinelog/group_3.281.943668673
	 2	    3		     50 +DATA/leo/onlinelog/group_3.282.943668675
	 2	    4		     50 +DATA/leo/onlinelog/group_4.283.943668677
	 2	    4		     50 +DATA/leo/onlinelog/group_4.284.943668679
8 rows selected.
--主库添加 standby redo log: 
SQL> alter database add standby logfile thread 1 group 10 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 1 group 11 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 1 group 12 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 1 group 13 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 1 group 14 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 2 group 15 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 2 group 16 ('+DATA') size 50m;
Database altered.
SQL> alter database add standby logfile thread 2 group 17 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 2 group 18 ('+DATA') size 50m; 
Database altered.
SQL> alter database add standby logfile thread 2 group 19 ('+DATA') size 50m; 
Database altered.
--验证: 
SQL> select group#,type,member from v$logfile order by 2;
    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------
	 2 ONLINE  +DATA/leo/onlinelog/group_2.277.943664411
	 4 ONLINE  +DATA/leo/onlinelog/group_4.284.943668679
	 4 ONLINE  +DATA/leo/onlinelog/group_4.283.943668677
	 3 ONLINE  +DATA/leo/onlinelog/group_3.282.943668675
	 3 ONLINE  +DATA/leo/onlinelog/group_3.281.943668673
	 1 ONLINE  +DATA/leo/onlinelog/group_1.276.943664409
	 1 ONLINE  +DATA/leo/onlinelog/group_1.275.943664407
	 2 ONLINE  +DATA/leo/onlinelog/group_2.278.943664413
	18 STANDBY +DATA/leo/onlinelog/group_18.330.945089519
	17 STANDBY +DATA/leo/onlinelog/group_17.329.945089515
	16 STANDBY +DATA/leo/onlinelog/group_16.328.945089509
    GROUP# TYPE    MEMBER
---------- ------- --------------------------------------------------
	15 STANDBY +DATA/leo/onlinelog/group_15.327.945089505
	14 STANDBY +DATA/leo/onlinelog/group_14.294.944422059
	13 STANDBY +DATA/leo/onlinelog/group_13.293.944422047
	12 STANDBY +DATA/leo/onlinelog/group_12.292.944422039
	11 STANDBY +DATA/leo/onlinelog/group_11.291.944422031
	19 STANDBY +DATA/leo/onlinelog/group_19.331.945089523
	10 STANDBY +DATA/leo/onlinelog/group_10.290.944422017
18 rows selected.
5 配置主备库的:listener.ora


本文来自电脑杂谈,转载请注明本文网址:
http://www.kadakong.com/a/ruanjian/article-121484-1.html

发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

  • 张珍奴
    张珍奴

    快3网上购买你说200海里是入侵也可以

  • 贺文耀
    贺文耀

    马云忽悠了太做淘宝卖家亏得一踏糊涂

  • 刘亚慧
    刘亚慧

    快3网上购买日本鬼子几次都是在赌国运而已

    • 纳谷六朗
      纳谷六朗

      意思是让你们自己掏钱买房

快3网 江西11选5 恒彩彩票投注 湖南快乐十分官网 河南快3 快3投注平台 快三网上购买 上海天天彩选4 青海快3 快三投注