oracle cdc跨数据库,Oracle CDC 数据库 - SQL Server Integration Services (SSIS) | Microsoft Docs...

Oracle CDC 数据库The Oracle CDC Databases

03/14/2017

本文内容

适用于:Applies to: 719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server(所有支持的版本)719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server (all supported versions) 719f28649793c602f9270966b5ed5c39.png Azure 数据工厂中的 SSIS Integration RuntimeSSIS Integration Runtime in Azure Data Factory719f28649793c602f9270966b5ed5c39.png Azure 数据工厂中的 SSIS Integration RuntimeSSIS Integration Runtime in Azure Data Factory适用于:Applies to: 719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server(所有支持的版本)719f28649793c602f9270966b5ed5c39.pngSQL ServerSQL Server (all supported versions) 719f28649793c602f9270966b5ed5c39.png Azure 数据工厂中的 SSIS Integration RuntimeSSIS Integration Runtime in Azure Data Factory719f28649793c602f9270966b5ed5c39.png Azure 数据工厂中的 SSIS Integration RuntimeSSIS Integration Runtime in Azure Data Factory

一个 Oracle CDC 实例与在目标 SQL ServerSQL Server 实例上具有相同名称的一个 SQL ServerSQL Server 数据库相关联。An Oracle CDC Instance is associated with a SQL ServerSQL Server database by the same name on the target SQL ServerSQL Server instance. 此数据库称为 Oracle CDC 数据库(或 CDC 数据库)。This database is called the Oracle CDC database (or the CDC database).

该 CDC 数据库使用 Oracle CDC 设计器控制台创建和配置并且包含以下元素:The CDC database is created and configured using the Oracle CDC Designer Console and it contains the following elements:

通过为 SQL Server CDC 启用数据库创建的 cdc 架构。A cdc schema created by enabling the database for SQL Server CDC.

Oracle CDC 实例使用的一组 cdc.xdbcdc_xxxx 表。A set of cdc.xdbcdc_xxxx tables used by the Oracle CDC Instance.

一组空的镜像表,包含元组源 Oracle 数据库中捕获表的定义。A set of empty mirror tables with the definitions of the captured tables in tuphe Source Oracle database.

一组由 SQL Server CDC 机制生成并且与在非 Oracle 的常规 SQL Server CDC 中使用的完全相同的一组更改表和更改访问函数。A set of change tables and change access functions that are generated by the SQL Server CDC mechanism and are identical to those used in the regular, non-Oracle, SQL Server CDC.

cdc 架构最初只能由 dbowner 固定数据库角色的成员访问。The cdc schema is initially accessible only to the members of the dbowner fixed database role. 对更改表和更改函数的访问权限由与 SQL Server CDC 相同的安全模式确定。Access to the change tables and change functions is determined by the same security model as the SQL Server CDC. 有关安全模式的详细信息,请参阅 安全模式。For more information about the security model, see Security Model.

创建 CDC 数据库Creating the CDC Database

在大多数情况下,CDC 数据库是使用 CDC 设计器控制台创建的,但也可以使用通过 CDC 设计器控制台生成的 CDC 部署脚本创建 CDC 数据库。In most cases, the CDC database is created using the CDC Designer Console, but it can also be created with a CDC deployment script that is generated using the CDC Designer Console. SQL ServerSQL Server 系统管理员可根据需要更改数据库设置(对于用于存储、安全性或可用性之类的项)。The SQL ServerSQL Server system administrator can change the database settings if necessary (for items such as for storage, security, or availability).

有关使用 CDC 设计器控制台创建数据库表和所需脚本的详细信息,请参阅 使用新建实例向导。For more information about using the CDC Designer Console to create the database tables and the necessary scripts, see Use the New Instance Wizard.

CDC 数据库用户角色CDC Database User Roles

