CONFIGURARE ORACLE BROKER 18C PER LA GESTIONE DEL PHYSICAL STANBY DATABASE
Primary (Cluster Database):
Operating System: Oracle Linux 7.6 (x64) (Red Hat Enterprise Linux Server release 7.6 )
Oracle Release: 18c (18.3.0.0.0)
Node(s): exa1node1, exa1node2
Database Name (DB_NAME): TREVDB1N
Database Unique Name (DB_UNIQUE_NAME): TREVDB1N
Instances: TREVDB1N1, TREVDB1N2
SCAN Name: exa1node-scan
Diskgroup(s): +OCR, +DATI, +RECO
Standby (Cluster Database):
Operating System:Oracle Linux 7.6 (x64) (Red Hat Enterprise Linux Server release 7.6 )
Oracle Release: 12c (12.1.0.2)
Node(s): exa2node1, exa2node2
Database Name (DB_NAME): TREVDB1N
Database Unique Name (DB_UNIQUE_NAME): TREVDB2N
Instances: TREVDB2N1, TREVDB2N2
SCAN Name: exa2node-scan
Diskgroup(s): +DG_OCR, +DG_DATI, +DG_RECO
LISTENERS ON ALL FOUR NODES CONFIGURED TO
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = TREVDB1N1)
(GLOBAL_DBNAME=TREVDB1N_DGMGRL)
(ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = TREVDB1N2)
(GLOBAL_DBNAME=TREVDB1N_DGMGRL)
(ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = TREVDB2N1)
(GLOBAL_DBNAME=TREVDB2N_DGMGRL)
(ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = TREVDB2N2)
(GLOBAL_DBNAME=TREVDB2N_DGMGRL)
(ORACLE_HOME=/u01/app/oracle/product/18.3.0/db_1)
)
)
ON NODE EXA1NODE1(PRIMARY)
[oracle@exa1node1 ~]$ dgmgrl
DGMGRL for Linux: Release 18.0.0.0.0 – Production on Sun Apr 28 18:59:12 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle and/or its affiliates. All rights reserved.
Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/xxxxx_xxx@TREVDB1N;
Connected to “TREVDB1N”
Connected as SYSDBA.
CREATE CONFIGURATION dg_TREVDB AS PRIMARY DATABASE IS TREVDB1N CONNECT IDENTIFIER IS TREVDB1N;
ADD DATABASE TREVDB2N AS CONNECT IDENTIFIER IS TREVDB2N MAINTAINED AS PHYSICAL;
DGMGRL> show configuration
Configuration – dg_trevdb
Protection Mode: MaxPerformance
Members:
trevdb1n – Primary database
trevdb2n – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 82 seconds ago)
DGMGRL> show database trevdb1n
Database – trevdb1n
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
TREVDB1N1
TREVDB1N2
Database Status:
SUCCESS
DGMGRL> show database trevdb2n;
Database – trevdb2n
Role: PHYSICAL STANDBY
Intended State: APPLY-ON
Transport Lag: 0 seconds (computed 1 second ago)
Apply Lag: 0 seconds (computed 1 second ago)
Average Apply Rate: 3.00 KByte/s
Real Time Query: ON
Instance(s):
TREVDB2N1 (apply instance)
TREVDB2N2
Database Status:
SUCCESS
DGMGRL> show configuration verbose
Configuration – dg_trevdb
Protection Mode: MaxPerformance
Members:
trevdb1n – Primary database
trevdb2n – Physical standby database
Properties:
FastStartFailoverThreshold = ’30’
OperationTimeout = ’30’
TraceLevel = ‘USER’
FastStartFailoverLagLimit = ’30’
CommunicationTimeout = ‘180’
ObserverReconnect = ‘0’
FastStartFailoverAutoReinstate = ‘TRUE’
FastStartFailoverPmyShutdown = ‘TRUE’
BystandersFollowRoleChange = ‘ALL’
ObserverOverride = ‘FALSE’
ExternalDestination1 = ”
ExternalDestination2 = ”
PrimaryLostWriteAction = ‘CONTINUE’
ConfigurationWideServiceName = ‘TREVDB1N_CFG’
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
CREATE A TABLESPACE AND A TABLE AND VERIFY IF CHANGES WERE PROPAGATED TO THE STANDBY NODE
oracle@exa1node1 ~$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 – Production on Sun Apr 28 19:17:00 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 – Production
Version 18.3.0.0.0
SQL> create tablespace TEST1 datafile ‘+DATI’ size 100m autoextend on next 100m maxsize unlimited;
Creata tablespace.
SQL> create table test_tab (campo1 int,campo2 varchar(10), data date) tablespace TEST1;
Tabella creata.
SQL> alter system switch logfile;
Modificato sistema.
SQL> insert into test_tab values(3,’testing dg’,sysdate);
Creata 1 riga.
SQL> commit;
Commit completato.
SQL> set linesize 200 pagesize 200
col name format a50
select file#,a.name,b.name from v$datafile a, v$tablespace b where a.ts#=b.ts# order by 1;
SQL> SQL>
FILE# NAME NAME
1 +DATI/TREVDB1N/DATAFILE/system.259.1005506119 SYSTEM
-> 2 +DATI/TREVDB1N/DATAFILE/test1.279.1006800447 TEST1 <-
3 +DATI/TREVDB1N/DATAFILE/sysaux.260.1005506155 SYSAUX
4 +DATI/TREVDB1N/DATAFILE/undotbs1.261.1005506171 UNDOTBS1
5 +DATI/TREVDB1N/DATAFILE/undotbs2.267.1005506633 UNDOTBS2
7 +DATI/TREVDB1N/DATAFILE/users.262.1005506173 USERS
6 righe selezionate.
ON STANDBY NODE
$ sqlplus / as sysdba
SQL*Plus: Release 18.0.0.0.0 – Production on Sun Apr 28 19:13:19 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connesso a:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 – Production
Version 18.3.0.0.0
SQL> set linesize 200 pagesize 200
SQL> col name format a50
SQL> select file#,a.name,b.name from v$datafile a, v$tablespace b where a.ts#=b.ts# order by 1;
FILE# NAME NAME
1 +DG_DATI/TREVDB2N/DATAFILE/system.259.1005863263 SYSTEM
-> 2 +DG_DATI/TREVDB2N/DATAFILE/test1.278.1006800459 TEST1 <-
3 +DG_DATI/TREVDB2N/DATAFILE/sysaux.260.1005863271 SYSAUX
4 +DG_DATI/TREVDB2N/DATAFILE/undotbs1.261.1005863277 UNDOTBS1
5 +DG_DATI/TREVDB2N/DATAFILE/undotbs2.262.1005863281 UNDOTBS2
7 +DG_DATI/TREVDB2N/DATAFILE/users.263.1005863281 USERS
6 righe selezionate.