Oracle Database 19c Dataguard Kurulumu Rman Dublicate

Oracle Database 19c Dataguard Kurulumu Rman Dublicate

Primary

Standby

Database Version

19.3.0

19.3.0

Database Name

orcl

orcl

Database Uniqname

orcl

orcldg

Ip

192.168.56.19

192.168.56.20

Lıstener Port

1521

1521

Os

Oel 7.9

Oel 7.9

Primary Database

alter system set log_archive_dest_1=’LOCATION=/u01/app/oracle/arch’ scope=both; ALTER SYSTEM SET log_archive_format=’%t_%r_%s.arc’ SCOPE=spfile;

shutdown immediate;

startup mount;

alter database archivelog;

alter database force logging;

alter system set log_archive_config= ‘dg_config=(orcl,orcldg)’

alter system set log_archive_dest_2=’SERVICE=orcldg LGWR ASYNC VALID_FOR=(ONLINE_LOGFILE,PRIMARY_ROLE) DB_UNIQUE_NAME=orcldg’;

alter system set log_archive_max_processes=30;

alter system set remote_login_passwordfile=exclusive scope=spfile;

alter system set fal_server=orcldg;

alter system set standby_file_management=auto;

alter database add standby logfile (‘/u01/app/oracle/oradata/ORCL/standby_redo01.log’) size 50m;

alter database add standby logfile (‘/u01/app/oracle/oradata/ORCL/standby_redo01.log’) size 50m;

alter database add standby logfile (‘/u01/app/oracle/oradata/ORCL/standby_redo02.log’) size 50m;

alter database add standby logfile (‘/u01/app/oracle/oradata/ORCL/standby_redo03.log’) size 50m;

LISTENER.ORA

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = db19c.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

TNSNAMES.ORA

LISTENER_ORCL =

(ADDRESS = (PROTOCOL = TCP)(HOST = db19c.localdomain)(PORT = 1521))

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = db19c.localdomain)(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

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

/u01/app/oracle/product/19c/db_1/dbs/initorcl.ora dosyasının yaratılması ve içeriği

*.db_name=’orcl’

memory_target=1G

processes = 150

audit_file_dest=’/u01/app/oracle/admin/orcl/adump’

audit_trail =’db’

db_block_size=8192

db_domain=”

db_recovery_file_dest=’/u01/app/oracle/arch’

db_recovery_file_dest_size=2G

diagnostic_dest='<ORACLE_BASE>’

dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)’

open_cursors=300

remote_login_passwordfile=’EXCLUSIVE’

undo_tablespace=’UNDOTBS1′

# You may want to ensure that control files are created on separate physical

# devices

control_files = (ora_control1, ora_control2)

compatible =’11.2.0′

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 nofilenamecheck from active database

spfile

parameter_value_convert ‘ORCLDG’,’ORCL’

set db_unique_name=’orcldg’

set fal_client=’orcldg’

set fal_server=’orcl’

set standby_file_management=’MANUAL’

set log_archive_config=’dg_config=(orcl,orcldg)’

set log_archive_max_processes=’5′

set log_archive_config=’dg_config=(ORCL,ORCLDG)’

set log_archive_dest_2=’service=ORCL ASYNC valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=ORCL’;}

İşlem başarılı bir şekilde bittikten sonra standby veri tabanında

alter database recover managed standby database disconnect from session;

Son Durum

Bir cevap yazın

E-posta hesabınız yayımlanmayacak.