为 CDC 创建并启用 CDC 数据库时,将在该 CDC 数据库中创建一个名为 cdc_service 的数据库用户,该用户与用其配置 Oracle CDC 服务的 SQL ServerSQL Server 登录名关联。When a CDC Database is created and enabled for CDC, a database user called cdc_service is created in the CDC database and is associated with the SQL ServerSQL Server login that the Oracle CDC Service was configured with. 该用户将成为 db_datareader、 db_datawriter和 db_ddladmin 数据库角色的成员。This user is made a member of the db_datareader, db_datawriter, and db_ddladmin database roles. 如果 SQL ServerSQL Server 登录名也与 dbo 用户相关联,则不会创建 cdc_service 。If the SQL ServerSQL Server login is also the associated with the dbo user then the cdc_service is not created.

此角色分配允许 Oracle CDC 服务使用捕获的数据和控制信息更新 cdc 架构下的表。This role assignment allows the Oracle CDC Service to update the tables under the cdc schema with captured data and with control information.

在创建 CDC 数据库和设置 CDC 源 Oracle 表时,CDC 数据库所有者可授予镜像表的 SELECT 权限并且定义 SQL Server CDC 访问控制角色以便控制谁可以访问更改数据。When a CDC database is created and CDC source Oracle tables are set up, the CDC database owner can grant SELECT permission of mirror tables and define SQL Server CDC gating roles to control who accesses the change data.

镜像表Mirror Tables

对于 Oracle 源数据库中的每个捕获表 .,将使用相同的架构和表名称在 CDC 数据库中创建一个类似的空表。For each captured table, ., in the Oracle source database, a similar empty table is created in the CDC Database, with the same schema and table name. 具有架构名称 cdc (不区分大小写)的 Oracle 源表无法捕获,因为 cdc 中的 SQL ServerSQL Server 架构是为 SQL Server CDC 保留的。Oracle source tables with the schema name cdc (not case sensitive) cannot be captured because the cdc schema in SQL ServerSQL Server is reserved for the SQL Server CDC.

镜像表是空的;在其中不存储任何数据。The mirror tables are empty; no data is stored in them. 它们用于启用 Oracle CDC 实例使用的标准 SQL Server CDC 基础结构。They are used to enable the standard SQL Server CDC infrastructure that is used by the Oracle CDC Instance. 为了防止数据插入或更新到镜像表中,对于 PUBLIC 将拒绝所有 UPDATE、DELETE 和 INSERT 操作。To prevent data from being inserted or updated into the mirror tables, all UPDATE, DELETE, and INSERT operations are denied for PUBLIC. 这将确保不能修改镜像表。This ensures that they cannot be modified.

访问更改数据Access to Change Data

由于用于获取对与某一捕获实例相关联的更改数据库的访问权限的 SQL ServerSQL Server 安全模式,必须向用户授予对关联镜像表的所有捕获列的 select 访问权限(对原始 Oracle 表的访问权限不提供对 SQL ServerSQL Server中更改表的访问权限)。Because of the SQL ServerSQL Server security model used to gain access to the change data that is associated with a capture instance, the user must be granted select access to all the captured columns of the associated mirror table (access permissions to the original Oracle tables do not provide access to the change tables in SQL ServerSQL Server). 有关 SQL ServerSQL Server 安全模式的信息,请参阅 安全模式。For information on the SQL ServerSQL Server security model, see Security Model.

此外,如果在创建捕获实例时指定了访问控制角色,调用者还必须是指定访问控制角色的成员。In addition, if a gating role is specified when the capture instance is created, the caller must also be a member of the specified gating role. 所有数据库用户可通过 PUBLIC 角色访问用于访问元数据的其他常规变更数据捕获功能,但返回的元数据访问通常是使用基础源表的选择访问权限以及任何定义的访问控制角色成员身份控制的。Other general change data capture functions for accessing metadata are accessible to all database users through the PUBLIC role, although access to the returned metadata is usually gated by using select access to the underlying source tables, and by membership in any defined gating roles.

可通过调用在创建捕获实例时 SQL Server CDC 组件生成的特殊的基于表的函数,读取更改数据。Change data may be read by calling special table-based functions generated by the SQL Server CDC component when a capture instance is created. For more information about this function, see Change Data Capture Functions (Transact-SQL).

通过 Integration ServicesIntegration Services CDC 源组件访问 CDC 数据受到相同规则的约束。Accessing CDC data through the Integration ServicesIntegration Services CDC Source component is subject to the same rules.

