· Standby server is not worthy useless until disaster comes.
· Primary Server [user will only connected]
· Standby Server [Up to 32]
· Primary & Standby server are connected through Network.
· Failure Activity - Convert standby server as primary server.
· If you create a table internally generate archive log then archive log are shipping from primary to standby through network.
· On primary, LNSn process captures redo from redo log buffer (or from redo log files if written quickly by LGWR process) and then sends it to RFS process on Standby database through Oracle net. Once RFS process writes redo to standby redo log files it will be applied on standby database through MRP process.
· Managed Recovery Process (MRP) will applied (execute) changes to the database.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.73.134 primary.shohan.com primary
192.168.73.135 standby.shohan.com standby
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.73.134 primary.shohan.com primary
192.168.73.135 standby.shohan.com standby
SQL> alter database force logging;
GROUP# THREAD# SEQUENCE# BYTES/1024/1024 MEMBERS STATUS
---------- ---------- ---------- --------------- ---------- ----------------
1 1 4 200 1 INACTIVE
2 1 5 200 1 ACTIVE
3 1 6 200 1 CURRENT
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/MAXCDB/redo03.log
/u01/app/oracle/oradata/MAXCDB/redo02.log
/u01/app/oracle/oradata/MAXCDB/redo01.log
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 5 '/u01/app/oracle/oradata/MAXCDB/redo05.log' SIZE 200M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 6 '/u01/app/oracle/oradata/MAXCDB/redo06.log' SIZE 200M;
ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 7 '/u01/app/oracle/oradata/MAXCDB/redo07.log' SIZE 200M;
SQL> show parameter db_name
TYPE VALUE NAME
----------- ----------- -----------
db_name string maxcdb
SQL> show parameter db_unique_name
TYPE VALUE NAME
--------------- ------------ -----------
db_unique_name string maxcdb
SQL> alter system set remote_login_passwordfile='EXCLUSIVE' scope=spfile;
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = maxcdb)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = maxcdb)
)
(SID_DESC =
(GLOBAL_DBNAME = maxpdb)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = maxpdb)
)
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxcdb)
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.135)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxcdb)
)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxpdb)
)
)
oracle@primary admin]$ lsnrctl start
Copyright (c) 1997, 2019, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = primary.shohan.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = maxcdb)))
OK (0 msec)
Copyright (c) 1997, 2019, Oracle. All rights reserved.
Used parameter files:
/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.135)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = maxcdb)))
TNS-12541: TNS:no listener
ECDSA key fingerprint is SHA256:zZ7IkyYbrgaYCI/gMmp1C68FqwMahKMcMniTfaG/BcY.
ECDSA key fingerprint is MD5:9f:eb:77:48:d9:f9:0a:f1:40:e7:d7:9d:1e:5c:69:8e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.73.134' (ECDSA) to the list of known hosts.
oracle@192.168.73.135's password:
listener.ora 100% 614 607.7KB/s 00:00
tnsnames.ora 100% 792 850.0KB/s 00:00
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0
ECDSA key fingerprint is SHA256:zZ7IkyYbrgaYCI/gMmp1C68FqwMahKMcMniTfaG/BcY.
ECDSA key fingerprint is MD5:9f:eb:77:48:d9:f9:0a:f1:40:e7:d7:9d:1e:5c:69:8e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.73.135' (ECDSA) to the list of known hosts.
oracle@192.168.73.135's password:
initmaxcdb.ora 100% 1443 597.8KB/s 00:00
orapwmaxcdb 100% 2048 1.1MB/s 00:00
[oracle@primary dbs]$
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = maxcdb)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = maxcdb)
)
(SID_DESC =
(GLOBAL_DBNAME = maxpdb)
(ORACLE_HOME = /u01/app/oracle/product/19.0.0/dbhome_1)
(SID_NAME = maxpdb)
)
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.135)(PORT = 1521))
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxcdb)
)
)
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.135)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxcdb)
)
)
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.134)(PORT = 1521))
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.73.135)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = maxpdb)
)
)
*.audit_trail='db'
*.compatible='19.0.0'
*.control_files='/u01/app/oracle/oradata/MAXCDB/control01.ctl','/u01/app/oracle/fast_recovery_area/MAXCDB/control02.ctl'
*.db_block_size=8192
*.db_name='maxcdb'
*.db_unique_name='stand'
*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=12732m
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=maxcdbXDB)'
*.enable_pluggable_database=true
*.fal_server='maxcdb'
*.local_listener='LISTENER_MAXCDB'
*.log_archive_config='dg_config=(maxcdb,stand)'
*.log_archive_dest_2='service=maxcdb async noaffirm reopen=15 valid_for=(all_logfiles,primary_role) db_unique_name=maxcdb'
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=578m
*.processes=300
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1732m
*.standby_file_management='AUTO'
*.undo_tablespace='UNDOTBS1'
[oracle@standby dbs]$ mkdir -p /u01/app/oracle/fast_recovery_area/MAXCDB/
[oracle@standby dbs]$ mkdir -p /u01/app/oracle/oradata/MAXCDB/
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle. All rights reserved.
Connected to an idle instance.
Total System Global Area 1828714320 bytes
Fixed Size 9135952 bytes
Variable Size 436207616 bytes
Database Buffers 1375731712 bytes
Redo Buffers 7639040 bytes
Total System Global Area 1828714320 bytes
Fixed Size 9135952 bytes
Variable Size 436207616 bytes
Database Buffers 1375731712 bytes
Redo Buffers 7639040 bytes
Version 19.3.0.0.0
Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
connected to auxiliary database: MAXCDB (not mounted)
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=7 device type=DISK
contents of Memory Script:
{
backup as copy reuse
passwordfile auxiliary format '/u01/app/oracle/product/19.0.0/dbhome_1/dbs/orapwmaxcdb' ;
}
executing Memory Script
input datafile copy RECID=13 STAMP=1176585386 file name=/u01/app/oracle/oradata/MAXCDB/maxpdb/undotbs01.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=14 STAMP=1176585386 file name=/u01/app/oracle/oradata/MAXCDB/maxpdb/users01.dbf
Finished Duplicate Db at 09-AUG-24
--------- -------------------- ---------------- ----------------
MAXCDB MOUNTED PHYSICAL STANDBY maxcdb
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 1828714320 bytes
Fixed Size 9135952 bytes
Variable Size 436207616 bytes
Database Buffers 1375731712 bytes
Redo Buffers 7639040 bytes
Database mounted.
Database opened.
--------- -------------------- ---------------- ----------------
MAXCDB READ ONLY PHYSICAL STANDBY maxcdb
--------- -------------------- ---------------- ----------------
MAXCDB READ ONLY WITH APPLY PHYSICAL STANDBY maxcdb
----------------------------- ------------------------------------------- --------------------
10 10 0
Tags
ADG