steps to do real time apply in oracle 11g
the feature can make 11g standby database more powerful and flexible
[@more@]real time apply:
before:
check log file:
Successful mount of redo thread 1, with mount id 965009577
Physical Standby Database mounted.
Lost write protection disabled
Completed: alter database mount
alter database recover managed standby database disconnect from session
Attempt to start background Managed Standby Recovery process (CAT11GST)
Tue Jul 22 14:32:15 2008
MRP0 started with pid=23, OS id=2175024
MRP0: Background Managed Standby Recovery process started (CAT11GST)
Fast Parallel Media Recovery enabled
Managed Standby Recovery not using Real Time Apply
parallel recovery started with 7 processes
after:
in primary:
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=CAT11GST ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=CAT11GST
SQL> alter system set log_archive_dest_2='SERVICE=CAT11GST SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=CAT11GST';
System altered.
in standby:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options
SQL> alter database add standby logfile ('/u02/oradata/cat11gst/CAT11GST/stb_redo1.log') size 50m;
alter database add standby logfile ('/u02/oradata/cat11gst/CAT11GST/stb_redo1.log') size 50m
*
ERROR at line 1:
ORA-01156: recovery in progress may need access to files
SQL> alter database add standby logfile ('/u02/oradata/cat11gst/CAT11GST/stb_redo1.log') size 50m;
Database altered.
SQL> alter database add standby logfile ('/u02/oradata/cat11gst/CAT11GST/stb_redo2.log') size 50m;
Database altered.
SQL> alter database add standby logfile ('/u02/oradata/cat11gst/CAT11GST/stb_redo3.log') size 50m;
Database altered.
alter system set log_archive_dest_3 = 'LOCATION=/u02/oradata/cat11gst/arch2 VALID_FOR=(STANDBY_LOGFILES,STANDBY_ROLES) DB_UNIQUE_NAME=CAT11GST';
System altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> alter database open read only;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
check stanby log:
Completed: alter database open read only
Tue Jul 22 16:22:39 2008
alter database recover managed standby database
using current logfile disconnect from session
Attempt to start background Managed Standby Recovery process (CAT11GST)
Tue Jul 22 16:22:39 2008
MRP0 started with pid=24, OS id=2265102
MRP0: Background Managed Standby Recovery process started (CAT11GST)
Fast Parallel Media Recovery enabled
Managed Standby Recovery starting Real Time Apply
test real time apply:
in primary:
SQL> insert into szhao.read_only values(3,'bb');
1 row created.
SQL> commit;
Commit complete.
SQL> insert into szhao.read_only values(4,'dd');
1 row created.
SQL> commit;
Commit complete.
SQL> alter system switch logfile;
System altered.
SQL> insert into szhao.read_only values(5,'ee');
1 row created.
SQL> commit;l
2
SQL> commit;
Commit complete.
SQL> alter system switch logfile;
System altered.
SQL> insert into szhao.read_only values(6,'ff');
1 row created.
SQL> commit;
Commit complete.
SQL> alter system switch logfile;
System altered.
SQL> insert into szhao.read_only values(7,'gg')l
2
SQL> insert into szhao.read_only values(7,'gg');
1 row created.
SQL> commit;
Commit complete.
SQL> alter system switch logfile;
System altered.
in standby:
SQL> select * from szhao.read_only;
A B
---------- ------------------------------
1 aa
2 bb
3 bb
4 dd
SQL> /
A B
---------- ------------------------------
1 aa
2 bb
3 bb
4 dd
5 ee
6 ff
7 gg
7 rows selected.
note that the previous redo log won't be used anymore for recovery:
SQL> col member for a50
SQL> set linesize 200
SQL> select * from V$logfile;
GROUP# STATUS TYPE MEMBER IS_
---------- ------- ------- -------------------------------------------------- ---
3 ONLINE /u02/oradata/cat11gst/CAT11GSTredo03.log NO
2 ONLINE /u02/oradata/cat11gst/CAT11GSTredo02.log NO
1 ONLINE /u02/oradata/cat11gst/CAT11GSTredo01.log NO
4 STANDBY /u02/oradata/cat11gst/CAT11GST/stb_redo1.log NO
5 STANDBY /u02/oradata/cat11gst/CAT11GST/stb_redo2.log NO
6 STANDBY /u02/oradata/cat11gst/CAT11GST/stb_redo3.log NO
6 rows selected.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIME
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- -------------------
1 1 16 52428800 1 YES CLEARING_CURRENT 1122302 2008-07-22:16:39:26
2 1 15 52428800 1 YES CLEARING 1122203 2008-07-22:16:34:50
3 1 16 52428800 1 YES CLEARING 1122302 2008-07-22:16:39:26
alert log:
RFS[2]: Assigned to RFS process 1503478
RFS[2]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 4: '/u02/oradata/cat11gst/CAT11GST/stb_redo1.log'
Tue Jul 22 16:30:55 2008
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 454692
RFS[3]: Identified database type as 'physical standby'
kcrrvslf: active RFS archival for log 4 thread 1 sequence 12
RFS[3]: Successfully opened standby log 5: '/u02/oradata/cat11gst/CAT11GST/stb_redo2.log'
Tue Jul 22 16:31:16 2008
Media Recovery Log /u02/oradata/cat11gst/arch2/1_11_660407962.dbf
Media Recovery Waiting for thread 1 sequence 12 (in transit)
Recovery of Online Redo Log: Thread 1 Group 4 Seq 12 Reading mem 0
Mem# 0: /u02/oradata/cat11gst/CAT11GST/stb_redo1.log
Tue Jul 22 16:32:56 2008
Primary database is in MAXIMUM PERFORMANCE mode
kcrrvslf: active RFS archival for log 4 thread 1 sequence 12
RFS[2]: Successfully opened standby log 5: '/u02/oradata/cat11gst/CAT11GST/stb_redo2.log'
Tue Jul 22 16:32:56 2008
Media Recovery Waiting for thread 1 sequence 13 (in transit)
Recovery of Online Redo Log: Thread 1 Group 5 Seq 13 Reading mem 0
Mem# 0: /u02/oradata/cat11gst/CAT11GST/stb_redo2.log
Tue Jul 22 16:33:52 2008
Primary database is in MAXIMUM PERFORMANCE mode
kcrrvslf: active RFS archival for log 5 thread 1 sequence 13
RFS[2]: Successfully opened standby log 4: '/u02/oradata/cat11gst/CAT11GST/stb_redo1.log'
Tue Jul 22 16:33:52 2008
Media Recovery Waiting for thread 1 sequence 14 (in transit)
Recovery of Online Redo Log: Thread 1 Group 4 Seq 14 Reading mem 0
Mem# 0: /u02/oradata/cat11gst/CAT11GST/stb_redo1.log
Tue Jul 22 16:34:49 2008
Primary database is in MAXIMUM PERFORMANCE mode
kcrrvslf: active RFS archival for log 4 thread 1 sequence 14
RFS[2]: Successfully opened standby log 5: '/u02/oradata/cat11gst/CAT11GST/stb_redo2.log'
Tue Jul 22 16:34:49 2008
Media Recovery Waiting for thread 1 sequence 15 (in transit)
Recovery of Online Redo Log: Thread 1 Group 5 Seq 15 Reading mem 0
Mem# 0: /u02/oradata/cat11gst/CAT11GST/stb_redo2.log
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/67/viewspace-1007687/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11g dataguard check real time applyOracleAPP
- 11g 新特性 real time apply +real time queryAPP
- for the datagard and real time applyAPP
- oracle active data guard real-time apply特性OracleAPP
- ????Oracle dataguard enabling real time applyOracleAPP
- 【DataGuard】Oracle 11g DataGuard 新特性之 Active Standby:Real-Time Apply+QueryOracleAPP
- 查詢real-time apply、real-time query的檢視APP
- Oracle Real Time SQL MonitorOracleSQL
- Oracle Real Time SQL MonitoringOracleSQL
- 建立Oracle 10gR2的local stream和downstream real-time apply 流複製Oracle 10gAPP
- Oracle 10g R2 實現dataguard實時日誌應用(real-time apply)Oracle 10gAPP
- 【DataGuard】Oracle 11g物理Active Data Guard實時查詢(Real-time query)特性Oracle
- Creating a 10gr2 Data Guard Physical Standby database with Real-Time applyDatabaseAPP
- Oracle 12c RAC CSSD程式無法啟動real time模式OracleCSS模式
- Lecture 12 Real-time Ray Tracing
- Oracle 11G ddl_lock_timeoutOracle
- Laravel 5.4 real-time facade 探究Laravel
- Lecture 05 Real-time Environment MappingAPP
- 【DG】Real-time query實時查詢操作
- Linux核心支援實時(Real-Time)(轉)Linux
- Oracle 11g 的 VKTM 程式 - virtual keeper of timeOracle
- ORACLE裡的慢查跟蹤 Real Time SQL Monitoring 11GR1 新特性OracleSQL
- Oracle Real Application Clusters GFSOracleAPP
- Real-Time C++電子書pdf下載C++
- Clock in a Linux Guest Runs More Slowly or Quickly Than Real TimeLinuxUI
- Exact Steps To Migrate ASM Diskgroups To Another SAN Without DowntimeASM
- Oracle 11g DDL_LOCK_TIMEOUT引數說明Oracle
- Oracle 11g 鎖特性增加(引數ddl_lock_time)Oracle
- Oracle 11G PSU 31326410 PSU apply failed 處理-拾億OracleAPPAI
- Oracle 11g RAC DG備庫gv$dataguard_stats apply lag值較大OracleAPP
- Deinstallation Tool for Oracle Clusterware and Oracle Real Application ClustersOracleAPP
- 利用 Real Time Facade 讓程式碼富有表達力
- 應用zabbix的實時匯出(real-time export)功能Export
- Zero Downtime Upgrade of Oracle 10g to Oracle 11g Using GoldenGate — 2Oracle 10gGo
- 2.3 - Laravel - 5.6 - Facade - Facades Real-Time 機制Laravel
- 論文翻譯:Real-Time High-Resolution Background Matting
- Oracle 11g DDL 的 wait選項(DDL_LOCK_TIMEOUT)OracleAI
- 使用oracle 11g rman新特性 duplicate target database for standby from active database 建立物理dataguard並開啟RealOracleDatabase