Oracle DataGuard物理备库的数据模式
来源:互联网 发布:2017中国网络文化产业 编辑:程序博客网 时间:2024/05/23 19:20
在DataGuard中数据保护模式要按照需求来设置
在所有的配置中都是用性能换数据的安全,要么就是用数据的安全级别来换性能。
1.数据的保护模式
第一种:最大限度保护数据
Maximum availability: This protection mode provides the highest level of data protection that is possible without compromising the availability of a primary database. With Oracle Data Guard, transactions do not commit until all redo data needed to recover those transactions has either been received in memory or written to the standby redo log (depending upon configuration) on at least one synchronized standby database. If the primary database cannot write its redo stream to at least one synchronized standby database, it operates as if it were in maximum performance mode to preserve primary database availability until it is again able to write its redo stream to a synchronized standby database.
This protection mode ensures zero data loss except in the case of certain double faults, such as failure of a primary database after failure of the standby database.
--先将log写入到内存或者一个备库归档,然后执行事务,除了双方同时故障的意外。第二种:最大性能
Maximum performance: This is the default protection mode. It provides the highest level of data protection that is possible without affecting the performance of a primary database. This is accomplished by allowing transactions to commit as soon as all redo data generated by those transactions has been written to the online log. Redo data is also written to one or more standby databases, but this is done asynchronously with respect to transaction commitment, so primary database performance is unaffected by delays in writing redo data to the standby database(s).
This protection mode offers slightly less data protection than maximum availability mode and has minimal impact on primary database performance.
--默认的保护方式,先将事务执行,然后记录到log,然后同步到备库,对主库iude影响非常小第三种:数据0丢失
Maximum protection: This protection mode ensures that no data loss will occur if the primary database fails. To provide this level of protection, the redo data needed to recover a transaction must be written to both the online redo log and to the standby redo log on at least one synchronized standby database before the transaction commits. To ensure that data loss cannot occur, the primary database will shut down, rather than continue processing transactions, if it cannot write its redo stream to at least one synchronized standby database.
--当事务提交后,将log先提交到备库,关闭主库其他的事务,然后执行事务,完毕后执行下一个事务
2.修改方式(数据保护由主库参数操控)
注意:在主库操作
按数据包户程度排序
maximize protection < maximize availability < maximize performance
SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL------------------------------------------------------------ ------------------------------------------------------------MAXIMUM PERFORMANCE MAXIMUM PERFORMANCESQL> alter database set standby database to maximize availability;数据库已更改。SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL------------------------------------------------------------ ------------------------------------------------------------MAXIMUM AVAILABILITY RESYNCHRONIZATION //没生效
更改成availability模式的条件:
Maximum protection/AVAILABILITY模式必须满足以下条件
Redo Archival Process: LGWR
Network Tranmission mode: SYNC //注意
Disk Write Option: AFFIRM
Standby Redo Logs: Yes
standby database type: Physical Only
SQL> show parameter set log_archive_dest;NAME TYPE VALUE------------------------------------ --------------------------------- ------------------------------awr_snapshot_time_offset integer 0plscope_settings string IDENTIFIERS:NONESQL> show parameter log_archive_dest; NAME TYPE VALUE------------------------------------ --------------------------------- ------------------------------log_archive_dest stringlog_archive_dest_1 string location=/oracle/archive_log v alid_for=(all_logfiles,all_rol es) db_unique_name=TEST_Mlog_archive_dest_2 string service=TESTS reopen=120 lgwr async valid_for=(online_logfil //此处是async es,primary_role) db_unique_nam e=TEST_S
修改之:
SQL> alter system set log_archive_dest_2='service=TESTS reopen=120 lgwr sync valid_for=(online_logfiles,primary_role) db_unique_name=TEST_S';系统已更改。SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL------------------------------------------------------------ ------------------------------------------------------------MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY //已生效
注意:在以前的某些版本中如果数据保护级别从高到底,则主库必须在mount状态下
一下内容摘自Dave大师博客
SQL> startup mount;ORACLE instance started.Total System Global Area 167772160 bytesFixed Size 1218316 bytesVariable Size 79694068 bytesDatabase Buffers 83886080 bytesRedo Buffers 2973696 bytesDatabase mounted.SQL> alter database set standby database to maximize availability;Database altered.SQL> alter database open;Database altered.SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL-------------------- --------------------MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY
修改到最大保护模式:
SQL> alter database set standby database to maximize protection; //在availability模式下提高到protection模式下,不许要修改参数数据库已更改。SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL------------------------------------------------------------ ------------------------------------------------------------MAXIMUM PROTECTION MAXIMUM PROTECTION
当备库在数据的最大保护模式下,备库是不允许被先down的如下:
备库操作
SQL> select protection_mode,protection_level from v$database;PROTECTION_MODE PROTECTION_LEVEL------------------------------------------------------------ ------------------------------------------------------------MAXIMUM PROTECTION MAXIMUM PROTECTIONSQL> shutdown immediateORA-01154: ????????????, ??, ?????SQL> host oerr ORA 0115401154, 00000, "database busy. Open, close, mount, and dismount not allowed now"// *Cause: Some operation is in progress that expects the opened/mounted state// of this instance to remain the same.// *Action: Wait for the operation to complete then retry. If attempting to// do a shutdown, SHUTDOWN ABORT will work. If this is a shutdown// of a standby database that is operating in NO DATA LOSS mode, you// must shutdown the primary database first.--必须先down掉主库
#################
迷途小运维原创
作者:john
转载请注明出处
- Oracle DataGuard物理备库的数据模式
- oracle dataguard 物理备库创建(留着)
- 【Oracle】物理DATAGUARD最大性能模式部署
- Oracle DataGuard物理备库快速实战演示-视频分享
- Oracle 10g dataguard 物理备库日常维护
- oracle rman duplicate 创建dataguard物理备库
- Oracle 11g Dataguard 物理备库配置Duplicate配置
- Oracle 11g DataGuard 物理备库配置及Active DataGuard测试
- 【DataGuard】Oracle 11g DataGuard 角色转换(一)物理备库Switchover
- Dataguard物理备库创建
- DataGuard 物理备库配置
- Dataguard实战(7):RHEL4.5 安装 Oracle10G Dataguard 多个备库 - 物理备库数据同步测试
- Oracle12c DataGuard 物理备库的简单配置
- Dataguard实战(8):RHEL4.5 安装 Oracle10G Dataguard 多个备库 - 更改物理备库为最大可用或最大保护模式
- Oracle DataGuard 物理Standby 搭建
- Oracle12cR1 DataGuard物理备库详细说明
- 虚拟机实现dataguard物理备库
- dataguard之创建物理备库
- 工作的方法、态度
- Qt项目编码详解
- DirectDraw读书笔记
- 从JAVA多线程理解到集群分布式和网络设计的浅析
- 云计算学习无忧:云平台技术架构与应用案例
- Oracle DataGuard物理备库的数据模式
- rman数据库迁移系列视频教程
- 请读完这篇文章后再谈恋爱吧
- 【一步步教你用U盘安装XP系统】
- 解决sdk更新的不了的问题
- 标准库string对象的定义和初始化
- ExtJS ComboBox相关
- eclipse导入maven项目,把src/main, src/test直接解析成包名的错误
- Float以后撑不开div的困境