run at a compatibility of 10.1 or higher.
IOT support with LOB and Overflow requires primary database to run at a compatibility of 10.2 or higher.
TDE support requires primary database to run at a compatibility of 11.1 or higher.
Segment compression requires primary database to run at a compatibility of 11.1 or higher.
Hybrid Columnar Compression support is dependent on the underlying storage system.
通过视图查看主库中的哪些表不能被sql apply :
[oracle@dg-one ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Apr 29 21:30:01 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
SQL> desc dba_logstdby_unsupported
Name Null Type
----------------------------------------- -------- ----------------------------
OWNER VARCHAR2(30)
TABLE_NAME VARCHAR2(30)
COLUMN_NAME VARCHAR2(30)
ATTRIBUTES VARCHAR2(39)
DATA_TYPE VARCHAR2(32)
SQL> select owner,table_name,column_name,attributes,data_type from dba_logstdby_unsupported;
no rows selected
查看存在唯一性问题的表,如下:
SQL> select * from dba_logstdby_not_unique;
OWNER TABLE_NAME B
------------------------------ ------------------------------ -
SCOTT BONUS N
SCOTT SALGRADE N
STDBYPERF STATS$MANAGED_STANDBY N
STDBYPERF STATS$RECOVERY_PROGRESS N
SQL> desc dba_logstdby_not_unique
Name Null Type
----------------------------------------- -------- ----------------------------
OWNER VARCHAR2(30)
TABLE_NAME VARCHAR2(30)
BAD_COLUMN VARCHAR2(1)
好了,现在开始创建逻辑dg,因为我已经创建了物理 dg,那么我们从该基础上转换成逻辑dg(注:不能从逻辑dg转为物理dg)。如果没有创建物理dg,那么可以
直接去创建逻辑dg,但是注意参数的修改。
第一步:停止备库redo应用:
查看数据库模式:
SQL> set linesize 200
SQL> col dest_name for a50
SQL> select database_mode,recovery_mode,protection_mode,dest_name from v$archive_dest_status where database_mode!='UNKNOWN';
DATABASE_MODE RECOVERY_MODE PROTECTION_MODE DEST_NAME
--------------- ----------------------- -------------------- --------------------------------------------------
OPEN_READ-ONLY MANAGED REAL TIME APPLY MAXIMUM PERFORMANCE LOG_ARCHIVE_DEST_1
SQL>
停止redo应用:
SQL> alter database recover managed standby database cancel;
Database altered.
SQL>
第二步:在主库build逻辑dg所需元数据。
SQL> exec dbms_logstdby.build;
PL/SQL procedure successfully completed.
SQL>
注:这个过程主要是做了什么操作呢?
A LogMiner dictionary must be built into the redo data so that the LogMiner component of SQL Apply can properly interpret changes it sees in the redo. As part of building the LogMiner dictionary, supplemental logging is automatically set up to log primary key and unique-constraint/index columns. The supplemental logging information ensures each update contains enough information to logically identify each row that is modified by the statement.
To build the LogMiner dictionary, issue the following statement:
SQL> EXECUTE DBMS_LOGSTDBY.BUILD;
The DBMS_LOGSTDBY.BUILD procedure waits for all existing transactions to complete. Long-running transactions executed on the primary database will affect the timeliness of this command.
Note:
In databases created using
Oracle Database 11g release 2 (11.2) or later, supplemental logging information is automatically propagated to any existing physical standby d