SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Oracle Data Guard Configuration in 12c
This note examines how to create an Oracle 12.1.0.2.0 physical standby Active Data Guard database using
the RMAN DUPLICATE FROM ACTIVE command.
We will be creating the data guard configuration in a 12c Container Database.
IN 12c Data Guard is set up at the Container level and not the individual Pluggable database level as
the redo log files only belong to the Container database and the individual pluggable databases do not have
their own online redo log files.
The platform Solaris 10 and the primary database db_unique_name is DB12c and the db_unique_name of the
Active Standby database is STBY12c.
Primary Database Standby Database
DB Name DB12C DB12C
DB unique Name DB12C STBY12c
IP and Hostname 172.31.36.12 (Solaris12c) 172.31.36.13 (SolarisST)
Let us look at the steps involved.
Change the cat /etc/hosts for both Primary and Standby Database Machine, Thats why they can know
Each other both IP address and HostName.
hosts_standby hosts_primary
On Primary
Enable the Archive Log:
SQL> select log_mode from v$database;
LOG_MODE
------------
ARCHIVELOG
** Please Increase The db_recovery_file_dest_size atleast 5G , by default it’s less than 1G which is fillup
in any time.
Enable the Force Logging
SQL> alter database force logging;
Database altered.
SQL> select FORCE_LOGGING from v$database;
FORCE_LOGGING
---------------------------------------
YES
On Standby
Create the required directory structure
It’s important cause when we restore RMAN backup , at that time if appropriate directory is not created then
you got error in restore.
Technique :
1. Find the location of ADUMP path of Primary database and create the same things in Standby
database.
SQL> show parameter audit_file
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest string /export/home/oracle/admin/DB12c/adump
So you must create below folder in Standby database
$ mkdir -p export/home/oracle/admin/DB12c/adump
2. Find the Location of db_recovery_file_dest in Primary Database and create same directory in Standby
database.
SQL> show parameter DB_Recove
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string /export/home/oracle/fast_recovery_area
db_recovery_file_dest_size big integer 3G
So must create below folder in Standby Database
$ mkdir -p /export/home/oracle/fast_recovery_area
3. Check The control file location in Primary Database and create same folder in Standby database.
SQL> show parameter control
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time integer 7
control_files string
/export/home/oracle/oradata/DB12C/controlfile/o1_mf_bo5tnjkh_.ctl,
/export/home/oracle/fast_recovery_area/DB12C/controlfile/o1_mf_bo5tnl4q_.ctl
control_management_pack_access string DIAGNOSTIC+TUNING
So create the control file location in Standby Database
$ mkdir -p /export/home/oracle/oradata/DB12C/controlfile
$ mkdir -p /export/home/oracle/fast_recovery_area/DB12C/controlfile
4. Check the datafile location and logfile location on Primary Database and create same folder in
Standby Database.
SQL> select name from v$datafile;
/export/home/oracle/oradata/DB12C/datafile/o1_mf_system_bo5tgrz1_.dbf
....
....
SQL> select member from v$logfile;
/export/home/oracle/oradata/DB12C/onlinelog/o1_mf_3_bo5tohpf_.log
/export/home/oracle/fast_recovery_area/DB12C/onlinelog/o1_mf_3_bo5tonq9_.log
.....
.....
$ mkdir -p /export/home/oracle/oradata/DB12C/datafile
$ mkdir -p /export/home/oracle/oradata/DB12C/onlinelog
$ mkdir -p /export/home/oracle/fast_recovery_area/DB12C/onlinelog
Primary Database
Copy the password file from primary to standby
$ scp -rp orapwo12c
oracle@172.31.36.13:/export/home/oracle/product/12.2.0/db_1/dbs
oracle@orasql-001-test's password:
orapwo12c
100% 7680 7.5KB/s 00:00
StandBy Database
On Standby
Add a static entry in the listener.ora for STBY12c
# listener.ora Network Configuration File:
/export/home/oracle/product/12.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = DB12c)
(ORACLE_HOME = /export/home/oracle/product/12.2.0/db_1)
(SID_NAME = DB12c)
)
)
listener_Standby.ora
Reload the listener
$ lsnrctl reload LISTENER
Create spfile for StandBY database input Single one line spfileDB12c.ora
*.db_name=DB12c
Add an entry in the oratab file which location of
/export/home/oracle/product/12.2.0/db_1/install/oratab
DB12c:/export/home/oracle/product/12.2.0/db_1:N
bash-3.2$ cat /export/home/oracle/product/12.2.0/db_1/install/oratab
DB12c:/export/home/oracle/product/12.2.0/db_1:N
Edit The TNSNAME.ORA in Standby database.
DB12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.12)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB12c)
(UR = A)
)
)
STBY12c =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = STBY12C)
(UR = A)
)
)
tnsnames_Standby.ora
Primary Database TNSNAMES.ORA Change
STBY12c =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.13)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DB12c)
)
)
tnsnames_Primary.ora
On Standby
Start the Standby instance in NOMOUNT mode
Run the .profile where we mention ORACLE_SID=DB12c
.profile
bash-3.2$ . ./.profile
bash-3.2$ sqlplus
SQL*Plus: Release 12.1.0.2.0 Production on Sat May 16 13:47:30 2015
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 229683200 bytes
Fixed Size 2286800 bytes
Variable Size 171969328 bytes
Database Buffers 50331648 bytes
Redo Buffers 5095424 bytes
Now Standby Databse in nomount stage with create spfile .
Primary Database:
Check the tnsping from Primary to StandBy database:
bash-3.2$ tnsping STBY12c
TNS Ping Utility for Solaris: Version 12.1.0.2.0 - Production on 16-MAY-2015 13:55:33
Copyright (c) 1997, 2014, Oracle. All rights reserved.
Used parameter files:
/export/home/oracle/product/12.2.0/db_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.13)(PORT =
1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DB12c)))
OK (40 msec)
Connect to Primary and auxiliary connection to Standby
bash-3.2$ rman target sys/sys auxiliary sys/sys123@STBY12c
Recovery Manager: Release 12.1.0.2.0 - Production on Sat May 16 13:54:46 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: DB12C (DBID=1333620530)
connected to auxiliary database: DB12C (not mounted)
This is the command we will run to create the Standby Database.
Note – since the data file names are not being changed on the standby database we need to include the
NOFILENAMECHECK
Run
{
allocate channel c1 type disk;
allocate channel c2 type disk;
allocate auxiliary channel aux type disk;
duplicate target database for standby from active database nofilenamecheck spfile
set log_archive_max_processes='8'
set db_unique_name='STBY12c'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(DB12c, STBY12c)'
set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles)
db_unique_name= STBY12c'
set log_Archive_dest_2='service=DB12c async noaffirm reopen=15 valid_for=(all_logfiles,primary_role)
db_unique_name=DB12c';
}
After the RMAN DUPLICATE command completes we now need to add the relevant parameters for the
redo log transport on the Primary database.
RMAN> alter system set standby_file_management='AUTO';
Statement processed
RMAN> alter system set log_archive_config='dg_config=( DB12c', STBY12c')';
Statement processed
RMAN> alter system set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST
valid_for=(all_logfiles,all_roles) db_unique_name= DB12c'';
Statement processed
RMAN> alter system set log_Archive_dest_2='service=condb1_dr async noaffirm reopen=15
valid_for=(all_logfiles,primary_role) db_unique_name= STBY12c ';
Statement processed
In StandBY Database
Since we have 3 online redo log file groups, we need to create (3+1) 4 Standby redo log file groups
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo01.log' size 50m;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo02.log' size 50m;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo03.log' size 50m;
Database altered.
SQL> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo04.log' size 50m;
Database altered.
On Primary
RMAN> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo01.log' size 50m;
Statement processed
RMAN> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo02.log' size 50m;
Statement processed
RMAN> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo03.log' size 50m;
Statement processed
RMAN> ALTER DATABASE ADD STANDBY LOGFILE
'/export/home/oracle/oradata/DB12C/standby_redo04.log' size 50m;
Statement processed
On Primary change the protection mode
RMAN> alter database set standby database to maximize availability;
Statement processed
NOW Testing is it OK or NOT
On the Standby database, the RMAN script which we ran from the primary database has not opened the
database and started managed recovery.
Let us now manually do it.
On Standby
SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
SQL> startup;
ORACLE instance started.
Total System Global Area 4275781632 bytes
Fixed Size 2296576 bytes
Variable Size 2214593792 bytes
Database Buffers 2046820352 bytes
Redo Buffers 12070912 bytes
Database mounted.
Database opened.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
2401331
To start the redo apply run this Standby database
recover managed standby database using current logfile disconnect;
SQL> recover managed standby database using current logfile disconnect;
Media recovery complete.
SQL> select current_scn from v$database;
CURRENT_SCN
-----------
2442377
SQL> !ps -ef |grep mrp
oracle 1173 1 4 14:30:24 ? 0:20 ora_mrp0_DB12c
oracle 1180 1113 0 14:32:39 pts/2 0:00 /bin/sh -c ps -ef |grep mrp
oracle 1181 1180 0 14:32:39 pts/2 0:00 grep mrp
SQL> select process,status,thread#,sequence#,blocks from v$managed_standby where process like
'%MRP%';
PROCESS STATUS THREAD# SEQUENCE# BLOCKS
--------- ------------ ---------- ---------- ----------
MRP0 APPLYING_LOG 1 10 102400
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB12C MOUNTED
SQL> alter pluggable database all open read only;
Pluggable database altered.
SQL> select name,open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB12C READ ONLY
For Pluggable Database need to Entry in TNSNAME.ORA for both primary and Standby Database.
Standby Database:
STPDB12C=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PDB12C)
(UR = A)
)
)
Primary Database:
PDB12C =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = Solaris12c)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = PDB12C)
)
)
On Primary Database
SQL> conn uzzal/basak@PDB12C
Connected.
SQL> select * from tab;
no rows selected
SQL> create table pp (no number(2));
Table created.
SQL> insert into pp values (1);
1 row created.
SQL> select * from pp;
NO
----------
1
SQL> commit;
Commit complete.
Check in Standby Database:
SQL> conn uzzal/basak@STPDB12C
Connected.
SQL> select * from pp;
NO
----------
1
Last Part Of the Data Guard is Maintaince of DataGuard :
To start the redo apply Run this
recover managed standby database using current logfile disconnect;
To Stop the redo apply Run below command
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> !ps -ef |grep mrp
oracle 1236 1224 0 15:05:25 pts/2 0:00 /bin/sh -c ps -ef |grep mrp
oracle 1237 1236 0 15:05:25 pts/2 0:00 grep mrp
SQL> select process,status,thread#,sequence#,blocks from v$managed_standby where process like
'%MRP%';
no rows selected
And Start the Redo Apply and Enjoy the Beauty of Data Guard in 12c
recover managed standby database using current logfile disconnect;
Reference Link
http://gavinsoorma.com/2013/11/creating-an-oracle-12c-data-guard-active-standby-database/

