Oracle 19c Rac Veri Tabanı Standalone Dataguard Kurulumu
Primary |
Standby |
|
Database Version |
19.3.0 |
19.3.0 |
Database Name |
orcl |
orcl |
Database Uniqname |
orcl1 orcl2 |
orcldg |
Ip |
192.168.56.191 192.168.56.192 |
192.168.56.119 |
Lıstener Port |
1521 |
1521 |
Os |
Oel 7.9 |
Oel 7.9 |
Rac node’larında ve dataguard nodu üzerinde /etc/hosts dosyasının guncellenmesi
# Private 172.168.56.191 rac191-priv.localdomain rac191-priv 172.168.56.192 rac192-priv.localdomain rac192-priv # Public 192.168.56.191 rac191.localdomain rac191 192.168.56.192 rac192.localdomain rac192 # Virtual 192.168.56.194 rac191-vip.localdomain rac191-vip 192.168.56.195 rac192-vip.localdomain rac192-vip # SCAN 192.168.56.196 rac19-scan.localdomain rac19-scan 192.168.56.197 rac19-scan.localdomain rac19-scan 192.168.56.198 rac19-scan.localdomain rac19-scan 192.168.56.119 dg19c.localdomain dg19c 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 |
Primary Database
alter system set log_archive_dest_2=’service=”(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg19c.localdomain)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcldg)(SERVER=DEDICATED)))”‘,’ASYNC NOAFFIRM delay=0 optional compression=disable max_failure=0 max_connections=1 reopen=300 db_unique_name=”orcl” net_timeout=30′,’valid_for=(online_logfile,all_roles)’ scope=both sid=’*’; alter system set log_archive_dest_state_2=enable; alter system set log_archive_config=’DG_CONFIG=(orcl,orcldg)’ scope=both sid=’*’; alter system set remote_login_passwordfile=EXCLUSIVE scope=spfile ; alter system set fal_server=’orcldg’ scope=both sid=’*’; alter system set fal_client=’orcl’ scope=both sid=’*’; |
Primary Tnsnames.ora (Oracle Home > tnsnames.ora)
ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac19-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) ORCLDG = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = dg19c.localdomain)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = orcl) (GLOBAL_NAME = orcl) ) ) |
Orapworcl password dosyasının standby $ORACLE_HOME/dbs dizinine kopyalanması
scp orapworcl oracle@dg19c:/u01/app/oracle/product/19c/db_1/dbs |
Tnsnames.ora dosyasının standby veri tabanına kopyalanması
scp tnsnames.ora oracle@dg19c:/u01/app/oracle/product/19c/db_1/network/admin |
Standby Database
mkdir -p /u01/app/oracle/oradata/ORCL mkdir -p $ORACLE_BASE/admin/orcl/adump |
Listener Yaratma netca komutu ile
Standby Database
Listener.ora dosyası içine SID_LIST_LISTENER static parametresinin girilmesi
[oracle@dg19c ORCL]$ more /u01/app/oracle/product/19c/db_1/network/admin/listener.ora # listener.ora Network Configuration File: /u01/app/oracle/product/19c/db_1/network/admin/listener.ora # Generated by Oracle configuration tools. LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dg19c.localdomain)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = /u01/app/oracle/product/19c/db_1) (SID_NAME = orcl) ) ) ADR_BASE_LISTENER = /u01/app/oracle |
Standby Database
/u01/app/oracle/product/19c/db_1/dbs/initorcl.ora dosyasının yaratılması ve içeriği
*.db_name=’orcl’ *.DB_UNIQUE_NAME=’orcldg’ |
Veri tabanının nomount mode ile açılması
Primary Database
rman TARGET sys/welcome1@orcl AUXILIARY sys/welcome1@orcldg |
run { allocate channel prmy1 type disk; allocate channel prmy2 type disk; allocate channel prmy3 type disk; allocate channel prmy4 type disk; allocate auxiliary channel stby type disk; duplicate target database for standby from active database spfile set db_file_name_convert=’+DATA/ORCL/DATAFILE’,’/u01/app/oracle/oradata/ORCL’ set db_unique_name=’orcldg’ set cluster_database=’false’ set log_file_name_convert=’+DATA/ORCL/ONLINELOG’,’/u01/app/oracle/oradata/ORCL’ set control_files=’/u01/app/oracle/oradata/ORCL/control.ctl’ set fal_client=’orcldg’ set fal_server=’orcl’ set audit_file_dest=’/u01/app/oracle/admin/orcl/adump’ set log_archive_config=’dg_config=(orcl,orcldg)’ set log_archive_dest_1=’location=/u01/app/oracle/fast_recovery_area’ db_unique_name=orcldg’ set log_archive_dest_2=’service=orcl async valid_for=(online_logfiles,primary_role) db_unique_name=orcl’ set undo_tablespace=’UNDOTBS1′ nofilenamecheck; } |
İşlem başarılı bir şekilde bittikten sonra standby veri tabanında
alter database recover managed standby database disconnect from session; |
Son Durum