Skip to content
Home » Oracle Database » Building a Physical Standby Database (05/14) - Create standby redo logs on primary database

Building a Physical Standby Database (05/14) - Create standby redo logs on primary database

Building a Physical Standby Database (04/14) - Enable force logging and archivelog on primary database
For faster receiving and storing the redo logs from the primary database when plays a standby role, we need to create standby redo logs on both databases. In fact, this step is an option, if there is no standby redo logs created, the primary database still can write redo to the standby database just like archival. Therefore, you can see the newest archived log are growing in the standby database.

Here is an example to create standby redo logs, they match the number and size of online redo logs:

[oracle@primary01 ~]$ sqlplus / as sysdba
SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 500M;
SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 SIZE 500M;
SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 500M;
SQL> ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 SIZE 500M;

The database will take them to '+diskgroup/db_unique_name/onlinelog', if they are not specified explicit locations.

Let's check the result:
SQL> select group#, thread#, bytes from v$standby_log;

    GROUP#    THREAD#      BYTES
---------- ---------- ----------
         5          1  524288000
         6          1  524288000
         7          2  524288000
         8          2  524288000

Building a Physical Standby Database (06/14) - Prepare standby controlfile on primary database

Leave a Reply

Your email address will not be published. Required fields are marked *