以下是小编为大家整理的Oracle与DB2数据类型的分类对应说明,本文共7篇,希望对您有所帮助。

篇1:Oracle与DB2数据类型的分类对应说明
首先,通过下表介绍与DB2/400数据类型之间的对应关系,是一对多的关系,具体采用哪种对应关系,应具体问题具体分析,
注意事项:
Oracle中的DATE含有年、月、日、时、分、秒,它和DB2/400中的DATE不相互对应,DB2/400中的DATE只有年、月、日,TIME类型含有时、分、秒,因此日期和时间类型要进行转换,请参照下表。Oracle
DB2/400 Oracle数据类型
注意事项 DB2 UDB数据类型 注意事项 DATE DATE
TIME
TIMESTAMP l 如果只使用MM/DD/YYY,那么使用DATE类型。
l 如果只使用HH:MM:SS, 那么使用TIME类型。
l 如果要使用日期和时间,则使用时间戳类型(TIMESTAMP)
l 可以使用Oracle中的TO_CHAR函数来取DATE的字串来分别与DB2/400的DATE、TIME相匹配。
VARCHAR2(n) n<=4000
CHAR(n)
VARCHAR(n) l 若n<=32766,则使用DB2/400中的CHAR类型、VARCHAR LONG n<=2GB VARCHAR(n)
CLOB(n) l
若n<=32K,则使用DB2/400中的CHAR类型、VARCHAR。
l 若32K=< n <=2GB,则使用CLOB。 ROW&
LONG ROW
n<=255 CHAR(n) FOR BIT DATA
VARCHAR(n) FOR BIT DATA
BLOB(n) l 若n<=32K, 则使用CHAR(n) FOR BIT DATA 或
VARCHAR(n) FOR BIT DATA
l 若n<=2GB, 则使用BLOB(n) BLOB
n<=4GB BLOB(n) 若n<=2GB, 则使用BLOB(n) CLOB
n<=4GB CLOB(n) 若n<=2GB, 则使用CLOB(n) NCLOB
n<=4GB DBCLOB(n) 若n<=2GB, 则使用DBCLOB(n/2) NUMBER SMALLINT/INTEGER/BIGINT
DECIMAL(p,s)/NUMBER(p,s)
Float(n)/ REAL/DOUBLE l 若Oracle中定义NUMBER(p) 或 NUMBER(p,s), 则使用SAMLLINT/INTEGER/BIGINT
l 若Oracle中定义NUMBER(p,s), 则使用DECIMAL(p,s)
l 若Oracle中定义NUMBER,则使用FLOAT(n)/REAL/DOUBLE
NUMBER
Oracle中的NUMBER类型可以对应DB2/400中的很多类型,这种对应关系要依赖于Oracle中number将用于保存何种类型的数据,是整型还是带有小数位的实型数据,另外还要考虑类型所占用的存储空间,例如:SAMLLINT占2 byte, INTEGER占4 byte; BIGINT占8 byte;Oracle中的NUMBER类型所占用的存储空间要根据它的定义而定,例如缺省精度下的NUMBER有38个数字长,占用20 byte的空间,
具体的对应关系请参照上表。
ROW and LOB类型
DB2/400提供VARCHAR和CLOB与ORACLE中的RAW和LONG RAW相对应。ORACLE也支持大对象:BLOB、CLOB、CLOB和NCLOB, ORACLE中的BLOB和CLOB可以提供4GB的空间,而DB2/400中的BLOB和CLOB只能存放2GB的数据;DB2/400中的DBCLOB与ORACLE中的NCLOB 2GB相对应。Oracle 中的BFILE数据类型用于管理数据库以外的二进制数据,数据库中的表将指向数据库外部的存放的BFILE文件,DB2/400也提供一个类似的数据类型DATALINK相对应。
ROWID
Oracle ROWIND虚拟列用于对表中的某一列进行唯一标示,DB2/400中也有这样的数据类型ROWID,它与ORACLE中的ROWID的功能相似。DB2/400中的ROWID可以存放40 byte的数据用来唯一标示表中的每一行,它没有ccsid属性,这些信息中没有关于datafile、block 或 row的信息。
例如:
CREATE TABLE LIBRARYNAME/ORDERS2 (ORDERNO ROWID, SHIPPED_TO VARCHAR (36) , ORDER_DATE DATE) ORDERNO的数据类型为ROWID,用于存放订单号,每当插入一行时,系统自动生成一个值,存放进这个字段。可以用OPERATION NAVIGATOR查看它的内容。
Character type
DB2/400的CHAR、VARCHAR类型与ORACLE中的VARCHAR2(n)类型相对应,但是ORACLE中的VARCHAR2(n)类型仅用于存放较小的字符串,这里的n小于4000,因此在这种情况下,最好用定长的CHAR(N)类型与ORACLE的VARCHAR2(n)相对应,这样不仅可以提高效率,还可以节省存储空间,若使用VARCHAR(n)类型最好用ALLOCATE参数,这样可以提高数据库的性能,它可以减少内存和硬盘之间的输入/输出操作。
要注意DB2/400中的字符串中文输入问题,要想在DB2/400上输入中文应用这样的SQL创建表,这里的CCSID 935,代表简体中文。
篇2:分析db2与oracle的差别
分析db2与oracle的差别
开发了一段时间的一个系统一直在db2上使用,终于开发的差不多,测试没什么大问题了,突然有一个客户现场要求用oracle数据库,刚开始觉得应该没什么问题,开发的时候虽然没在oracle数据库测试过,但是无非也就是一些SQL的问题,结果用oracle数据库一发布就傻眼了,我嘞个去竟然没有一个功能能正常运行,所有的功能进去都是空白页面,当然报错的都是SQL,但是这也太超乎我的想象了啊!所以还是记录下遇到的问题吧,以后写SQL的时候还是尽量通用,省的以后移植的时候费那么大劲了。
1、取得系统当前日期。db2为current date 但是这个在oracle中是不适用的,oracle为sysdate。我查找资料都没有说明db2可不可以用sysdate,但是我的db2 9.7的版本的确可以用sysdate这个函数的。所以就ok了,所有的取得系统当前日期函数都改为sysdate,适用oracle和db2。
2、日期类型字段。对于数据类型为date的字段,在db2中操作的时候不用做任何处理,可以当varchar类型的字段一样处理。但是oracle就不能这么干了,在查询的时候必须用T0_CHAR(CLOMUN,'yyyy-mm-dd'),在update或者insert的时候必须用TO_DATE(CLOMUN,'yyyy-mm-dd')转为DATE类型。在db2中也可以用to_char和to_date函数。
3、db2中的DECIMAL和oracle中的NUMBER类型。db2中的DECIMAL对应oracle中的NUMBER类型,来定义数字类型和保留几位有效数字,
例如:oracle中定义number(16,2)(四舍五入) db2中定义decimal(16,2)(会直接截取)。对于DECIMAL类型是不能把空值放进去的,如果为空则默认插入0,而且如果为10.00查询后是可以直接显示的,但是number类型就只显示10所以如果要显示10.00就需要对其进行格式化。另外number类型中是可以放空值的。
4、SQL的区别。db2和oracle中有一些SQL的区别,这个都是必然的,但是大部分的简单SQL都还是一样的,这里列举一些吧:
查询序列
oracle:
select T18_ONLINE_TASKFACT_TASKKEY.currval from dual(当前值)
select T18_ONLINE_TASKFACT_TASKKEY.nextval from dual(下一个值)
db2
select PREVVAL FOR T18_ONLINE_TASKFACT_TASKKEY from sysibm.sysdummy1 (当前值)
select NEXTVAL FOR T18_ONLINE_TASKFACT_TASKKEY from sysibm.sysdummy1(下一个值)
查询前10行数据
db2 : select * from test fetch first 10 rows only
oracle: select * from test where rownum<=10
篇3:浅析SQL Server与Oracle、DB2的比较数据库
开放性 SQL Server 只能在 Windows 上运行,没有丝毫的开放性,操作系统的系统的稳定对数据库是十分重要的,Windows9X系列产品是偏重于桌面应用,NT server只适合中小型企业。而且Windows平台的 可靠性 , 安全 性和伸缩性是非常有限的。它不象 Unix 那样久
开放性
SQL Server
只能在Windows上运行,没有丝毫的开放性,操作系统的系统的稳定对数据库是十分重要的。Windows9X系列产品是偏重于桌面应用,NT server只适合中小型企业。而且Windows平台的可靠性,安全性和伸缩性是非常有限的。它不象Unix那样久经考验,尤其是在处理大数据量的关键业务时。
Oracle
能在所有主流平台上运行(包括 Windows)。完全支持所有的工业标准。采用完全开放策略。可以使客户选择最适合的解决方案。对开发商全力支持。
DB2
能在所有主流平台上运行(包括Windows)。最适于海量数据。DB2在企业级的应用最为广泛,在全球的500家最大的企业中,几乎85%以上用DB2数据库服务器,而国内到约占5%。
可伸缩性,并行性
SQL Server
并行实施和共存模型并不成熟。很难处理日益增多的用户数和数据卷。伸缩性有限。
Oracle
平行服务器通过使一组结点共享同一簇中的工作来扩展Window NT的能力,提供高可用性和高伸缩性的簇的解决方案。如果WindowsNT不能满足需要, 用户可以把数据库移到UNIX中。
DB2
DB2具有很好的并行性。DB2把数据库管理扩充到了并行的、多节点的环境。数据库分区是数据库的一部分,包含自己的数据、索引、配置文件、和事务日志。数据库分区有时被称为节点或数据库节点。
安全性
SQL server 没有获得任何安全证书,
Oracle 获得最高认证级别的ISO标准认证。
DB2 获得最高认证级别的ISO标准认证。
性能
SQL Server 多用户时性能不佳
Oracle 性能最高, 保持WindowsNT下的TPC-D和TPC-C的世界记录。
DB2 适用于数据仓库和在线事物处理,性能较高。
客户端支持及应用模式
SQL Server
C/S结构,只支持Windows客户,可以用ADO,DAO,OLEDB,ODBC连接。
Oracle
多层次网络计算,支持多种工业标准,可以用ODBC,JDBC,OCI等网络客户连接。
DB2
跨平台,多层结构,支持ODBC,JDBC等客户。
操作简便
SQL Server
操作简单,但只有图形界面。
Oracle
较复杂, 同时提供GUI和命令行,在Windows NT和Unix下操作相同。
DB2
操作简单,同时提供GUI和命令行,在Windows NT和Unix下操作相同。
使用风险
SQL Server
完全重写的代码,经历了长期的测试,不断延迟,许多功能需要时间来证明。并不十分兼容早期产品。使用需要冒一定风险。
Oracle
长时间的开发经验,完全向下兼容。得到广泛的应用。完全没有风险。
DB2
在巨型企业得到广泛的应用,向下兼容性好。风险小。
(责任编辑:铭铭 mingming_ky@126.com TEL:(010)68476636)
原文转自:www.ltesting.net
篇4:Oracle Gloden Gate 系列三 GG 支持与不支持的对象类型与操作 说明
1.1 Numeric data types
(1) NUMBER up to the maximum sizepermitted by Oracle
(2) BINARY FLOAT
(3) BINARY DOUBLE
Limitations of support
The support of rangeand precision for floating-point numbers depends on the host machine. Ingeneral, the precision is accurate to 16 significant digits, but you shouldreview the database documentation to determine the expected approximations.Oracle GoldenGate rounds or truncates values that exceed the supportedprecision.
1.2 Character data types
(1)CHAR
(2)VARCHAR2
(3)LONG
(4)NCHAR
(5)NVARCHAR2
1.3 Multi-byte character types
(1) NCHAR and NVARCHAR2 multi-bytecharacter data types
(2) Multi-byte data stored in CHAR andVARCHAR2 columns
Limitations of support
(1) For OracleGoldenGate to support multi-byte character data, the source and target databasesmust be identical. Transformation, filtering, and other manipulation are not supported.
(2) Multi-bytecharacters can be used with limitations in MAP and TABLE parameter statementssuch as string-based conversion functions and WHERE clauses. The code point fora multi-byte character must be represented within an escape sequence, for example“\u20ac.”
(3) Multi-bytedata is supported whether the length semantics are in bytes or characters. Ifthe semantics setting of the source database is BYTE and the setting of thetarget is CHAR, use the Replicat parameter SOURCEDEFS in your configuration,and place a DEFGEN generated definitions file on the target. These steps arerequired to support the difference in semantics, whether or not the source andtarget data definitions are identical. Replicat refers to the definitions fileto determine the upper size limit for fixed-size character columns.
(4) If thedatabase has an NLS_NCHAR_CHARACTERSET value other than AL16UTF16, use the VARWIDTHNCHARparameter to force NCHAR data to be written to the trail with 2-byte lengthinformation.
1.4 Binary data types
(1) RAW
(2) LONG RAW
1.5 Date and timestamp data types
(1) DATE
(2) TIMESTAMP (see Limitations ofsupport)
Limitations of support
(1) By default,only TIMESTAMP WITH TIME ZONE specified as a UTC offset is supported. To supportTIMESTAMP WITH TIME ZONE specified as TZR (Region ID), you must use the Extractparameter TRANLOGOPTIONS with either the INCLUDEREGIONID or INCLUDEREGIONIDWITHOFFSEToption. Without TRANLOGOPTIONS, Extract abends on this data type.
(2) TIMESTAMPWITH TIME ZONE as TZR is not supported by Oracle GoldenGate for initial loads, foruse with the SQLEXEC feature, or for operations where the column must befetched from the database. In these cases, the region ID is converted to a timeoffset by the Oracle database engine when the column is selected. Replicat willreplicate the column data as date and time data with a time offset value.
(3)Because ofthe way that the Oracle database normalizes TIMESTAMP WITH LOCAL TIME ZONE tothe local time zone of the database, the timestamps do not transfer correctlybetween databases that are in different time zones. Timestamps will transfercorrectly between databases in the same time zone if you set the time zone ofthe Replicat session to the timezone of the database. Include the followingparameter statement in the Replicat parameter file, placing it after the USERIDparameter, but before the first MAP statement:
SQLEXEC“ALTER SESSION SET TIME_ZONE =
(4) OracleGoldenGate does not support negative dates.
1.6 Large object data types
(1) CLOB
(2) NCLOB
(3) BLOB
Limitations of support
(1) SECUREFILE and BASICFILE are bothsupported.
(2) Store large objects out of row ifpossible.
(3) LOB capturediffers between earlier and later versions of Oracle:
Oracle versions earlierthan 10g:
In-row LOBs are captured from the redo log, but outof-rowLOBs are fetched from the database. If a value getsdeleted before a fetch occurs, Extract writes a null to the trail. If a valuegets updated before the fetch occurs, Extract writes the updated value. Toprevent these inaccuracies, try to keep Extract latency low. The OracleGoldenGate documentation provides guidelines for tuning process performance.
In-rows的情况从redo log captured,out of-row从lobsegments里进行fetch,
这里in-row 和 outof-row的区别,可以参考我的blog:
Oracle LOB 详解
blog.csdn.net/tianlesoftware/article/details/6905406
Oracle 10g and later,BASICFILE LOBs:
All BASICFILELOBs are captured from the redo log, whether stored in-row or out-of row. However,Extract will continue to fetch LOBs under the following conditions, for whichit will issue a warning:
--对于BASICFILE LOBs,不管是in-row 还是out-ofrow都是从redo log 里进行captured,但是在一下情况下会从LOBs里进行fetch:
1) Extract determines that a LOB instanceis invalid.
2) The LOB data is missing from the redolog. This can occur if the BASICFILE LOB is created with the no_logging option.
3) The LOB is created with the CACHEattribute.
4) A LOB is only partially updated. Oracle GoldenGate does not support partial column data.Extract assumes LOB data to be incomplete if the LOB data does not start with aLOB reset record or does not start at the first byte and does not end at thelast byte, according to the new LOB length. Partial updates can be generated bythe following OCI calls: OCILOBWrite, OCILobAppend(), OCiLobCopy(), OCILobLoadFromFile(),OCILobTrim(), and by updated made through procedures in the dbms_lob package.
5) Extract detects an anomaly in the LOBdata, such as a missing page number, missing END MARKER, or a mismatch betweenthe size that was captured and the expected size.
Oracle 10g and later,SECUREFILE LOBs:
Oracleintroduced SECUREFILE LOBs in 11g Release 1. SECUREFILE LOBs are captured fromthe redo logs only when the update is complete and the LOB is not transformed(the column is not compressed or encrypted or deduplicated) and storedout-of-row.
--SECUREFILE LOBs是11gR1里推出来的,当update完成,并且这个LOB 没有进行compress 或者encrypted 或者deduplicated,且数据存在lobsegment里。满足这种情况才从redo log里进行captured。
Extract will fetchSECUREFILE LOBs under the following circumstances:
1) The LOB is stored in-row.
--注意这里,in-row 的情况下是进行fetch操作。
2) The LOB is transformed either with compression or encryption.
3) The LOB is created with the CACHE attribute.
4) Extract determines that a LOB instance is invalid.
5)LOB data is missing from the redo log. This can occur if the LOB is created with any of following options:deduplicate, no_logging, filesystem_like_logging.
--redo log里LOB data 丢失的情况下也会进行fetch。
6) The LOB is updated using OCILOBWrite(), OCILobAppend(),OCiLobCopy(), OCILobLoadFromFile(), OCILobTrim(), or through procedures in thedbms_lob package.
7) Any other anomalies as detected by Extract in terms of a missingpage number, a missing END MARKER, or a mismatch between the size that wascaptured and the expected size.
(4) When changing a SECUREFILE LOBfrom one storage to another (such as from ENCRYPT to DECRYPT), Oracle updatesthe whole table, and Extract captures those updates from the log. Therefore, itwill appear as though Oracle updated all of the data blocks that are associatedwith the table. This also can happen when an ALTER TABLE command sets a DEFAULTvalue to a column that has null values.
(5) If CLOB columns can store binarydata, set the NLS_LANG system environment variable and the NLS_LANGUAGEdatabase parameter to the same value.
(6) When the size of a large objectexceeds 4K, Oracle GoldenGate stores the data in segments within the OracleGoldenGate trail. The first 4K is stored in the base segment, and the rest isstored in a series of 2K segments. Oracle GoldenGate does not support thefiltering, column mapping, or manipulation of large objects of this size. Full OracleGoldenGate functionality can be used for objects that are 4K or smaller.
1.7 XML data types
XMLType issupported.
Limitations of support
(1)The source and target objects thatcontain the XML must be identical. Filtering and manipulation are notsupported. However, you can map the XML representation of an object to acharacter column by means of a COLMAP clause in a TABLE or MAP statement.
(2) Oracle GoldenGate treats XMLTypedata as a LOB. There is no size limitation, but see “Large object data types”on page 10 for additional support and limitations.
(3) A table that contains XMLTypecolumns must have one of the following: a primary key, column(s) with a uniqueconstraint, or a unique index.
1.8 User defined types
OracleGoldenGate supports user defined types (UDT) when the source and target objectshave the same structure. The schema names can be different.
--GG 支持用户自定义类型
1.8.1 General limitationsof support
(1) Extract mustfetch UDTs (except for object tables) from the database, so you should configureand use a snapshot for data consistency. Because a UDT must be fetched, a tablethat contains one must have one of the following: a primary key, column(s) witha unique constraint, or a unique index.
--UDT 必须从database 进行fetch
(2) OracleGoldenGate does not support UDTs with the following embedded scalar types: CLOB,CFILE, BFILE, or INTERVAL_YM, INTERVAL_DS, and OPAQUE (with the exception ofXMLType, which is supported).
--UDT 不支持的类型
(3) Object or relational tables wherethe key contains a UDT, or where a UDT is the only column, are not supported.
(4) The RMTTASK parameter does notsupport user-defined types (UDT).
(5) CHAR and VARCHAR attributes thatcontain binary or unprintable characters are not supported.
(6) UDTs, including values insideobject columns or rows, cannot be used within filtering criteria in TABLE orMAP statements, or as input or output for the Oracle GoldenGate column-conversionfunctions, SQLEXEC, or other built-in data-manipulation tools. Support is onlyprovided for like-to-like Oracle source and targets.
(7) Oracle GoldenGate does not supportREF types.
1.8.2 Limitations forcollection types
(1) When data ina nested table is updated, the row that contains the nested table must be updatedat the same time.
(2) When VARRAYSand nested tables are fetched, the entire contents of the column are fetchedeach time, not just the changes.
1.8.3 Limitations forobject tables
(1) OracleGoldenGate supports object tables in uni-directional and active-active configurationsfor Oracle 10g and later. Object tables are captured from the redo log,butcertain data types that are fetched from the database when in regularrelational tables, such as LOBs and collection types, will also be fetched whenin object tables. Similarly, current limitations that apply to collection typeswhen in regular tables also apply to these types when in object tables.
(2) An Oracle objecttable can be mapped to a non-Oracle object table in a supported target database.
(3) A primarykey must be defined on the root-level object attributes of the object table,andcannot include leaf-level attributes. If no key is defined, Oracle GoldenGatewill use all viable columns as a pseudo-key.
(4)OracleGoldenGate does not support the replication of DDL operations for an object table.This limitation includes the database object versioning that is associated withALTERs of object tables.
(5) Synonyms arenot supported for object tables or relational tables that contain object tables.
1.8.4 Limitations forspatial types
OracleGoldenGate supports SDO_GEOMETRY, SDO_TOPO_GEOMETRY, and SDO_GEORASTER (rastertables) for Oracle 10g and later.
1.9 Other supported data types
(1) ROWID
(2) VARRAY
(3) INTERVAL DAY and INTERVAL YEAR ifthe size of the target column is equal to, or greater than, that of the source.
篇5:Oracle Gloden Gate 系列三 GG 支持与不支持的对象类型与操作 说明
3.1 Tables, views, and materialized views
Oracle GoldenGate supports the following DML operations made to regular tables, index organizedtables (created with the ORGANIZATION INDEX clause of CREATE TABLE), clustered tables,and materialized views.
(1) INSERT
(2) UPDATE
(3) DELETE
(4) Associated transaction controloperations
3.1.1 Limitations of support for regular tables
(1) Oracle GoldenGate supports tablesthat contain any number of rows up to 2 MB in length. Each character LOB/LONGcolumn contributes up to 4 KB to this limit, and each binary LOB columncontributes up to 8 KB. This row-size limitation mostly affects updateoperations on columns that are being used as a row identifier. This identifier canbe a primary or unique key, a key defined within the Oracle GoldenGateparameter file, or all of the columns if no key is defined. If a row identifieris updated, the 2 MB length must include not only the after image, but also thefull before image, which is required to find the correct key on the target forthe update.
(2) LOB columns are supported in theirfull size.
(3) Oracle GoldenGate supports themaximum number of columns per table that is
supported by the database.
(4) Oracle GoldenGate supports themaximum column size that is supported by the
database. OracleGoldenGate supports tables that contain only one column, except when the columncontains one of the following data types:
--GG 支持只有一列的表,但是该列不能为以下类型
1) LOB
2) LONG
3) Nested table
4) User defineddata type
5) VARRAY
6) XML
(5) Oracle GoldenGate supports tableswith unused columns, but the support is disabled by default, and Extract abendson them. You can use the DBOPTIONS parameter with the ALLOWUNUSEDCOLUMN optionto force Extract to generate a warning and continue processing. When usingALLOWUNUSEDCOLUMN, either the same unused column must exist in the targettable, or a source definitions file must be created for Replicat with theDEFGEN utility. You can include the appropriate ALTER TABLE...SET UNUSEDstatements in a DDL replication configuration.
--GG 支持unused 列,但是该功能默认是禁用的,
可以通过DBOPTIONS参数的ALLOWUNUSEDCOLUMN 选项来强制extract 生成warning.
(6) Oracle GoldenGate supports tableswith interval partitioning. Make certain that the WILDCARDRESOLVE parameterremains at its default of DYNAMIC.
--GG 支持interval partitioning。
(7) Oracle GoldenGate supports tableswith virtual columns, but does not capture change data for these columns,because the database does not write it to the transaction log. You can use theFETCHCOLS option of the TABLE parameter to fetch the value of a virtual column.Replicat does not apply DML to a virtual column, even if the data for that columnis in the trail, because the database does not permit DML on that type of column.Data from a source virtual column when fetched can be applied to a target columnthat is not a virtual column.
--GG 支持virtual columns,但是不会capture virtual columns上的数据变化,因为数据库不会将virtual columns上的的信息写入log。 我们可以使用FETCHCOLS 选项来fetch 到virtualcolumn上的信息,但是Replicat 进程不会应用这些信息到virtual columns上,即使这些信息存在trail里,但是可以将这些fetch 的信息target database上的非virtualcolumn上。
(8) In an initial load, all of thedata is selected directly from the source tables, not the transaction log.Therefore, in an initial load, data values for all columns, including virtualcolumns, gets written to the trail or sent to the target, depending on themethod that is being used. As when applying change data, however, Replicat doesnot apply initial load data to virtual columns, because the database does notpermit DML on that type of column.
--在初始化装载的时候,所有数据是直接从source table上获取,而不是从事务日志里。 因此在initialload 时,所有列的值,包含virtual columns,都会写入trail 文件或者发送到target。 但在target端apply时,Replicat 不会应用data 到virtualcolumns,因为数据库进制virtual column上的DML 操作。
(9) Oracle GoldenGate does not permita virtual column to be used in a KEYCOLS clause in a TABLE or MAP statement.
(10) If a unique key includes a virtualcolumn, and Oracle GoldenGate must use that key, the virtual column will beignored. This might affect data integrity if the remaining columns do notenforce uniqueness. Fetching only provides an after value, and Oracle GoldenGaterequires before and after values of keys.
(11) If a unique index is defined onany virtual columns, it will not be used.
(12) If a unique key or index containsa virtual column and is the only unique identifier on a table, OracleGoldenGate must use all of the columns as an identifier to find target rows.Because a virtual column cannot be used in this identifier, it is possible thatReplicat could apply operations containing this identifier to the wrong targetrows.
(13) Tables created as EXTERNAL are notsupported.
(14) A key cannot contain a column thatis part of an invisible index.
(15) Tables created with tablecompression or OLTP table compression are not supported. Oracle GoldenGatesupports delivery to Oracle Exadata with EHCC compression enabled for insertoperations. In order for Replicat to apply data so that it is compressed withEHCC, you must use the INSERTAPPEND parameter for Replicat, which causesReplicat to use an APPEND hint for inserts.
(16) OracleGoldenGate supports Transparent Data Encryption (TDE) applied at the column andtablespace level. Column-level encryption is supportedfor all versions of Oracle 10.2.0.5, 11.1, and 11.2. Tablespace-levelencryption is supported for all versions of Oracle 10.2.0.5 and 11.1.0.2.
(17) Oracle GoldenGate supports thesynchronization of TRUNCATE statements as part of the full DDL synchronizationfeature or as standalone functionality that is independent of full DDLsynchronization. The standalone TRUNCATE feature supports the replication of TRUNCATETABLE, but no other TRUNCATE options. The full DDL feature supports TRUNCATE TABLE,ALTER TABLE TRUNCATE PARTITION, and other DDL. To avoid errors from duplicate operations,only one of these features can be active at the same time. The GETTRUNCATES parametercontrols the standalone TRUNCATE feature.
(18) Oracle GoldenGate supports thecapture of direct-load INSERTs for Oracle versions 9iR2, 10gR1, and 10gR2 andlater. Supplemental logging must be enabled, and the database must be inarchive log mode. The affected tables cannot contain LOBs if the database is9iR2 or 10gR1, but LOBs are supported for later versions. The followingdirect-load methods are supported.
1) /*+ APPEND */ hint
2)/*+ PARALLEL */ hint (Non-RAC only)
3) SQLLDR with DIRECT=TRUE
3.1.2 Limitations of support for views
(1) Oracle GoldenGate can replicate toa view as long as it is inherently updatable.
(2) Oracle GoldenGate supports capturefrom a table in the source database to an inherently updatable view in thetarget database.
(3) The structures of the table andthe view must be identical.
(4) A key must be defined on theunique columns in the view. This is done by means of a KEYCOLS clause in theMAP statements.
3.1.3 Limitations of support for materialized views
(1) Materialized views created WITHROWID are not supported.
(2) The materialized view log can becreated WITH ROWID.
(3) The source table must have aprimary key.
(4) Truncates of materialized viewsare not supported. You can use a DELETE FROM statement.
(5) Some Oracle GoldenGateinitial-load methods do not support LOBs in a materialized view.
(6) For Replicat, the materializedview must be updateable.
(7) DML (but not DDL) from a fullrefresh of a materialized view is supported for Oracle 10g and later. If DDLsupport for this feature is required, open an Oracle GoldenGate support case.
3.1.4 Limitations of support for index-organized tables
(1) IOTs are supported for Oracleversions 10.2 and later.
(2) Oracle GoldenGate supports IOTsthat are created with the MAPPING TABLE option, but it only captures changesmade to the base IOT, not changes made to the mapping table. However, Oraclewill maintain the mapping table on the target, if one is being used.
(3) IOTs that are stored in acompressed format are not supported (for example, in a
compressed tablespace).
NOTE:
A compressed IOTis different from an IOT that has key compression defined with the COMPRESSoption. IOTs with key compression are supported.
(4) Because an IOT does not have arowid, Oracle GoldenGate must fetch certain data types in an IOT from thedatabase. The fetch uses the key value as the row identifier, which increasesthe potential for “row not found” errors. Oracle GoldenGate provides theFETCHOPTIONS parameter to handle these errors. Data types that are fetched are:
1) BLOB
2) CLOB
3) NCLOB
4) XMLType
5) UDT
6) Nested table
7) VARRAY
(5) (Oracle 10g and later) TRUNCATESof an IOT where one partition is empty will not be captured.
3.1.5 Limitations of support for clustered tables
(1) Indexed and hash clusters are bothsupported.
(2) Encrypted and compressed clusteredtables are not supported.
3.2 Sequences
OracleGoldenGate supports the replication of sequence values by means of the SEQUENCEparameter. Oracle GoldenGate ensures that the target sequence values willalways be higher than those of the source (or equal to them, if the cache is0).
NOTE:
DDL support forsequences (CREATE, ALTER, DROP, RENAME) is compatible with, but not requiredfor, replicating sequence values. To replicate just sequence values, you do notneed to install the Oracle GoldenGate DDL support environment. You can just usethe SEQUENCE parameter.
Limitations of support for sequences
(1) The cache size and the incrementinterval of the source and target sequences must be identical.
(2) The cache can be any size,including 0 (NOCACHE).
(3) The sequence can be set to cycleor not cycle, but the source and target databases must be set the same way.
(4) To add SEQUENCE to a configurationin which DDL support is enabled, you must reinstall the Oracle GoldenGate DDLobjects in INITIALSETUP mode.
篇6:Oracle Gloden Gate 系列三 GG 支持与不支持的对象类型与操作 说明
6.1 Oracle-reserved schemas
The following schema names are considered Oracle-reserved and must be excluded from the OracleGoldenGate DDL configuration. Oracle GoldenGate will ignore these schemas.
6.2 Oracle recycle bin
Because of aknown issue in Oracle 10g, the Oracle recycle bin must be turned off to supportOracle GoldenGate DDL replication. If the recycle bin is enabled, the Oracle GoldenGateDDL trigger session receives implicit recycle bin DDL operations that cause thetrigger to fail.
To turn off the recyclebin:
(1) Oracle 10g Release 2 and later:Set the RECYCLEBIN initialization parameter to OFF.
(2) Oracle 10g Release 1: Set the_RECYCLEBIN initialization parameter to FALSE. Consult the Oracle 10g databasedocumentation for the correct syntax.
6.3 Other non-supported DDL
Oracle GoldenGate does not support thefollowing:
(1) ALTER TABLE ... MOVE TABLESPACE
(2) DDL on nested tables.
(3) DDL that involves password-basedcolumn encryption, such as:
1) CREATE TABLE t1 ( a number, bvarchar2(32) ENCRYPT IDENTIFIED BY my_password);
2) ALTER TABLE t1 ADD COLUMN cvarchar2(64) ENCRYPT IDENTIFIED BY my_password;
(4) ALTER DATABASE and ALTER SYSTEM(these are not considered to be DDL)
篇7:Oracle Gloden Gate 系列三 GG 支持与不支持的对象类型与操作 说明
All Oracle GoldenGatetopology configurations are supported for Oracle DDL replication. Active-active(bi-directional) replication of Oracle DDL is supported between two (and only two)databases that contain identical metadata.
Oracle GoldenGate supports DDL operations of up to 2 MB in size on the following objects:
The 2 MB size limitation includes packages,procedures, and functions.
NOTE:
The actual sizelimit of the DDL support is approximate, because the size will not only includethe statement text but also Oracle GoldenGate maintenance overhead that dependson the length of the object name, the DDL type, and other characteristics ofkeeping a DDL record internally.
文档为doc格式