Weitere ähnliche Inhalte

Was ist angesagt?

Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery ProcedureAnar Godjaev
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman scriptMaris Elsins
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAXoom Trainings
 
Real-Time Query for Data Guard
Real-Time Query for Data Guard Real-Time Query for Data Guard
Real-Time Query for Data Guard Uwe Hesse
 
Active dataguard
Active dataguardActive dataguard
Active dataguardManoj Kumar
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2Mario Redón Luz
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and ArchitectureSidney Chen
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresJakkrapat S.
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesDeiby Gómez
 
10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaperYury Velikanov
 
Oracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam BashaOracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam Bashapasalapudi123
 
Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application clusterSatishbabu Gunukula
 
Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Emre Baransel
 
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksCloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksScott Jenner
 
Dba 3+ exp qus
Dba 3+ exp qusDba 3+ exp qus
Dba 3+ exp quskrreddy21
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)Gustavo Rene Antunez
 

Was ist angesagt? (20)

Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
Oracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIAOracle DataGuard Online Training in USA | INDIA
Oracle DataGuard Online Training in USA | INDIA
 
Real-Time Query for Data Guard
Real-Time Query for Data Guard Real-Time Query for Data Guard
Real-Time Query for Data Guard
 
Active dataguard
Active dataguardActive dataguard
Active dataguard
 