CDC 数据库表The CDC Database Tables

本节介绍 CDC 数据库中的以下表。This section describes the following tables in the CDC database.

更改表 (_CT)Change Tables (_CT)

更改表是从镜像表创建的。The change tables are created from the mirror tables. 它们包含从 Oracle 数据库捕获的更改数据。They contain the change data that is captured from the Oracle database. 根据以下约定命名这些表:The tables are named according to the following convention:

[cdc].[_CT][cdc].[_CT]

在最初为表 .启用捕获时,默认捕获实例名称为 _。When capture is initially enabled for table ., the default capture instance name is _. 例如,Oracle HR.EMPLOYEES 表的默认捕获实例名称为 HR_EMPLOYEES,而关联的更改表为 [cdc]。For example, the default capture instance name for the Oracle HR.EMPLOYEES table is HR_EMPLOYEES and the associated change table is [cdc]. [HR_EMPLOYEES_CT]。[HR_EMPLOYEES_CT].

捕获表由 Oracle CDC 实例写入。The capture tables are written to by the Oracle CDC Instance. 使用在创建捕获实例时由 SQL ServerSQL Server 生成的特殊表值函数读取捕获表。They are read using special table-valued functions generated by SQL ServerSQL Server when the capture instance is created. 例如,fn_cdc_get_all_changes_HR_EMPLOYEES 。For example, fn_cdc_get_all_changes_HR_EMPLOYEES. For more information about these CDC functions see Change Data Capture Functions (Transact-SQL).

cdc.lsn_time_mappingcdc.lsn_time_mapping

[cdc].[lsn_time_mapping] 表由 SQL Server CDC 组件生成。The [cdc].[lsn_time_mapping] table is generated by the SQL Server CDC component. 它在 Oracle CDC 情况下的用法与其常规用法不同。Its use in the case of Oracle CDC is different than its normal use.

对于 Oracle CDC,在此表中存储的 LSN 值基于与更改相关联的 Oracle 系统更改号 (SCN) 值。For the Oracle CDC, the LSN values stored in this table are based on the Oracle System Change Number (SCN) value associated with the change. 该 LSN 值的前 6 个字节是原始 Oracle SCN 号。The first 6 bytes of the LSN value is the original Oracle SCN number.

此外,在使用 Oracle CDC 时,时间列(tran_begin_time 和 tran_end_time)存储更改的 UTC 时间而非本地时间,就像它对待常规 SQL Server CDC 一样。Also when using the Oracle CDC, the time columns (tran_begin_time and tran_end_time) store the UTC time of the change rather than the local time as it does with the regular SQL Server CDC. 这可以确保夏时制时间更改不会影响存储在 lsn_time_mapping 中的数据。This ensures that daylight savings time changes do not impact the data stored in the lsn_time_mapping.

cdc.xdbcdc_configcdc.xdbcdc_config

此表包含 Oracle CDC 实例的配置数据。This table contains the configuration data for the Oracle CDC Instance. 它是使用 CDC 设计器控制台更新的。It is updated using the CDC Designer Console. 该表仅具有一行。This table has only one row.

下表介绍了 cdc.xdbcdc_config 表的各列。The following table describes the cdc.xdbcdc_config table columns.

ItemItem

说明Description

版本version

它跟踪 CDC 实例配置的版本。This keeps track of the version of the CDC instance configuration. 在每次更新表时,以及在每次添加新的捕获实例或删除现有捕获实例时,将更新该项。It is updated each time that the table is updated and each time a new capture instance is added or an existing capture instance is removed.

connect_stringconnect_string

Oracle 连接字符串。An Oracle connection string. 下面是一个基本示例:A basic example is:

:/ (例如 erp.contoso.com:1521/orcl)。:/ (for example, erp.contoso.com:1521/orcl).

连接字符串还可以指定 Oracle Net 连接描述符,例如 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=erp.contoso.com) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=orcl)))。The connection string can also specify an Oracle Net connect descriptor, for example, (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp) (HOST=erp.contoso.com) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=orcl))).

