ORA-00001: unique CONSTRAINT (RCAT.TF_U2) violated

每天的备份出错,信息如下:

connected to target database: GZDM (DBID=1879443745)
connected to recovery catalog database

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33>
34> 35> 36> 37> 38> 39> 40> 41> 42> RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24
> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37> 38> 39> 40> 41> 42>
starting full resync of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of allocate command at 03/19/2008 20:49:50
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 03/19/2008 20:49:50
ORA-00001: unique CONSTRAINT (RCAT.TF_U2) violated

[@more@]

解决过程:

SQL> select dbms_metadata.get_ddl('CONSTRAINT','TF_U2','RCAT') from dual;

DBMS_METADATA.GET_DDL('CONSTRAINT','TF_U2','RCAT')
--------------------------------------------------------------------------------

ALTER TABLE "RCAT"."TF" ADD CONSTRAINT "TF_U2" UNIQUE ("DBINC_KEY", "TS#", "TS_CREATE_SCN", "FILE#")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "RMAN" ENABLE

SQL> select DBID,NAME,DBINC_KEY, RESETLOGS_CHANGE#, RESETLOGS_TIME from rcat.rc_database_incarnation where dbid=1879443745

DBID NAME DBINC_KEY RESETLOGS_CHANGE# RESETLOGS_TI
---------- -------- ---------- ----------------- ------------
1879443745 GZDM 110472 1 07-MAR-07

SQL> select distinct "DBINC_KEY", "TS#", "TS_CREATE_SCN", "FILE#" from rcat.tf where DBINC_KEY=110472;

DBINC_KEY TS# TS_CREATE_SCN FILE#
---------- ---------- ------------- ----------
110472 3 7327 1
110472 3 7327 2
110472 3 7327 3
110472 3 7327 4
110472 3 7327 5
110472 3 7327 6
110472 3 7327 7
110472 3 7327 8
110472 3 7327 9
110472 3 7327 10
110472 3 7327 11
110472 3 7327 12
110472 3 7327 13
110472 3 7327 14
110472 3 7327 15
110472 3 7327 16
110472 3 7327 17
110472 3 7327 18
110472 3 7327 19
110472 3 7327 20
110472 3 7327 21
110472 3 7327 22
110472 3 7327 23
110472 3 7327 24
110472 3 7327 25
110472 3 7327 26
110472 3 7327 27
110472 3 7327 28
110472 3 7327 29
110472 3 7327 30
110472 3 7327 31
110472 3 7327 32
110472 3 7327 33
110472 3 7327 34
110472 3 7327 35
110472 3 7327 36
110472 3 7327 37
110472 3 7327 38
110472 3 7327 39
110472 3 7327 40
110472 3 7327 41
110472 3 7327 42
110472 3 7327 43
110472 3 7327 44
110472 3 7327 45
110472 3 7327 46
110472 3 7327 47
110472 3 7327 48
110472 3 7327 49
110472 3 7327 50

50 rows selected.

SQL> connect rcat/rcat
Connected.
SQL> select index_name ,status from user_indexes where index_name='TF_U2';

INDEX_NAME STATUS
------------------------------ --------
TF_U2 VALID

SQL> create table bulk as select *from rcat.tf where DBINC_KEY=110472;

Table created.

SQL> delete from rcat.tf where DBINC_KEY=110472 and FILE#=50;

1 row deleted.

SQL> commit;

Commit complete.

SQL> delete from rcat.tf where DBINC_KEY=110472;

49 rows deleted.

SQL> commit;

Commit complete.

SQL> select distinct "DBINC_KEY", "TS#", "TS_CREATE_SCN", "FILE#" from rcat.tf where DBINC_KEY=110472;

no rows selected

SQL> select distinct "DBINC_KEY", "TS#", "TS_CREATE_SCN", "FILE#" from rcat.tf where DBINC_KEY=110472;

no rows selected

SQL> select distinct "DBINC_KEY", "TS#", "TS_CREATE_SCN", "FILE#" from rcat.tf where DBINC_KEY=110472;

DBINC_KEY TS# TS_CREATE_SCN FILE#
---------- ---------- ------------- ----------
110472 3 7327 1
110472 3 7327 2
110472 3 7327 3
110472 3 7327 4
110472 3 7327 5
110472 3 7327 6
110472 3 7327 7
110472 3 7327 8
110472 3 7327 9
110472 3 7327 10
110472 3 7327 11
110472 3 7327 12
110472 3 7327 13
110472 3 7327 14
110472 3 7327 15
110472 3 7327 16
110472 3 7327 17
110472 3 7327 18
110472 3 7327 19
110472 3 7327 20
110472 3 7327 21
110472 3 7327 22
110472 3 7327 23
110472 3 7327 24
110472 3 7327 25
110472 3 7327 26
110472 3 7327 27
110472 3 7327 28
110472 3 7327 29
110472 3 7327 30
110472 3 7327 31
110472 3 7327 32
110472 3 7327 33
110472 3 7327 34
110472 3 7327 35
110472 3 7327 36
110472 3 7327 37
110472 3 7327 38
110472 3 7327 39
110472 3 7327 40
110472 3 7327 41
110472 3 7327 42
110472 3 7327 43
110472 3 7327 44
110472 3 7327 45
110472 3 7327 46
110472 3 7327 47
110472 3 7327 48
110472 3 7327 49
110472 3 7327 50

50 rows selected.

再执行备份,或者连接RMAN,随便敲命令,如:SHOW ALL等,已经不再报错

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/58242/viewspace-1001269/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/58242/viewspace-1001269/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值