High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2High Availability And Oracle Data Guard 11g R2
High Availability And Oracle Data Guard 11g R2
 
Data Guard Architecture & Setup
Data Guard Architecture & SetupData Guard Architecture & Setup
Data Guard Architecture & Setup
 
153 Oracle dba interview questions
153 Oracle dba interview questions153 Oracle dba interview questions
153 Oracle dba interview questions
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Oracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New FeaturesOracle Database 12.1.0.2: New Features
Oracle Database 12.1.0.2: New Features
 
10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper10 Problems with your RMAN backup script - whitepaper
10 Problems with your RMAN backup script - whitepaper
 
Oracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam BashaOracle12c data guard farsync and whats new - Nassyam Basha
Oracle12c data guard farsync and whats new - Nassyam Basha
 
Convert single instance to RAC
Convert single instance to RACConvert single instance to RAC
Convert single instance to RAC
 
Understand oracle real application cluster
Understand oracle real application clusterUnderstand oracle real application cluster
Understand oracle real application cluster
 
Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012
 
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And TricksCloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
Cloug Troubleshooting Oracle 11g Rac 101 Tips And Tricks
 
Dba 3+ exp qus
Dba 3+ exp qusDba 3+ exp qus
Dba 3+ exp qus
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
 

Andere mochten auch

Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentationVimlendu Kumar
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cuzzal basak
 
