- 最后登录
- 2015-6-2
- 在线时间
- 38 小时
- 威望
- 40
- 金钱
- 122
- 注册时间
- 2012-1-4
- 阅读权限
- 10
- 帖子
- 48
- 精华
- 0
- 积分
- 40
- UID
- 143
|
1#
发表于 2013-4-4 14:34:40
|
查看: 2428 |
回复: 1
我的 db是 10.2.0.4。
想做logic standby。但是查了资料说。
DBA_LOGSTDBY_NOT_UNIQUE视图来获得系统中没有主键或者唯一键的表的情况
但是不知道这个表具体如何去理解DBA_LOGSTDBY_NOT_UNIQUE:
DBA_LOGSTDBY_NOT_UNIQUE displays all tables that have no primary and no non-null unique indexes. Most of the tables displayed by this view are supported because their columns contain enough information to be maintained in a logical standby database. Some tables, however, cannot be supported because their columns do not contain the necessary information. Unsupported tables usually contain a column defined using an unsupported datatype.
有三个字段:OWNER TABLE_NAME
BAD_COLUMN
Table name of the non-unique table
•Y - Table column is defined using an unbounded data type, such as LONG or BLOB. If two rows in the table match except in their LOB columns, then the table cannot be maintained properly. Log apply services will attempt to maintain these tables, but you must ensure the application does not allow uniqueness only in the unbounded columns.
•
N - Enough column information is present to maintain the table in the logical standby database but the log transport services and log apply services would run more efficiently if you added a primary key. You should consider adding a disabled RELY constraint to these tables.
SYS@yang>select owner,table_name from DBA_LOGSTDBY_NOT_UNIQUE;
SQL> SELECT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_NOT_UNIQUE WHERE (OWNER, TABLE_NAME) NOT IN (SELECT DISTINCT OWNER, TABLE_NAME FROM DBA_LOGSTDBY_UNSUPPORTED) AND BAD_COLUMN = 'Y';
OWNER TABLE_NAME
------------------------------ ------------------------------
TSMSYS SRS$
crmyt SQLEXPERT_PLAN1
crmyt PUB_RPT
crmyt PLAN_TABLE
SQL> select count(*) from DBA_LOGSTDBY_NOT_UNIQUE;
COUNT(*)
----------
318 这318个包括 314个 BAD_COLUMN = 'N'
不知道如何接下来去设置。 是对 BAD_COLUMN = 'Y'的如何去操作?
对 BAD_COLUMN = 'N'的如何去操作? |
|