如果使用目录服务器或 tnsnames,则连接字符串可以是连接的名称。If using a directory server or tnsnames, the connect string can be the name of the connection.

有关 Oracle 连接字符串的详细信息,请参阅 https://go.microsoft.com/fwlink/?LinkId=231153,其中介绍了针对 Oracle CDC 服务使用的 Oracle Instant Client 的 Oracle 数据库连接字符串的详细信息。For more information about Oracle connection strings, see https://go.microsoft.com/fwlink/?LinkId=231153 for detailed information on Oracle database connection strings for the Oracle Instant Client that is used by the Oracle CDC Service.

use_windows_authenticationuse_windows_authentication

可以取以下值的布尔值:A Boolean value that can be:

0:提供 Oracle 用户名和密码进行身份验证(默认值)0: An Oracle user name and password are provided for authentication (the default)

1:使用 Windows 身份验证连接到 Oracle 数据库。1: Windows authentication is used to connect to the Oracle database. 只有当 Oracle 数据库配置为使用 Windows 身份验证时,才可以使用此选项。You can use this option only if the Oracle database is configured to work with Windows authentication.

usernameusername

日志挖掘 Oracle 数据库用户的名称。The name of the log-mining Oracle database user. 仅当 use_windows_authentication = 0时,该值才是必填的。This is mandatory only if use_windows_authentication = 0.

passwordpassword

日志挖掘 Oracle 数据库用户的密码。The password for the log-mining Oracle database user. 仅当 use_windows_authentication = 0时,该值才是必填的。This is mandatory only if use_windows_authentication = 0.

transaction_staging_timeouttransaction_staging_timeout

未提交的 Oracle 事务保留在内存中的时间(秒),超过该时间后,这些事务将写入 cdc.xdbcdc_staged_transactions 表。The time, in seconds, that an uncommitted Oracle transaction is kept in memory before being written to the cdc.xdbcdc_staged_transactions table. 默认值为 120 秒。The default is 120 seconds.

memory_limitmemory_limit

可用于在内存中缓存数据的内存量的限制 (Mb)。The limit on the amount of memory, in Mb, that can be used for caching data in memory. 较低的设置将导致更多事务写入 cdc.xdbcdc_staged_transactions 表。A lower setting causes more transaction to be written to the cdc.xdbcdc_staged_transactions table. 默认值为 50 Mb。The default is 50 Mb.

选项options

name[=value][; ] 形式的选项的列表 - 用于指定辅助选项(例如跟踪、优化)。A list of options in the form of name[=value][; ] - it is used for specifying secondary options (for example, tracing, tuning). 有关可用选项的说明,请参阅下表。See the table below for a description of the available options.

下表介绍了可用的选项。The following table describes the available options.

名称Name

默认Default

MinMin

MaxMax

静态Static

说明Description

跟踪trace

FalseFalse

-

-

FalseFalse

可用值有:The available values are:

TrueTrue

FalseFalse

onon

关闭off

cdc_update_state_intervalcdc_update_state_interval

1010

11

120120

FalseFalse

为某一事务分配的内存块的大小(一个事务可分配多个块)(KB)。The size (in Kbytes) of memory chunks allocated for a transaction (a transaction can allocate more than one chunk). 请参阅 cdc.xdbcdc_config 表中的 memory_limit 列。See the memory_limit column in cdc.xdbcdc_config table.

target_max_batched_transactionstarget_max_batched_transactions

100100

11

10001000

TrueTrue

可在 SQL Server CT 表更新中作为一个事务处理的 Oracle 事务的最大数目。The maximum number of Oracle transactions that can be processed as one transaction in SQL Server CT tables update.

target_idle_lsn_update_intervaltarget_idle_lsn_update_interval

1010

00

11

FalseFalse

用于在捕获表没有任何活动时更新 lsn_time_mapping 表的时间间隔(秒)。The interval (in seconds) for updating the lsn_time_mapping table when the captured tables have no activity.

trace_retention_periodtrace_retention_period

2424

11

24*3124*31

FalseFalse

时间量(在跟踪表中保存消息的小时数)。The amount of time (in hours to keep messages in the trace table).