Oracle Audit vault
Oracle Audit vaultOracle Audit vault
Oracle Audit vaultuzzal basak
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
Oracle table partition step
Oracle table partition stepOracle table partition step
Oracle table partition stepuzzal basak
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Documentuzzal basak
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Ludovico Caldara
 
Encrypt and decrypt in solaris system
Encrypt and decrypt in solaris systemEncrypt and decrypt in solaris system
Encrypt and decrypt in solaris systemuzzal basak
 
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015Digital Accessibility: Tips From the Met App Case Study @ MCN 2015
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015Liz Filardi
 
SoloLoyalty Programmes
SoloLoyalty ProgrammesSoloLoyalty Programmes
SoloLoyalty ProgrammesSoloten
 
Yury chemerkin _cyber_crime_forum_2012
Yury chemerkin _cyber_crime_forum_2012Yury chemerkin _cyber_crime_forum_2012
Yury chemerkin _cyber_crime_forum_2012STO STRATEGY
 
Blackberry playbook – new challenges
Blackberry playbook – new challengesBlackberry playbook – new challenges
Blackberry playbook – new challengesSTO STRATEGY
 
Аутсорсинг маркетинга
Аутсорсинг маркетингаАутсорсинг маркетинга
Аутсорсинг маркетингаSoloten
 
Korean joseki-dictionary
Korean joseki-dictionaryKorean joseki-dictionary
Korean joseki-dictionaryvietgohn
 
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...GTestClub
 
EmakumeEkin en Be the Change
EmakumeEkin en Be the ChangeEmakumeEkin en Be the Change
EmakumeEkin en Be the ChangeEmakumeEkin
 
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...GTestClub
 

Andere mochten auch (20)

Dataguard presentation
Dataguard presentationDataguard presentation
Dataguard presentation
 
Schema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12cSchema replication using oracle golden gate 12c
Schema replication using oracle golden gate 12c
 
Oracle Audit vault
Oracle Audit vaultOracle Audit vault
Oracle Audit vault
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
Oracle table partition step
Oracle table partition stepOracle table partition step
Oracle table partition step
 
