Site icon IT Tutorial

Oracle DataGuard Step by Step Installation with RMAN Duplicate Method -1

Hi,

I will tell you Oracle dataguard configuration and installation in this article.

 

 

Let’s read Dataguard Architecture if you don’t know.

 

https://ittutorial.org/oracle-dataguard-architecture-3/

 

With Oracle DataGuard technology, we can create Physical and Logical Standby for our databases for providing disaster recovery . I will explain the most used Physical Standby configuration and setup in Oracle 12c, Oracle 18c database on Linux server.

 

Before starting installation, I will use db_name DEVECI for my Primary database. The name of the Physical Standby database will be DEVECIDG.  I will proceed step by step through the configuration and installation.

Requirements

1- An Oracle Software must be installed on the standby database server, which versions will be the same as the Primary database and also Patchset versions. (Database must not be created with DBCA and  If your primary database is 12.1.0.2, it must be 12.1.0.2 for Standby database)

2- A Listener must be created on the standby database server that will listen to the physical standby that will be created by NETCA with Oracle Software.

 

3- The primary database must be in Archivelog mode. For detailed information about Archivelog mode, please read the following article. You can find out whether the database is in archive mode with the following query.

https://ittutorial.org/oracle-database-enable-archivelog-mode/

 

 

SELECT log_mode FROM v$database;

LOG_MODE
------------
ARCHIVELOG

SQL>

 

4- All changes namely transactions (except TEMP Tablespace) running in the primary database must be logged and applied to the Standby. The following command must be run in Primary so that all changes and transactions in the primary database will be logged.

 

SQL> alter database force logging;

Database altered.

 

5- In the primary database, we should set some parameters required for Data Guard, and I will explain what these parameters are in the following article.

https://ittutorial.org/oracle-dataguard-architecture-3/

 

After making the following parameter change, the database must be closed and opened due to static parameters. Those who do not know how to close or open the database can read the following article.

Oracle Database Startup and Shutdown Steps

 

Following scripts have to execute on Primary Side.

SQL> alter system set LOG_ARCHIVE_CONFIG='DG_CONFIG=(DEVECI,DEVECIDG)';
System altered.

SQL> alter system set LOG_ARCHIVE_DEST_2='SERVICE=DEVECIDG LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DEVECIDG';
System altered.

SQL> alter system set LOG_ARCHIVE_DEST_1='LOCATION=/oracle/DATA/DEVECI/ARCH/ VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=DEVECI';
System altered.

SQL> alter system set LOG_ARCHIVE_DEST_STATE_1=ENABLE;
System altered.

SQL> alter system set FAL_SERVER=DEVECIDG;
System altered.

SQL> alter system set FAL_CLIENT=DEVECI;
System altered.

SQL> ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=20;
System altered.

SQL> ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE;
System altered.

SQL> alter system set DB_FILE_NAME_CONVERT='/oracle/DATA/DEVECIDG/DEVECIDG','/oracle/DATA/DEVECI/DEVECI' scope=spfile;
System altered.

SQL> alter system set LOG_FILE_NAME_CONVERT='/oracle/DATA/DEVECIDG/DEVECIDG','/oracle/DATA/DEVECI/DEVECI' scope=spfile;
System altered.

 

I will continue to tell installation of dataguard in the next post.

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/

Exit mobile version