Вы находитесь на странице: 1из 3

GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS

FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME CON_ID


---------- ---------- ---------- ---------- ---------- ---------- ---
---------------- ------------- --------- ------------ --------- ----------
1 1 52 209715200 512 2 YES INACTIVE
1986167 25-NOV-18 2086657 26-NOV-18 0
2 1 53 209715200 512 2 NO CURRENT
2086657 26-NOV-18 1.8447E+19 0
3 1 51 209715200 512 2 YES INACTIVE
1984994 25-NOV-18 1986167 25-NOV-18 0

SQL>

GROUP# STATUS TYPE MEMBER IS_


CON_ID
---------- ------- ------- --------------------------------------------- ---
----------
1 ONLINE +DATA/CAT/ONLINELOG/group_1.276.992701611 NO
0
1 ONLINE +RECO/CAT/ONLINELOG/group_1.274.992701619 YES
0
2 ONLINE +DATA/CAT/ONLINELOG/group_2.277.992701611 NO
0
2 ONLINE +RECO/CAT/ONLINELOG/group_2.273.992701619 YES
0
3 ONLINE +DATA/CAT/ONLINELOG/group_3.278.992701627 NO
0
3 ONLINE +RECO/CAT/ONLINELOG/group_3.275.992701631 YES
0

6 rows selected.

alter database add standby logfile group 4 ('+DATA') SIZE 200M;


alter database add standby logfile group 5 ('+DATA') SIZE 200M;
alter database add standby logfile group 6 ('+DATA') SIZE 200M;

SQL> show parameter db_name

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
db_name string cat
SQL>

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
db_unique_name string cat
SQL>

SQL> alter system set log_archive_config='DG_CONFIG=(cat,sycat)';

System altered.
SQL> show parameter log_archive_dest_1

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
log_archive_dest_1 string location=+RECO/CAT/ARCHIVELOG
log_archive_dest_10 string
log_archive_dest_11 string
log_archive_dest_12 string
log_archive_dest_13 string
log_archive_dest_14 string
log_archive_dest_15 string
log_archive_dest_16 string
log_archive_dest_17 string
log_archive_dest_18 string
log_archive_dest_19 string

SQL> alter system set log_archive_dest_1='LOCATION=+RECO/CAT/ARCHIVELOG


VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=cat';

System altered.

SQL> show parameter log_archive_dest_2

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
log_archive_dest_2 string
log_archive_dest_20 string
log_archive_dest_21 string
log_archive_dest_22 string
log_archive_dest_23 string
log_archive_dest_24 string
log_archive_dest_25 string
log_archive_dest_26 string
log_archive_dest_27 string
log_archive_dest_28 string
log_archive_dest_29 string

SQL> alter system set log_archive_dest_2='SERVICE=sycat LGWR ASYNC


VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=sycat';

System altered.

SQL> alter system set fal_server=cat;

System altered.

SQL> alter system set fal_client=sycat;

System altered.

SQL> alter system set standby_file_management=auto;

System altered.
SQL> SQL> show parameter remote

NAME TYPE VALUE


------------------------------------ ----------- ------------------------------
remote_dependencies_mode string TIMESTAMP
remote_listener string racnode-scan:1521
remote_login_passwordfile string EXCLUSIVE
remote_os_authent boolean FALSE
remote_os_roles boolean FALSE
remote_recovery_file_dest string
result_cache_remote_expiration integer 0
SQL>

[oracle@racnode2 ~]$ mkdir /u01/app/oracle/admin/sycat


[oracle@racnode2 ~]$ mkdir /u01/app/oracle/admin/sycat/adump
[oracle@racnode2 ~]$ mkdir /u01/app/oracle/admin/sycat/bdump
[oracle@racnode2 ~]$ mkdir /u01/app/oracle/admin/sycat/dpdump
[oracle@racnode2 ~]$

run {
allocate channel t1 type disk;
allocate channel t2 type disk;
allocate channel prmy4 type disk;
allocate auxiliary channel stby type disk;

duplicate target database


for standby
from active database
dorecover
spfile
set db_unique_name='SYCAT'
set control_files='+DATA','+DATA'
set fal_client='cat'
set fal_server='sycat'
set standby_file_management='AUTO'
set log_archive_config='dg_config=(cat,sycat)'
set log_archive_dest_1='LOCATION=+RECO VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
DB_UNIQUE_NAME=SYCAT'
set log_archive_dest_2='service=cat ASYNC
valid_for=(ONLINE_LOGFILE,PRIMARY_ROLE) db_unique_name=CAT'
nofilenamecheck;
}