sql_reconnect_intervalsql_reconnect_interval

22

22

36003600

FalseFalse

在重新连接到 SQL ServerSQL Server前等待的时间量(秒)。The amount of time (in seconds) to wait before reconnecting to SQL ServerSQL Server. 此时间间隔与 SQL ServerSQL Server 客户端的连接超时一起使用。This interval is used in addition to SQL ServerSQL Server client's connect timeout.

sql_reconnect_limitsql_reconnect_limit

-1-1

-1-1

-1-1

FalseFalse

SQL ServerSQL Server 重新连接的最大数目。The maximum number of SQL ServerSQL Server reconnections. 默认值为 -1,表示进程在停止前将一直尝试重新连接。The default -1 means that the process tries to reconnect until it stops.

cdc_restart_limitcdc_restart_limit

66

-1-1

36003600

FalseFalse

在大多数情况下,CDC 服务将自动重新启动异常结束的 CDC 实例。In most cases, the CDC service restarts an abnormally ended CDC instance automatically. 此属性定义每小时失败多少次后服务将停止重新启动实例。This property defines after how many failures per hour the service stops to restart the instance. 值 -1 表示应始终重新启动实例。The value -1 means that the instance should be always restarted.

服务将在对配置表的任何更新后返回到重新启动实例。The Service returns to restart the instance after any update of the configuration table.

cdc_memory_reportcdc_memory_report

00

00

10001000

FalseFalse

如果更改了该参数的值,CDC 实例将在跟踪表上打印其内存报告。If the value of the parameter was changed, the CDC Instance prints its memory report on the trace table.

target_command_timeouttarget_command_timeout

600600

11

36003600

FalseFalse

使用 SQL ServerSQL Server时的命令超时。Command timeout working with SQL ServerSQL Server.

source_character_setsource_character_set

-

-

-

TrueTrue

可设置为使用特定的 Oracle 编码,而非使用 Oracle 数据库代码页。Can be set to a specific Oracle encoding to be used instead of the Oracle database codepage. 这在所使用的字符数据的实际编码方式不同于 Oracle 数据库代码页所表示的方式时很有用。This may be of use when the actual encoding the character data is using is different than the one expressed by the Oracle database codepage.

source_error_retry_intervalsource_error_retry_interval

3030

11

36003600

FalseFalse

在因若干错误(例如连接错误或在系统表之间暂时丢失同步)而重试之前使用。Used before retry on several errors such as a connection error or temporary lack of synchronization between system tables.

source_prefetch_sizesource_prefetch_size

100100

11

1000010000

TrueTrue

预提取批处理的大小。Size of the prefetch batch.

source_max_tables_in_querysource_max_tables_in_query

100100

11

1000010000

TrueTrue

切换到读取 Oracle 日志而不进行表筛选之前 WHERE 子句中的表的最大数目。Maximum number of tables in WHERE clause before switching to reading the Oracle log without table filtering.

source_read_retry_intervalsource_read_retry_interval

22

11

36003600

FalseFalse

源在尝试再次读取 EOF 上的 Oracle 事务日志之前等待的时间。The amount of time the source waits before trying to read the Oracle transaction logs on EOF again.

source_reconnect_intervalsource_reconnect_interval

3030

11

36003600

FalseFalse

等待多长时间后将尝试重新连接到源数据库(秒)。How long (in seconds) to wait before trying to re-connect to the source database.

source_reconnect_limitsource_reconnect_limit

-1-1

-1-1

FalseFalse

源数据库重新连接的最大数目。The maximum number of the source database reconnections. 默认值为 -1,表示进程在停止前将一直尝试重新连接。The default -1 means that the process tries to reconnect until it is stopped.

source_command_timeoutsource_command_timeout

3030

11

36003600

FalseFalse

使用 Oracle 时的连接超时。Connection timeout working with Oracle.

source_connection_timeoutsource_connection_timeout

3030

11

36003600

FalseFalse

使用 SQL ServerSQL Server时的连接超时。Connection timeout working with SQL ServerSQL Server.

trace_data_errorstrace_data_errors

TrueTrue

