Enabling Archive Logs in a RAC Environment

本文详细介绍了如何在Oracle RAC环境中配置数据库为归档日志模式,包括禁用集群实例参数、关闭所有实例、在本地实例中挂载数据库、启用归档、重新启用集群支持等步骤。

Enabling Archive Logs in a RAC Environment

by Jeff Hunter, Sr. Database Administrator


Whether a single instance or clustered database, Oracle tracks (logs) all changes to database blocks in online redolog files. In an Oracle RAC environment, each instance will have its own set of online redolog files known as a thread. Each Oracle instance will use its set (group) of online redologs in a circular manner. Once an online redolog fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle will make a copy of the online redo log before it gets reused. A thread must contain at least two online redologs (or online redolog groups). The same holds true for a single instance configuration. The single instance must contain at least two online redologs (or online redolog groups).

The size of an online redolog file is completely independent of another intances' redolog size. Although in most configurations the size is the same, it may be different depending on the workload and backup / recovery considerations for each node. It is also worth mentioning that each instance has exclusive write access to its own online redolog files. In a correctly configured RAC environment, however, each instance can read another instance's current online redolog file to perform instance recovery if that instance was terminated abnormally. It is therefore a requirement that online redo logs be located on a shared storage device (just like the database files).

As already mentioned, Oracle writes to its online redolog files in a circular manner. When the current online redolog fills, Oracle will switch to the next one. To facilitate media recovery, Oracle allows the DBA to put the database into "Archive Log Mode" which makes a copy of the online redolog after it fills (and before it gets reused). This is a process known as archiving.

The Database Creation Assistant (DBCA) allows users to configure a new database to be in archive log mode, however most DBA's opt to bypass this option. In cases like this where the database is in no archive log mode, it is a simple task to put the database into archive log mode. Note however that this will require a short database outage. From one of the nodes in the Oracle RAC 10g configuration, use the following tasks to put a RAC enabled database into archive log mode. For the purpose of this article, I will use the node racnode1 which runs the racdb1 instance:

  1. Login to one of the nodes (i.e. racnode1) and disable the cluster instance parameter by setting cluster_database to FALSE from the current instance:

    $ sqlplus "/ as sysdba"
    SQL> alter system set cluster_database=false scope=spfile sid='racdb1';

  2. Shutdown all instances accessing the clustered database:

    $ srvctl stop database -d racdb

  3. Using the local instance, MOUNT the database:

    $ sqlplus "/ as sysdba"
    SQL> startup mount

  4. Enable archiving:

    SQL> alter database archivelog;

  5. Re-enable support for clustering by modifying the instance parameter cluster_database to TRUE from the current instance:

    SQL> alter system set cluster_database=true scope=spfile sid='racdb1';

  6. Shutdown the local instance:

    SQL> shutdown immediate

  7. Bring all instance back up using srvctl:

    $ srvctl start database -d racdb

  8. (Optional) Bring any services (i.e. TAF) back up using srvctl:

    $ srvctl start service -d racdb

  9. Login to the local instance and verify Archive Log Mode is enabled:

    $ sqlplus "/ as sysdba"
    SQL> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     83
    Next log sequence to archive   84
    Current log sequence           84

After enabling Archive Log Mode, each instance in the RAC configuration can automatically archive redologs!

About the Author

Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical database design in a UNIX, Linux, and Windows server environment. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 17 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science.

Oracle E-Business Suite Release 12.1 中启用 TLS(Transport Layer Security)需要对环境进行配置,以确保通信的安全性。由于 Oracle E-Business Suite 12.1 默认使用较旧的 SSL/TLS 配置,因此需手动调整相关组件以支持现代 TLS 协议版本。 以下是启用 TLS 的主要步骤: ### 配置 Oracle HTTP Server (OHS) Oracle HTTP Server 是 Oracle E-Business Suite 前端 Web 层的核心组件之一,其基于 Apache Web Server 实现。要启用 TLS,需要编辑 `ssl.conf` 文件并启用相应的 SSL/TLS 模块。 - 编辑 `ssl.conf` 文件,通常位于 `$ORACLE_HOME/Apache/Apache/conf/ssl.conf`。 - 设置 `SSLEngine on` 以启用 SSL/TLS 支持。 - 配置证书路径,例如 `SSLCertificateFile` 和 `SSLCertificateKeyFile`,指向所需的服务器证书和私钥文件。 - 禁用不安全的协议版本,如 SSLv3 或更低版本,推荐仅启用 TLS 1.2 或更高版本: ```apache SSLProtocol -ALL +TLSv1.2 +TLSv1.3 ``` - 重启 Oracle HTTP Server 服务以应用更改。 ### 配置 Forms Listener Servlet Oracle E-Business Suite 使用 Forms Listener Servlet 来处理与 Oracle Forms 的连接。为了启用 TLS,需要更新相关的配置文件。 - 修改 `formsweb.cfg` 文件,通常位于 `$ORACLE_HOME/forms/server/` 目录下。 - 在 `[your_form_config]` 部分中设置 `baseHTMLjpiSSL.ftl` 作为模板。 - 更新 URL 参数以使用 HTTPS 而不是 HTTP。 - 如果启用了自定义 SSL 配置,可能需要调整 Java Plug-in 安全设置以信任证书。 ### 配置 WebLogic 或其他中间件 如果 Oracle E-Business Suite 使用了 WebLogic Server 或其他中间件来提供 Web 服务,则需确保该中间件已正确配置为支持 TLS 1.2 或更高版本。 - 登录到 WebLogic 控制台。 - 导航至目标服务器的 SSL 配置部分。 - 启用 TLS 并禁用不安全的协议版本。 - 配置密钥库和信任库以使用有效的证书。 ### 更新数据库层 Oracle 数据库本身也应启用高级加密协议。这可以通过修改 `sqlnet.ora` 文件中的参数实现: ```ini SQLNET.ENCRYPTION_SERVER = REQUIRED SQLNET.ENCRYPTION_TYPES_SERVER = (AES256) SQLNET.CRYPTO_CHECKSUM_SERVER = REQUIRED SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (SHA256) ``` 此外,还需确保数据库监听器配置 (`listener.ora`) 包含正确的 SSL/TLS 设置。 ### 验证配置 完成上述更改后,建议使用工具如 `openssl` 或在线 TLS 测试工具验证 TLS 是否成功启用,并检查是否存在任何漏洞或弱密码套件。 ### 注意事项 - 在生产环境中操作前,应在测试环境中验证所有更改。 - 确保使用的证书由受信任的 CA 签发,否则客户端可能无法建立安全连接。 - 定期更新证书和私钥,以避免因过期导致的服务中断。 通过以上步骤,可以有效启用 TLS 并提升 Oracle E-Business Suite 12.1 环境的安全性 [^1]。 ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值