1. MAXLOGFILES
The MAXLOGFILES
parameter used in the CREATE
DATABASE
statement determines the maximum number of groups of redo log files for each database. Group values can range from 1 to MAXLOGFILES
. When the compatibility level is set earlier than 10.2.0, the only way to override this upper limit is to re-create the database or its control file. Therefore, it is important to consider this limit before creating a database. When compatibility is set to 10.2.0 or later, you can exceed the MAXLOGFILES
limit, and the control files expand as needed. If MAXLOGFILES
is not specified for the CREATE
DATABASE
statement, then the database uses an operating system specific default value.
2. MAXLOGMEMBERS
The MAXLOGMEMBERS
parameter used in the CREATE
DATABASE
statement determines the maximum number of members for each group. As with MAXLOGFILES
, the only way to override this upper limit is to re-create the database or control file. Therefore, it is important to consider this limit before creating a database. If no MAXLOGMEMBERS
parameter is specified for the CREATE
DATABASE
statement, then the database uses an operating system default value
3.ARCHIVE_LAG_TARGET
When you set the ARCHIVE_LAG_TARGET
initialization parameter, you cause the database to examine the current redo log of the instance periodically. If the following conditions are met, then the instance will switch the log:
-
The current log was created prior to n seconds ago, and the estimated archival time for the current log is m seconds (proportional to the number of redo blocks used in the current log), where n + m exceeds the value of the ARCHIVE_LAG_TARGET
initialization parameter.
-
The current log contains redo records.
In an Oracle Real Application Clusters environment, the instance also causes other threads to switch and archive their logs if they are falling behind. This can be particularly useful when one instance in the cluster is more idle than the other instances (as when you are running a 2-node primary/secondary configuration of Oracle Real Application Clusters).
The ARCHIVE_LAG_TARGET
initialization parameter specifies the target of how many seconds of redo the standby could lose in the event of a primary shutdown or failure if the Oracle Data Guard environment is not configured in a no-data-loss mode. It also provides an upper limit of how long (in seconds) the current log of the primary database can span. Because the estimated archival time is also considered, this is not the exact log switch time.
The following initialization parameter setting sets the log switch interval to 30 minutes (a typical value).
ARCHIVE_LAG_TARGET = 1800
A value of 0 disables this time-based log switching functionality. This is the default setting.
You can set the ARCHIVE_LAG_TARGET
initialization parameter even if there is no standby database. For example, the ARCHIVE_LAG_TARGET
parameter can be set specifically to force logs to be switched and archived.
ARCHIVE_LAG_TARGET
is a dynamic parameter and can be set with the ALTER SYSTEM SET
statement.
Factors Affecting the Setting of ARCHIVE_LAG_TARGET
Consider the following factors when determining if you want to set the ARCHIVE_LAG_TARGET
parameter and in determining the value for this parameter.
-
Overhead of switching (as well as archiving) logs
-
How frequently normal log switches occur as a result of log full conditions
-
How much redo loss is tolerated in the standby database
Setting ARCHIVE_LAG_TARGET
may not be very useful if natural log switches already occur more frequently than the interval specified. However, in the case of irregularities of redo generation speed, the interval does provide an upper limit for the time range each current log covers.
If the ARCHIVE_LAG_TARGET
initialization parameter is set to a very low value, there can be a negative impact on performance. This can force frequent log switches. Set the parameter to a reasonable value so as not to degrade the performance of the primary database.
分享到:
相关推荐
- 归档日志是联机重做日志(Online Redo Log)的备份,当一个redo log group切换时,如果数据库配置为归档模式,那么当前日志组的内容会被复制到归档日志中。 - 归档日志有两种模式:非归档模式(Noarchivelog)和...
- **检查日志组日志成员大小**:创建 Standby Redo Log 的大小应与主库的 Redo Log 大小一致,以避免数据丢失。使用 `SELECT group#, bytes FROM v$log` 查看日志大小。 - **创建 Standby Redo Log 组**:计算 ...
1. SGA(System Global Area)参数:包括PGA(Program Global Area)、共享池(Shared Pool)、数据库缓冲区缓存(Buffer Cache)、重做日志缓冲区(Redo Log Buffer)等。这些参数决定着数据库的内存分配策略,合理...
本文详细介绍了在Oracle RAC环境中添加控制文件、修改主库redo log、编辑主库和备库hosts文件、设置force logging模式、添加standby redo log文件、配置监听文件listener.ora、tnsnames.ora文件、从RAC源库复制密码...
4. 定义redo log文件组:至少配置两组redo log文件,以实现日志切换,保证连续记录。 5. 安全设置:配置用户权限、密码文件和审计策略,确保数据库的安全性。 6. 归档和备份策略:根据业务需求,设置归档模式并规划...
在深入探讨《pl/sql学习文档》的精粹之前,我们先来明确一下PL/SQL(Procedural Language for SQL)的定义与重要性。PL/SQL是Oracle数据库为提升SQL的功能性和灵活性而开发的一种过程化语言。它允许开发者在数据库...
在 primary 侧,我们需要生成 standby redolog,以便在复制库上应用redo日志。可以使用以下命令来生成 standby redolog: ```sql ALTER DATABASE ADD STANDBY LOGFILE 'D:\ORACLE\ORADATA\DG1\ONLINELOG\redo05.log'...
* "Null" memory:block buffers + fixed sga + redo buffer db_*_cache_size log_buffer PRE_PAGE_SGA是一个重要的参数,控制SGA的分配方式,一般情况下,Oracle使用SGA内存时,OS才会为Oracle分配,如果没有用,...
共享池用来缓存最近执行过的SQL语句和数据定义,而Redo Log Buffer负责在数据库进行修改时记录这些修改,以备恢复使用。 Oracle数据库包括数据文件、控制文件和Redo Log文件。数据文件存放用户的数据;控制文件包含...
修改从库的初始化参数文件(如`initorac.ora`),添加或修改相关参数,如控制文件路径、审计和日志归档目的地等。 5. **配置standby数据库**: 在standby服务器上,使用从主库复制的控制文件和初始化参数文件启动...
- 日志缓冲区(LOG_BUFFER): 应考虑redo日志写入频率来设定。 - JAVA池(JAVA_POOL_SIZE): 对于使用Java功能的数据库,需根据应用需求设定。 - 大池(LARGE_POOL_SIZE): 支持RMAN备份、Oracle Data Pump等操作...
Oracle数据库本身是由一系列物理文件构成,包括Control Files记录数据库的元数据,Data Files存储实际的数据,Archived Log Files用于归档redo log,Parameter File保存数据库参数,Password File用于认证用户,而...
3. 日志管理参数:LOG_FILE_SIZE、LOG_BUFFER、ARCHIVE_LOG_FILE_SIZE等,控制redo日志的大小和行为。 4. 性能优化参数:如SORT_AREA_SIZE、HASH_AREA_SIZE,影响排序和哈希操作的内存分配。 5. 连接和并发参数:如...
- **Oracle数据库**:包含了构成数据库的物理文件(datafiles、online redo log files、control files)以及逻辑结构(表空间、段、数据块)等。 其他关键文件包括参数文件和密码文件,参数文件定义了Oracle实例的...
2. **Oracle安装与配置**:学习如何安装和配置Oracle数据库服务器,包括物理和逻辑结构的设置、初始化参数文件的管理、网络配置(如Listener和TNS)以及数据文件、控制文件、redo log文件的管理。 3. **性能优化与...
- **Log应用服务**:负责将接收到的Redo数据应用于Standby数据库,以保持其与主数据库同步。 #### RMAN备份创建 - **热身**:介绍如何使用RMAN进行基本的备份操作,为后续创建Standby数据库做好准备。 - **实践**...
针对数据库的启动和关闭、控制文件与数据库初始化、参数及参数文件、数据字典、内存管理、Buffer Cache与Shared Pool原理、重做、回滚与撤销、等待事件、性能诊断与SQL优化等几大Oracle热点主题,本书从基础知识入手...
针对数据库的启动和关闭、控制文件与数据库初始化、参数及参数文件、数据字典、内存管理、Buffer Cache与Shared Pool原理、重做、回滚与撤销、等待事件、性能诊断与SQL优化等几大Oracle热点主题,本书从基础知识入手...
针对数据库的启动和关闭、控制文件与数据库初始化、参数及参数文件、数据字典、内存管理、Buffer Cache与Shared Pool原理、重做、回滚与撤销、等待事件、性能诊断与SQL优化等几大Oracle热点主题,本书从基础知识入手...
通过以上详细介绍,我们不仅了解了Oracle数据库中一系列关键的管理命令,还深入学习了日志管理和表空间管理的核心概念与操作流程。这些知识对于任何希望深化理解Oracle数据库运维和优化的专业人士来说,都是不可或缺...