-

-

FalseFalse

布尔值。Boolean. True 指示记录数据转换和截断错误。True indicates to log data conversion and truncation errors.

CDC_stop_on_breaking_schema_changesCDC_stop_on_breaking_schema_changes

FalseFalse

-

-

FalseFalse

布尔值。Boolean. True 指示当检测到中断的架构更改时停止。True indicates to stop when breaking schema change is detected.

False 指示删除镜像表和捕获实例。False indicates to drop the mirror table and capture instance.

source_oracle_homesource_oracle_home

-

-

FalseFalse

可设置为 CDC 实例将用于连接到 Oracle 的特定 Oracle 主页路径或 Oracle 主页名称。Can be set to a specific Oracle Home path or an Oracle Home Name that the CDC instance will use to connect to Oracle.

cdc.xdbcdc_statecdc.xdbcdc_state

此表包含与 Oracle CDC 实例的持久化状态有关的信息。This table contains information about the persisted state of the Oracle CDC Instance. 该捕获状态用于恢复和故障转移情况以及用于运行状况监视。The capture state is used in recovery and fail-over scenarios and for health monitoring.

下表介绍了 cdc.xdbcdc_state 表的各列。The following table describes the cdc.xdbcdc_state table columns.

ItemItem

说明Description

statusstatus

用于当前 Oracle CDC 实例的当前状态代码。The current status code for the current Oracle CDC Instance. 该状态描述 CDC 的当前状态。The status describes the current state for the CDC.

sub_statussub_status

提供有关当前状态的其他信息的第二级状态。A second level status that provides additional information about the current status.

活动active

可以取以下值的布尔值:A Boolean value that can be:

0:Oracle CDC 实例进程处于不活动状态。0: The Oracle CDC Instance process is not active.

1:Oracle CDC 实例进程处于活动状态。1: The Oracle CDC Instance process is active.

errorerror

可以取以下值的布尔值:A Boolean value that can be:

0:Oracle CDC 实例进程未处于错误状态。0: The Oracle CDC Instance process is not in an error state.

1:Oracle CDC 实例处于错误状态。1: The Oracle CDC Instance is in an error state.

status_messagestatus_message

提供错误或状态的说明的字符串。A string that provides a description of the error or status.

timestamptimestamp

具有上次更新捕获状态的时间 (UTC) 的时间戳。The timestamp with the time (UTC) that the capture state was last updated.

active_capture_nodeactive_capture_node

当前正运行 Oracle CDC 服务和 Oracle CDC 实例(正在处理 Oracle 事务日志)的主机(该主机可以是群集上的节点)的名称。The name of the host (the host can be a node on a cluster) that is currently running the Oracle CDC Service and the Oracle CDC Instance (which is processing the Oracle transaction logs).

last_transaction_timestamplast_transaction_timestamp

具有事务上次写入更改表的时间 (UTC) 的时间戳。A timestamp with the time (UTC) when the last transaction that was written to the change tables.

last_change_timestamplast_change_timestamp

具有从源 Oracle 事务日志读取最近更改记录的时间 (UTC) 的时间戳。A timestamp with the time (UTC) when the most recent change record was read from the source Oracle transaction log. 此时间戳有助于标识 CDC 进程的当前延迟。This timestamp helps to identify the current latency of the CDC process.

transaction_log_head_cntransaction_log_head_cn

从 Oracle 事务日志读取的最近更改号 (CN)。The most recent change number (CN) read from the Oracle transaction log.

transaction_log_tail_cntransaction_log_tail_cn

Oracle CDC 实例在重新启动或恢复时重新定位到的 Oracle 事务日志上的更改号 (CN)。The change number (CN) on the Oracle transaction log where the Oracle CDC Instance repositions to in case of a restart or recovery.

current_cncurrent_cn

源数据库中已知的最新更改号 (CN)。The most recent change number (CN) known to be in the source database.

software_versionsoftware_version

Oracle CDC 服务的内部版本。The internal version of the Oracle CDC Service.

completed_transactionscompleted_transactions

自上次重置 CDC 以来处理的事务的数目。The number of transactions processed since the CDC was last reset.