EMC Networker installation Document
EMC Networker installation DocumentEMC Networker installation Document
EMC Networker installation Document
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
 
Encrypt and decrypt in solaris system
Encrypt and decrypt in solaris systemEncrypt and decrypt in solaris system
Encrypt and decrypt in solaris system
 
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015Digital Accessibility: Tips From the Met App Case Study @ MCN 2015
Digital Accessibility: Tips From the Met App Case Study @ MCN 2015
 
SoloLoyalty Programmes
SoloLoyalty ProgrammesSoloLoyalty Programmes
SoloLoyalty Programmes
 
Yury chemerkin _cyber_crime_forum_2012
Yury chemerkin _cyber_crime_forum_2012Yury chemerkin _cyber_crime_forum_2012
Yury chemerkin _cyber_crime_forum_2012
 
Blackberry playbook – new challenges
Blackberry playbook – new challengesBlackberry playbook – new challenges
Blackberry playbook – new challenges
 
Аутсорсинг маркетинга
Аутсорсинг маркетингаАутсорсинг маркетинга
Аутсорсинг маркетинга
 
Korean joseki-dictionary
Korean joseki-dictionaryKorean joseki-dictionary
Korean joseki-dictionary
 
Love
Love Love
Love
 
Slide nahu (2)
Slide nahu (2)Slide nahu (2)
Slide nahu (2)
 
23 verdades de la vida
23 verdades de la vida23 verdades de la vida
23 verdades de la vida
 
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...
Grammarly Test Club#2. Выступление Василия Кривоноса (VostokVenutes): "Тестир...
 
EmakumeEkin en Be the Change
EmakumeEkin en Be the ChangeEmakumeEkin en Be the Change
EmakumeEkin en Be the Change
 
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...
Grammarly Test Club#1. Выступление Гали Братчик (Grammarly): "Тестирование лю...
 

Ähnlich wie Oracle data guard configuration in 12c

Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Featuresxiangrong
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4uzzal basak
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission processK Kumar Guduru
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_pptmaclean liu
 
Oracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create DatabaseOracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create DatabaseMonowar Mukul
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docLucky Ally
 
Pluggable database tutorial
Pluggable database tutorialPluggable database tutorial
Pluggable database tutorialOsama Mustafa
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneDeepti Singh
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GN/A
 
Enable archivelod mode in oracle rac12cR1 with asm location
Enable archivelod mode  in oracle rac12cR1 with asm locationEnable archivelod mode  in oracle rac12cR1 with asm location
Enable archivelod mode in oracle rac12cR1 with asm locationDebasish Nayak
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby databaseJorge Batista
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2Osama Mustafa
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfAlireza Kamrani
 
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1Raheel Syed
 

Ähnlich wie Oracle data guard configuration in 12c (20)

Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
Data Guard New Features
Data Guard New FeaturesData Guard New Features
Data Guard New Features
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission process
 
oracle dba
oracle dbaoracle dba
oracle dba
 
2011 384 hackworth_ppt
2011 384 hackworth_ppt2011 384 hackworth_ppt
2011 384 hackworth_ppt
 
Oracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create DatabaseOracle 12cR2 RAC Database Software Installation and Create Database
Oracle 12cR2 RAC Database Software Installation and Create Database
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
Rac nonrac clone
Rac nonrac cloneRac nonrac clone
Rac nonrac clone
 
Pluggable database tutorial
Pluggable database tutorialPluggable database tutorial
Pluggable database tutorial
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
Oracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid cloneOracle applications 11i hot backup cloning with rapid clone
Oracle applications 11i hot backup cloning with rapid clone
 
FIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11GFIXING BLOCK CORRUPTION (RMAN) on 11G
FIXING BLOCK CORRUPTION (RMAN) on 11G
 
