广告
返回顶部
首页 > 资讯 > 数据库 >Oracle GoldenGate 针对表没有主键或唯一索引的解决方案
  • 526
分享到

Oracle GoldenGate 针对表没有主键或唯一索引的解决方案

2024-04-02 19:04:59 526人浏览 泡泡鱼
摘要

Http://blog.itpub.net/28258625/viewspace-2060713 This knowledge document describes a best p

Http://blog.itpub.net/28258625/viewspace-2060713


This knowledge document describes a best practice method for handling tables without primary keys or unique indexes when using oracle GoldenGate to replicate transactional data between Oracle databases.

There is a  change log  at the end of this document.

In This Document

This document is divided into the following sections:

  • Section 1: Overview
  • Section 2: Configuring Tables without PKs or UIs
  • Section 3: References
  • Appendix A: Sample Table Configuration

Section 1:  Overview

1.1 Solution Summary

In order to maintain data integrity when replicating transactional data, Oracle GoldenGate will use primary key columns or unique index columns to uniquely identify a row when issuing update or delete statements against the target database. If no primary keys or unique indexes exist on the table being replicated, Oracle GoldenGate will use all columns to uniquely identify a row.

It is perfectly acceptable to use all columns to uniquely identify a row under the following conditions:

  • A logical key column cannot be defined for the table using the KEYCOLS parameter.
  • No duplicate rows exist in the table
  • Table contains a small number of rows, so full table lookups on the target database are minimal
  • Table DML activity is very low, so "all column" table supplemental log groups do not negatively impact the source database redo logs

If the table being replicated does not meet all of the conditions listed above, it is recommended to add a column to the table with a SYS_GUID default value to uniquely identify the row. The next section describes the detailed steps on how to configure a table without a primary key or unique index in order to uniquely identify each row.

1.2 Required Software Components

Software Component Minimum Version
Oracle Database

10.2 or greater

Oracle GoldenGate 10.4 or greater

 

Section 2:  Configuring Tables without PKs or UIs

2.1 Configure Table(s) in Source Database

Before instantiating the target database from a copy of source, perfORM. the following steps to the table(s) without primary keys or unique indexes.

Step 1 - Add Column to Table

Issue the following command to add the column to the table.

Replace <table_name> with the table name being modified.

alter table <table_name> add OGG_KEY_ID raw(16);

您可能感兴趣的文档:

--结束END--

本文标题: Oracle GoldenGate 针对表没有主键或唯一索引的解决方案

本文链接: https://www.lsjlt.com/news/49273.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作