Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

40

积分

0

好友

14

主题
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'的如何去操作?
2#
发表于 2013-4-4 14:41:40
BAD_COLUMN = 'Y'  ==> 增加逻辑主键 或 对信任可保持主键约束的 字段加ADD PRIMARY KEY RELY DISABLE;


BAD_COLUMN = 'N'==》最好还是能有 主键

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-27 16:29 , Processed in 0.047385 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569