官术网_书友最值得收藏!

Time for action – enabling force logging

Perform the following steps on the primary database:

  1. Check the force logging status as follows:
    SQL> select name, force_logging from v$database;
    NAME FOR
    --------- ---
    ORCL NO
    
  2. Enable the force logging mode as follows:
    Enabling Force Logging on Primary Database is mandatory. 
    SQL> alter database force logging;
    Database altered.
    
  3. Check the force logging status again as follows:
    SQL> select name,force_logging from v$database;
    NAME FOR
    --------- ---
    ORCL YES
    

    In the alert log, you'll see following lines:

    alter database force logging
    ALTER DATABASE FORCE LOGGING command is waiting for existing direct writes to finish. This may take a long time.
    Completed: alter database force logging
    

What just happened?

We've put the primary database in the force logging mode, which is required for the Data Guard physical standby database to work properly.

Standby redo logs

Standby redo logfiles are used by a standby database to store the redo received from the primary database. The redo received by a standby database via redo transport is written to the current SRL group by the Remote File Server (RFS) background process. When a log switch occurs on the primary database, RFS writes the redo to the next standby redo log group and the previously used standby redo log group is archived on the standby database by an ARCn process.

Configuring the standby redo logfiles on the primary database is optional. After a switchover, the primary database role will be changed to standby; if SRLs were configured, the new standby will be ready to receive redo data and write them into the standby redo logfiles.

The SRL files must be the same size as your online redo log (ORL) files. You also need to have enough SRL groups; that is, one more than the number of ORL groups. Let's suppose you have three ORL groups in the primary database; then, n+1 (that is, four) SRL groups should be configured. On RAC databases you should create n+1 SRL groups for each thread. For example, in an RAC primary database with two instances and three ORL groups per instance, we should create 2*(3+1) SRL groups (that is, 8 groups).

Tip

We'll use the RMAN duplicate method to create the physical standby database; if SRLs exist on primary, they'll be automatically created on standby.

Some other considerations on creating SRL groups are as follows:

  • In RAC, do not forget to create SRLs for each thread by specifying the thread number on the shared disks.
  • If you add any ORLs in the primary database later, you'll have to add SRLs on primary and each standby database. If you resize ORLs, you have to resize SRLs too.
  • It's not recommended to multiplex SRLs, because multiplexing may adversely affect redo transport performance and SRL availability is not crucial as ORL availability is.
主站蜘蛛池模板: 威信县| 二手房| 吐鲁番市| 长子县| 都昌县| 葫芦岛市| 黄浦区| 仪征市| 恭城| 蒙自县| 鄂尔多斯市| 桃园市| 麻阳| 玉环县| 津市市| 呼玛县| 大竹县| 中卫市| 衡东县| 厦门市| 河池市| 上栗县| 三穗县| 徐水县| 林芝县| 裕民县| 玛多县| 舒城县| 天台县| 承德市| 阳东县| 明光市| 娄烦县| 连云港市| 东乡族自治县| 丰镇市| 红安县| 贵南县| 闵行区| 扎兰屯市| 红安县|