written_changeswritten_changes

写入 SQL ServerSQL Server 更改表的更改记录的数目。The number of change records written to the SQL ServerSQL Server change tables.

read_changesread_changes

从源 Oracle 事务日志读取的更改记录的数目。The number of change records read from the source Oracle transaction log.

staged_transactionsstaged_transactions

cdc.xdbcdc_staged_transactions 表中暂存的当前处于活动状态的事务数目。The number of currently active transactions that are staged in the cdc.xdbcdc_staged_transactions table.

cdc.xdbcdc_tracecdc.xdbcdc_trace

此表包含与 CDC 实例的操作有关的信息。This table contains information about the operation of the CDC instance. 此表中存储的信息包括错误记录、显著的状态更改和跟踪记录。Information stored in this table includes error records, notable status changes, and trace records. 错误信息还写入 Windows 事件日志,以便确保在 cdc.xcbcdc_trace 表不可用时提供这些信息。Error information is also written to the Windows event log to ensure that the information is available if the cdc.xcbcdc_trace table is unavailable.

下表描述 cdc.xdbcdc_trace 表的各列。The following table describes the cdc.xdbcdc_trace table columns.

ItemItem

说明Description

timestamptimestamp

写入跟踪日志时的准确 UTC 时间戳。The exact UTC timestamp when the trace record was written.

typetype

包含以下值之一。Contains one of the following values.

ERRORERROR

INFOINFO

TRACETRACE

节点node

写入记录的节点的名称。The name of the node on which the record was written.

statusstatus

状态表使用的状态代码。The status code that is used by the state table.

sub_statussub_status

状态表使用的子状态代码。The sub-status code that is used by the state table.

status_messagestatus_message

状态表使用的状态消息。The status message that is used by the state table.

datadata

在错误或跟踪记录包含负载(例如,损坏的日志记录)时的附加数据。Additional data for cases when the error or trace record contains a payload (for example, a corrupted log record).

cdc.xdbcdc_staged_transactionscdc.xdbcdc_staged_transactions

此表存储在捕获事务提交或回滚事件前大型或长时间运行的事务的更改记录。This table stores change records for large or long-running transactions until the transaction commit or rollback event is captured. Oracle CDC 服务首先按事务提交时间、然后按各事务的时间顺序对捕获的日志记录进行排序。The Oracle CDC Service orders captured log records by transaction commit time and then by chronological order for each transaction. 在事务结束前同一事务的日志记录将存储在内存中,然后写入目标更改表或被放弃(在回滚时)。Log records for the same transaction are stored in memory until the transaction ends and then are written to the target change table or discarded (in case of a rollback). 因为只有有限的可用内存量,所以,大型事务将在事务完成前写入 cdc.xdbcdc_staged_transactions 表。Because there is a limited amount of memory available, large transactions are written into the cdc.xdbcdc_staged_transactions table until the transaction is complete. 事务还会在长时间运行时写入临时表。Transactions are also written to the staging table when they run for a long time. 因此,在 Oracle CDC 实例重新启动时,无需从 Oracle 事务日志重新读取旧的更改。Therefore, when the Oracle CDC Instance is restarted, the old changes do not need to be re-read from the Oracle transaction logs.

下表介绍了 cdc.xdbcdc_staged_transactions 表的各列。The following table describes the cdc.xdbcdc_staged_transactions table columns.

ItemItem

说明Description

transaction_idtransaction_id

要暂存的事务的唯一事务标识符。The unique transaction identifier of the transaction being staged.

seq_numseq_num

当前事务的 xcbcdc_staged_transactions 行的编号(从 0 开始)。The number of xcbcdc_staged_transactions row for the current transaction (starting with 0).

data_start_cndata_start_cn

此行中数据的第一个更改的更改号 (CN)。The change number (CN) for the first change in the data in this row.

data_end_cndata_end_cn

此行中数据的最后一个更改的更改号 (CN)。The change number (CN) for the last change in the data in this row.

datadata

事务的 BLOB 形式的暂存的更改。The staged changes for the transaction in the form of a BLOB.

另请参阅See Also

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值