Dear All,
Oracle Apps DBA
Oracle Apps DBA
Monday, 27 November 2023
Oracle Data Guard switchover with DG Broker on oracle database 19C
Step 2: Connect to the broker
SQL> alter database recover managed standby database disconect from session;
Oracle Data Guard Failover with DG Broker on oracle database 19C
Dear All,
In this post i am going to share oracle Data Guard Failover activity using data guard broker.
Note :::::
Before performing the FAILOVER activity, you should enable the FLASHBACK on standby and primary. If you missed to enable you need to rebuild the standby post failover activity.
Primary Database:
The primary database name is STBY.
Standby Database:
The Standby database name is prod.
Step 1: Shutdown the PRIMARY Database
Step 2: Check the MRP process again
Step 3: Connect with DG Broker on Standby
Step 4: START FAILOVER
Primary Node :
Standby Node :
Data Guard Broker step on Oracle 19C Database step by step Instructions
Dear All,
In this post i am going to show you how to enable DG Broker in Oracle 19C step by step.
Step 1. TO Enable DB Broker this DG_BROKER_START parameter should be TRUE value on the both the nodes..
Check the current status of DG Broker parameter on both sides:
Primary Side:
SQL> show parameter DG_BROKER_START
NAME TYPE VALUE
------------------------------------ ----------- ---------
dg_broker_start boolean FALSE
Standby Side:
SQL> show parameter DG_BROKER_START
NAME TYPE VALUE
------------------------------------ ----------- ---------
dg_broker_start boolean FALSE
Step 2:check the redo log Gap on both the nodes
Status on Primary
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
25
Status on Standby
SQL> select max(sequence#) from v$archived_log;
MAX(SEQUENCE#)
--------------
25
Note : log sync up to date there is no gap in between primary and standby .
Step 3: Disable log_archvie_dest_2 parameter on both sides
Note : To avoid "ORA-16698: member has a LOG_ARCHIVE_DEST_n parameter with SERVICE attribute set" and perform the below steps.
Primary side Action
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service="stby", ASYNC NOAFFIRM
delay=0 optional compression=
disable max_failure=0 reopen=3
00 db_unique_name="stby" net_t
imeout=30, valid_for=(online_l
ogfile,all_roles)
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='' scope=both;
System altered.
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string
Standby Side Action:
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string service="prod", ASYNC NOAFFIRM
delay=0 optional compression=
disable max_failure=0 reopen=3
00 db_unique_name="prod" net_t
imeout=30, valid_for=(online_l
ogfile,all_roles)
SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='' scope=both;
System altered.
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string
Step 4: Enable the Data Guard Broker
To enable the Data Guard Broker,
set the parameter DG_BROKER_START to TRUE in both the primary and standby databases
Primary Side:
SQL> alter system set dg_broker_start=true;
System altered.
SQL> show parameter DG_BROKER_START
NAME TYPE VALUE
------------------------------------ ----------- -------------
dg_broker_start boolean TRUE
SQL> show parameter dg_broker_config
Standby Side :
SQL> alter system set dg_broker_start=true;
System altered.
SQL> show parameter DG_BROKER_START
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_start boolean TRUE
SQL> show parameter dg_broker_config
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
dg_broker_config_file1 string /u01/app/oracle/product/19.0.0
/db_home/dbs/dr1prod.dat
dg_broker_config_file2 string /u01/app/oracle/product/19.0.0
/db_home/dbs/dr2prod.dat
SQL>
Data Guard Broker Configuration
Step 5: Configure Listener on both sides
Add the below entries on both sides listener.ora files.
Primary node : listener.ora
(SID_DESC =
(GLOBAL_DBNAME = prod_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/db_home)
(SID_NAME = prod)
)
Standby node : listener.ora
(SID_DESC =
(GLOBAL_DBNAME = stby_DGMGRL)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/db_home)
(SID_NAME = stby)
)
After adding the above entries in the "listener.ora" files you must reload the listener on the both the nodes .
$lsnrctl reload LISTENER
Step 6: Create the Broker Configuration
Use the DGMGRL command-line interface to create the broker configuration. This involves creating a broker configuration object, adding the primary and standby databases to the configuration, and configuring other parameters such as the observer.
$ dgmgrl sys/Welcome_123
DGMGRL>
DGMGRL for Linux: Release 19.0.0.0.0 - Production on Mon Nov 27 15:16:10 2023
Version 19.21.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type "help" for information.
Connected to "prod"
Connected as SYSDBA.
DGMGRL> create configuration 'prod' as primary database is 'prod' connect identifier is prod;
DGMGRL> show configuration;
Add standby in Broker
DGMGRL> add database 'stby' as connect identifier is stby maintained as physical;
DGMGRL> show configuration;
Database "stby" added
DGMGRL> show configuration;
Configuration - prod
Protection Mode: MaxPerformance
Members:
prod - Primary database
stby - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
DISABLED
Step 7: Enable Data Guard Broker
Enable the Data Guard Broker by executing the DGMGRL command ENABLE CONFIGURATION from the primary database.
DGMGRL> enable configuration;
DGMGRL> show configuration;
Configuration - prod
Protection Mode: MaxPerformance
Members:
prod - Primary database
stby - Physical standby database
Fast-Start Failover: Disabled
Configuration Status:
SUCCESS (status updated 21 seconds ago)
Thanks,
Srini
Thursday, 9 November 2023
How to Install Oracle database 19C on OEL 9.2 - Part 2
Dear All,
In this post i am going to show you how to Install Oracle 19C on OEL 9.2 ,
If you want to watch this on Video , check on my channel ..
part 1 : YouTube
https://www.youtube.com/watch?v=plV5YsRuOVE
Part 2 :
https://www.youtube.com/watch?v=F-o2ih25qOI&t=87s
Install Oracle 19C database on OEL 9 .. Part 2
Database pre-requisite RPM
we can use yum or dnf tool to install the pre-requisite rpms from OEL 8 onwards .
yum install -y oracle-database-preinstall-19c
or
dnf install -y oracle-database-preinstall-19c
as part of this rpm we will get the oracle user with groups , earlier we need to create the oracle user and groups but now no need to create user and groups here* , but if you want to use custom user then you need to create user.
reset the oracle user password using :
passwd oracle
also we no need to update some of OS kernel and other parameter that also as part of this preinstall rpm will take care .
update the below value to disable ..
vi /etc/selinux/config
stop and disable firewall
Create the database home and other required directories as per below snap.
Unzip 19C s/w
Update bash profile login as oracle
user
Upgrade opatch utility before 19C
install .
for this error fixup :
export CV_ASSUME_DISTID=OEL7.9
Remote the inventory and then apply RU while install
this will apply the latest RU and then install the database , if you missed to apply the latest or above 19.19 RU you will get below errors .
libasmclntsh19.ohso
root.sh scripts needs to run from root user
select general purpose ..
select how many pdbs you need or if you want only cdb you select only cdb ..
enable fra and archive if you want now .. else skip now later you can enable ..
Network setup .. we can do now else after db configuration we can setup network using NECA command '
remain all are default values .. db vault , EM console and other things .
check the details and click on Finish ..
db configuration started ..
Monitor the logs ..
db configuration completed click on finish ..
Installation and db configuration completed ..
here is the part 1 for OEL 9.2 step by step install guide .
https://anjaniappsdba.blogspot.com/2023/11/how-to-install-oracle-database-19c-on.html
Thanks,
Srini