Enable archivelod mode in oracle rac12cR1 with asm location
Enable archivelod mode  in oracle rac12cR1 with asm locationEnable archivelod mode  in oracle rac12cR1 with asm location
Enable archivelod mode in oracle rac12cR1 with asm location
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Pluggable database tutorial 2
Pluggable database tutorial 2Pluggable database tutorial 2
Pluggable database tutorial 2
 
Broker otw.pptx
Broker otw.pptxBroker otw.pptx
Broker otw.pptx
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
 
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
Upgrade 10204-to-10205 on-2-node_rac_linux_x86_64_detail-steps_v0.1
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Oracle data guard configuration in 12c

  • 1. Oracle Data Guard Configuration in 12c This note examines how to create an Oracle 12.1.0.2.0 physical standby Active Data Guard database using the RMAN DUPLICATE FROM ACTIVE command. We will be creating the data guard configuration in a 12c Container Database. IN 12c Data Guard is set up at the Container level and not the individual Pluggable database level as the redo log files only belong to the Container database and the individual pluggable databases do not have their own online redo log files. The platform Solaris 10 and the primary database db_unique_name is DB12c and the db_unique_name of the Active Standby database is STBY12c. Primary Database Standby Database DB Name DB12C DB12C DB unique Name DB12C STBY12c IP and Hostname 172.31.36.12 (Solaris12c) 172.31.36.13 (SolarisST) Let us look at the steps involved. Change the cat /etc/hosts for both Primary and Standby Database Machine, Thats why they can know Each other both IP address and HostName. hosts_standby hosts_primary On Primary Enable the Archive Log: SQL> select log_mode from v$database; LOG_MODE ------------ ARCHIVELOG
  • 2. ** Please Increase The db_recovery_file_dest_size atleast 5G , by default it’s less than 1G which is fillup in any time. Enable the Force Logging SQL> alter database force logging; Database altered. SQL> select FORCE_LOGGING from v$database; FORCE_LOGGING --------------------------------------- YES On Standby Create the required directory structure It’s important cause when we restore RMAN backup , at that time if appropriate directory is not created then you got error in restore. Technique : 1. Find the location of ADUMP path of Primary database and create the same things in Standby database. SQL> show parameter audit_file NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ audit_file_dest string /export/home/oracle/admin/DB12c/adump So you must create below folder in Standby database $ mkdir -p export/home/oracle/admin/DB12c/adump 2. Find the Location of db_recovery_file_dest in Primary Database and create same directory in Standby database. SQL> show parameter DB_Recove
  • 3. NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_recovery_file_dest string /export/home/oracle/fast_recovery_area db_recovery_file_dest_size big integer 3G So must create below folder in Standby Database $ mkdir -p /export/home/oracle/fast_recovery_area 3. Check The control file location in Primary Database and create same folder in Standby database. SQL> show parameter control NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ control_file_record_keep_time integer 7 control_files string /export/home/oracle/oradata/DB12C/controlfile/o1_mf_bo5tnjkh_.ctl, /export/home/oracle/fast_recovery_area/DB12C/controlfile/o1_mf_bo5tnl4q_.ctl control_management_pack_access string DIAGNOSTIC+TUNING So create the control file location in Standby Database $ mkdir -p /export/home/oracle/oradata/DB12C/controlfile $ mkdir -p /export/home/oracle/fast_recovery_area/DB12C/controlfile 4. Check the datafile location and logfile location on Primary Database and create same folder in Standby Database. SQL> select name from v$datafile; /export/home/oracle/oradata/DB12C/datafile/o1_mf_system_bo5tgrz1_.dbf .... .... SQL> select member from v$logfile; /export/home/oracle/oradata/DB12C/onlinelog/o1_mf_3_bo5tohpf_.log /export/home/oracle/fast_recovery_area/DB12C/onlinelog/o1_mf_3_bo5tonq9_.log ..... ..... $ mkdir -p /export/home/oracle/oradata/DB12C/datafile $ mkdir -p /export/home/oracle/oradata/DB12C/onlinelog $ mkdir -p /export/home/oracle/fast_recovery_area/DB12C/onlinelog
  • 4. Primary Database Copy the password file from primary to standby $ scp -rp orapwo12c oracle@172.31.36.13:/export/home/oracle/product/12.2.0/db_1/dbs oracle@orasql-001-test's password: orapwo12c 100% 7680 7.5KB/s 00:00 StandBy Database On Standby Add a static entry in the listener.ora for STBY12c # listener.ora Network Configuration File: /export/home/oracle/product/12.2.0/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = DB12c) (ORACLE_HOME = /export/home/oracle/product/12.2.0/db_1) (SID_NAME = DB12c) ) ) listener_Standby.ora Reload the listener $ lsnrctl reload LISTENER Create spfile for StandBY database input Single one line spfileDB12c.ora
  • 5. *.db_name=DB12c Add an entry in the oratab file which location of /export/home/oracle/product/12.2.0/db_1/install/oratab DB12c:/export/home/oracle/product/12.2.0/db_1:N bash-3.2$ cat /export/home/oracle/product/12.2.0/db_1/install/oratab DB12c:/export/home/oracle/product/12.2.0/db_1:N Edit The TNSNAME.ORA in Standby database. DB12C = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.12)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DB12c) (UR = A) ) ) STBY12c = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = STBY12C) (UR = A) ) ) tnsnames_Standby.ora Primary Database TNSNAMES.ORA Change STBY12c = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.13)(PORT = 1521))
  • 6. (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DB12c) ) ) tnsnames_Primary.ora On Standby Start the Standby instance in NOMOUNT mode Run the .profile where we mention ORACLE_SID=DB12c .profile bash-3.2$ . ./.profile bash-3.2$ sqlplus SQL*Plus: Release 12.1.0.2.0 Production on Sat May 16 13:47:30 2015 Copyright (c) 1982, 2014, Oracle. All rights reserved. Enter user-name: sys as sysdba Enter password: Connected to an idle instance. SQL> startup nomount; ORACLE instance started. Total System Global Area 229683200 bytes Fixed Size 2286800 bytes Variable Size 171969328 bytes Database Buffers 50331648 bytes Redo Buffers 5095424 bytes Now Standby Databse in nomount stage with create spfile .
  • 7. Primary Database: Check the tnsping from Primary to StandBy database: bash-3.2$ tnsping STBY12c TNS Ping Utility for Solaris: Version 12.1.0.2.0 - Production on 16-MAY-2015 13:55:33 Copyright (c) 1997, 2014, Oracle. All rights reserved. Used parameter files: /export/home/oracle/product/12.2.0/db_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.31.36.13)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DB12c))) OK (40 msec) Connect to Primary and auxiliary connection to Standby bash-3.2$ rman target sys/sys auxiliary sys/sys123@STBY12c Recovery Manager: Release 12.1.0.2.0 - Production on Sat May 16 13:54:46 2015 Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved. connected to target database: DB12C (DBID=1333620530) connected to auxiliary database: DB12C (not mounted) This is the command we will run to create the Standby Database. Note – since the data file names are not being changed on the standby database we need to include the NOFILENAMECHECK Run {
  • 8. allocate channel c1 type disk; allocate channel c2 type disk; allocate auxiliary channel aux type disk; duplicate target database for standby from active database nofilenamecheck spfile set log_archive_max_processes='8' set db_unique_name='STBY12c' set standby_file_management='AUTO' set log_archive_config='dg_config=(DB12c, STBY12c)' set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles) db_unique_name= STBY12c' set log_Archive_dest_2='service=DB12c async noaffirm reopen=15 valid_for=(all_logfiles,primary_role) db_unique_name=DB12c'; } After the RMAN DUPLICATE command completes we now need to add the relevant parameters for the redo log transport on the Primary database. RMAN> alter system set standby_file_management='AUTO'; Statement processed RMAN> alter system set log_archive_config='dg_config=( DB12c', STBY12c')'; Statement processed RMAN> alter system set log_archive_dest_1='location=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,all_roles) db_unique_name= DB12c''; Statement processed RMAN> alter system set log_Archive_dest_2='service=condb1_dr async noaffirm reopen=15 valid_for=(all_logfiles,primary_role) db_unique_name= STBY12c '; Statement processed In StandBY Database Since we have 3 online redo log file groups, we need to create (3+1) 4 Standby redo log file groups SQL> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo01.log' size 50m; Database altered. SQL> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo02.log' size 50m; Database altered.
  • 9. SQL> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo03.log' size 50m; Database altered. SQL> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo04.log' size 50m; Database altered. On Primary RMAN> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo01.log' size 50m; Statement processed RMAN> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo02.log' size 50m; Statement processed RMAN> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo03.log' size 50m; Statement processed RMAN> ALTER DATABASE ADD STANDBY LOGFILE '/export/home/oracle/oradata/DB12C/standby_redo04.log' size 50m; Statement processed On Primary change the protection mode RMAN> alter database set standby database to maximize availability; Statement processed NOW Testing is it OK or NOT On the Standby database, the RMAN script which we ran from the primary database has not opened the database and started managed recovery.
  • 10. Let us now manually do it. On Standby SQL> shutdown immediate; ORA-01109: database not open Database dismounted. SQL> startup; ORACLE instance started. Total System Global Area 4275781632 bytes Fixed Size 2296576 bytes Variable Size 2214593792 bytes Database Buffers 2046820352 bytes Redo Buffers 12070912 bytes Database mounted. Database opened. SQL> select current_scn from v$database; CURRENT_SCN ----------- 2401331 To start the redo apply run this Standby database recover managed standby database using current logfile disconnect; SQL> recover managed standby database using current logfile disconnect; Media recovery complete. SQL> select current_scn from v$database; CURRENT_SCN ----------- 2442377 SQL> !ps -ef |grep mrp oracle 1173 1 4 14:30:24 ? 0:20 ora_mrp0_DB12c oracle 1180 1113 0 14:32:39 pts/2 0:00 /bin/sh -c ps -ef |grep mrp oracle 1181 1180 0 14:32:39 pts/2 0:00 grep mrp
  • 11. SQL> select process,status,thread#,sequence#,blocks from v$managed_standby where process like '%MRP%'; PROCESS STATUS THREAD# SEQUENCE# BLOCKS --------- ------------ ---------- ---------- ---------- MRP0 APPLYING_LOG 1 10 102400 SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB12C MOUNTED SQL> alter pluggable database all open read only; Pluggable database altered. SQL> select name,open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY PDB12C READ ONLY For Pluggable Database need to Entry in TNSNAME.ORA for both primary and Standby Database. Standby Database: STPDB12C= (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = SolarisST)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PDB12C) (UR = A) ) )
  • 12. Primary Database: PDB12C = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = Solaris12c)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = PDB12C) ) ) On Primary Database SQL> conn uzzal/basak@PDB12C Connected. SQL> select * from tab; no rows selected SQL> create table pp (no number(2)); Table created. SQL> insert into pp values (1); 1 row created. SQL> select * from pp; NO ---------- 1 SQL> commit; Commit complete. Check in Standby Database: SQL> conn uzzal/basak@STPDB12C Connected.
  • 13. SQL> select * from pp; NO ---------- 1 Last Part Of the Data Guard is Maintaince of DataGuard : To start the redo apply Run this recover managed standby database using current logfile disconnect; To Stop the redo apply Run below command ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL; SQL> !ps -ef |grep mrp oracle 1236 1224 0 15:05:25 pts/2 0:00 /bin/sh -c ps -ef |grep mrp oracle 1237 1236 0 15:05:25 pts/2 0:00 grep mrp SQL> select process,status,thread#,sequence#,blocks from v$managed_standby where process like '%MRP%'; no rows selected And Start the Redo Apply and Enjoy the Beauty of Data Guard in 12c recover managed standby database using current logfile disconnect; Reference Link http://gavinsoorma.com/2013/11/creating-an-oracle-12c-data-guard-active-standby-database/