Categories: Database

Dummies Notes – How to Setup Oracle Data Guard

This article represents instructions which could be used to set up oracle data guard on a primary and one or more physical standby database. The article presumes that you have a basic understanding of what is Oracle Data guard and why it needs to be set up.

Following are key aspects which are discussed later in this article:

  • Primary Database Setup
  • Physical Standby Database Setup

Following is details on primary and physical standby database setup:

  • Primary Database Setup: Configure the primary database appropriately including doing some of the following:
    • Enable force logging
    • Alter the database parameters such as following. This is one time activity and does not needed to be done during the addition of new physical standby databases.
      • REMOTE_LOGIN_PASSWORDFILE
      • LOG_ARCHIVE_FORMAT
      • LOG_ARCHIVE_MAX_PROCESSES
      • FAL_CLIENT
      • FAL_SERVER
      • STANDBY_FILE_MANAGEMENT
    • Configure the destination parameters for each new physical standby added. Following parameters are configured each time a new physical database is added:
      • LOG_ARCHIVE_CONFIG
      • LOG_ARCHIVE_DEST_<NUMBER>
      • LOG_ARCHIVE_DEST_STATE_<NUMBER>
    • Create PFile
    • Configure the primary database to receive the redo logs
    • Modify the tnsnames.ora file by adding an entry for physical standby database. Add an entry into this file for each new addition of physical standby database.
    • Create the following files to be copied to physical standby database:
      • Standby control files
      • Orapassword file generated using orapwd utility
      • Custom init<SID>.ora file
      • Database & archivelog backup
  • Physical Standby Database Setup: Configure the standby database appropriately including doing some of the following:
    • Copy following files to staging area such as /tmp
      • Standby control file
      • Orapassword file of the format orapw<ORACLE_SID>
      • Custom init<SID>.ora file
      • Database backup files
    • Place the standby control file to following two different places:
      • $ORACLE_BASE/oradata/<ORACLE_SID>
      • $ORACLE_BASE/fast_recovery_area/<ORACLE_SID>
    • Place the orapw<ORACLE_SID> file to $ORACLE_HOME/dbs location
    • Move the backup the database to appropriate location, If it is FRA, move it to folder such as $ORACLE_BASE/fast_recovery_area/<ORACLE_SID>
    • Create SPFile from PFile
    • Start the listener
    • Restore the database
    • Prepare the standby database to receive the redo logs
    • Start the log apply process

Start the apply process

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com

Recent Posts

Mean Squared Error vs Cross Entropy Loss Function

Last updated: 28th April, 2024 As a data scientist, understanding the nuances of various cost…

11 hours ago

Cross Entropy Loss Explained with Python Examples

Last updated: 28th April, 2024 In this post, you will learn the concepts related to…

12 hours ago

Logistic Regression in Machine Learning: Python Example

Last updated: 26th April, 2024 In this blog post, we will discuss the logistic regression…

2 days ago

MSE vs RMSE vs MAE vs MAPE vs R-Squared: When to Use?

Last updated: 22nd April, 2024 As data scientists, we navigate a sea of metrics to…

3 days ago

Gradient Descent in Machine Learning: Python Examples

Last updated: 22nd April, 2024 This post will teach you about the gradient descent algorithm…

6 days ago

Loss Function vs Cost Function vs Objective Function: Examples

Last updated: 19th April, 2024 Among the terminologies used in training machine learning models, the…

1 week ago