正德厚生,臻于至善

RFS没有运行

On Both
select protection_mode, protection_level from v$database;

On primary
SQL> select thread#, sequence#, status from v$log;

On standby
SQL> select thread#, max(sequence#) from v$archived_log where applied='YES' group by thread#;

   THREAD# MAX(SEQUENCE#)
---------- --------------
         1          62042
         2          62114

list backup of archivelog all;

run {
allocate channel ch00 type 'SBT_TAPE';
allocate channel ch01 type 'SBT_TAPE';
allocate channel ch02 type 'SBT_TAPE';
allocate channel ch03 type 'SBT_TAPE';
send 'NB_ORA_SERV=bzbackupvpra01,NB_ORA_CLIENT=bzerppprd01';
restore archivelog from sequence 62041 thread 1;
restore archivelog from sequence 62113 thread 2;
release channel ch00;
release channel ch01;
release channel ch02;
release channel ch03;
}

RMAN> CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;

new RMAN configuration parameters:
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
new RMAN configuration parameters are successfully stored

RMAN> 

On the Primary:
alter system set log_archive_dest_2='SERVICE=BZPRODX LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) COMPRESSION=ENABLE DB_UNIQUE_NAME=BZPRODX' scope=memory sid='*';
alter system set log_archive_config='DG_CONFIG=(BZPROD,BZPRODX)'  scope=memory sid='*';
###alter system set log_archive_dest_1='LOCATION=+BZPRODARCH  VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=BZPROD' scope=memory sid='*';

alter system set log_archive_dest_state_2=defer scope=memory sid='*';
alter system set log_archive_dest_state_2=enable scope=memory sid='*';

show parameter log_archive_dest_state_2;

select process,status,thread#,sequence#,block#,blocks from V$managed_standby order by 1,4;

select protection_mode,protection_level from v$database;
Maximum Availability	Maximum Performance		Maximum Protection
AFFIRM					NOAFFIRM				AFFIRM
SYNC					ASYNC					SYNC
DB_UNIQUE_NAME			DB_UNIQUE_NAME			DB_UNIQUE_NAME

alter database set standby database to maximize availability;
 
select machine, count(machine) from v$session group by machine order by count(machine) desc;
select count(*) from v$process;
show parameter processes

SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE {AVAILABILITY | PERFORMANCE | PROTECTION};

cd $ORACLE_HOME/dbs
orapwd file=$ORACLE_HOME/dbs/orapw$ORACLE_SID password=bzebs_2021 entries=5 force=y ignorecase=y

alter database recover managed standby database cancel;
alter database open read only;

alter database recover managed standby database cancel;
alter database recover managed standby database using current logfile disconnect from session;

alter database recover managed standby database cancel;
alter database recover managed standby database disconnect from session;

select * from gv$session
where username is not null and status = 'ACTIVE'
order by logon_time, sid;

set lines 160 pages 50000
col value for a100
col name for a30
select name, value
from v$parameter
where name in ('db_name','db_unique_name','log_archive_config', 'log_archive_dest_1','log_archive_dest_2','log_archive_dest_3','log_archive_dest_state_1','log_archive_dest_state_2','log_archive_dest_state_3', 'remote_login_passwordfile','log_archive_format','log_archive_max_processes','fal_server','fal_client','db_file_name_convert','log_file_name_convert','standby_file_management','redo_transport_user','db_create_file_dest','db_flashback_retention_target','db_recovery_file_dest','db_recovery_file_dest_size','control_files','control_file_record_keep_time') order by 1;

BZPROD
alter system set log_archive_config='DG_CONFIG=(BZPROD,BZPRODX)' scope=both sid='*';
alter system set log_archive_dest_1='LOCATION=+BZPRODARCH valid_for=(all_logfiles,all_roles) db_unique_name=BZPROD' scope=both sid='*';
alter system set log_archive_dest_2='SERVICE=BZPRODX LGWR ASYNC VALID_FOR=(all_logfiles,primary_role) COMPRESSION=ENABLE DB_UNIQUE_NAME=BZPRODX' scope=both sid='*';

BZPRODX
alter system set log_archive_config='DG_CONFIG=(BZPROD,BZPRODX)' scope=both sid='*';
alter system set log_archive_dest_1='LOCATION=+BZPRODARCH valid_for=(all_logfiles,all_roles) db_unique_name=BZPRODX' scope=both sid='*';
alter system set log_archive_dest_2='SERVICE=BZPROD LGWR ASYNC VALID_FOR=(all_logfiles,primary_role) COMPRESSION=ENABLE DB_UNIQUE_NAME=BZPROD' scope=both sid='*';

set linesize 200
set pagesize 999
col value for a30
col name for a30
col unit for a30
col time_computed for a30
col datum_time for a30
col status for a15
col last_change# for 99999999999999999999999
select group#,thread#,sequence#,status,used,archived,last_change# from v$standby_log where status='ACTIVE';
select inst_id,process,status,client_process,thread#,sequence#,delay_mins from gv$managed_standby where process like '%MRP%';
select name,value,unit,time_computed,datum_time from v$dataguard_stats;

source ~/schadm.csh
rman target /
show all;
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO ALL STANDBY;
show all;


NAME                           VALUE
------------------------------ ----------------------------------------------------------------------------------------------------
control_file_record_keep_time  7
control_files                  +BZPRODDATA/bzprod/controlfile_bzprod.ctl
db_create_file_dest
db_file_name_convert
db_flashback_retention_target  1440
db_name                        BZPROD
db_recovery_file_dest
db_recovery_file_dest_size     0
db_unique_name                 BZPROD
fal_client
fal_server
log_archive_config             DG_CONFIG=(BZPROD,BZPRODX)
log_archive_dest_1             LOCATION=+BZPRODARCH  VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=BZPROD
log_archive_dest_2             SERVICE=BZPRODX LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=BZPRODX
log_archive_dest_3
log_archive_dest_state_1       enable
log_archive_dest_state_2       enable
log_archive_dest_state_3       enable
log_archive_format             %t_%s_%r.dbf
log_archive_max_processes      4
log_file_name_convert
redo_transport_user
remote_login_passwordfile      EXCLUSIVE
standby_file_management        MANUAL

24 rows selected.

SQL> 

NAME                           VALUE
------------------------------ ----------------------------------------------------------------------------------------------------
control_file_record_keep_time  7
control_files                  +BZPRODDATA/bzprod/controlfile_bzprod.ctl
db_create_file_dest
db_file_name_convert
db_flashback_retention_target  10000
db_name                        BZPROD
db_recovery_file_dest          +BZPRODARCH
db_recovery_file_dest_size     1610612736000
db_unique_name                 BZPRODX
fal_client
fal_server                     BZPROD1, BZPROD2
log_archive_config             DG_CONFIG=(BZPROD,BZPRODX)
log_archive_dest_1             LOCATION=+BZPRODARCH
log_archive_dest_2
log_archive_dest_3
log_archive_dest_state_1       ENABLE
log_archive_dest_state_2       ENABLE
log_archive_dest_state_3       enable
log_archive_format             %t_%s_%r.dbf
log_archive_max_processes      4
log_file_name_convert
redo_transport_user
remote_login_passwordfile      EXCLUSIVE
standby_file_management        AUTO

24 rows selected.

SQL> 
赞(0) 打赏
未经允许不得转载:徐万新之路 » RFS没有运行
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