ORA-00001: unique constraint (PERFSTAT.STATS$SQL_SUMMARY_PK) violated 解決方法
今天在使用者那用statspack收集資訊做效能診斷時,job報以下錯誤
Sat Jul 11 21:11:26 2009
Errors in file /software/oracle/admin/sbzjdb/bdump/sbzjdb_j000_1151216.trc:
ORA-12012: error on auto execute of job 46
ORA-00001: unique constraint (PERFSTAT.STATS$SQL_SUMMARY_PK) violated
ORA-06512: at "PERFSTAT.STATSPACK", line 1361
ORA-06512: at "PERFSTAT.STATSPACK", line 2471
ORA-06512: at "PERFSTAT.STATSPACK", line 91
透過查metalink是一個bug,是cursor_sharing引數設定為force或simliar後才會出現的
bug號為2784796
可以有以下幾種解決方法:
1.禁用主鍵
ALTER TABLE PERFSTAT.STATS$SQL_SUMMARY MODIFY CONSTRAINT STATS$SQL_SUMMARY_PK DISABLE NOVALIDATE;
然後建立同樣結構的非唯一性索引
2.建立個檢視
create or replace view STATS$V_$SQLXS as
select max(sql_text) sql_text
, sum(sharable_mem) sharable_mem
, sum(sorts) sorts
, min(module) module
, sum(loaded_versions) loaded_versions
, sum(fetches) fetches
, sum(executions) executions
, sum(loads) loads
, sum(invalidations) invalidations
, sum(parse_calls) parse_calls
, sum(disk_reads) disk_reads
, sum(buffer_gets) buffer_gets
, sum(rows_processed) rows_processed
, max(command_type) command_type
, address address
, hash_value hash_value
, count(1) version_count
, sum(cpu_time) cpu_time
, sum(elapsed_time) elapsed_time
, max(outline_sid) outline_sid
, max(outline_category) outline_category
, max(is_obsolete) is_obsolete
, max(child_latch) child_latch
from v$sql
where ( plan_hash_value > 0
or executions > 0
or parse_calls > 0
or disk_reads > 0
or buffer_gets > 0
)
group by hash_value, address;
create or replace public synonym STATS$V$SQLXS for STATS$V_$SQLXS;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-611620/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-00001 Unique Constraint SYS.I_JOB_JOB ViolatedAI
- ORA-00001 : Unique Constraint Violated caused by DATE VS Timestamp(6)AI
- ORA-00001: UNIQUE CONSTRAINT (SYS.WRI$_SQLSET_PLANS_PK) VIOLATEDAISQL
- ORA-00001: unique constraint (...) violated並不一定是資料衝突AI
- Bug 2784796: ORA-00001:UNIQUE CONSTRAINTAI
- :[IBM][ODBC Oracle Wire Protocol driver][Oracle]ORA-00001: unique constraint (SCIBMOracleProtocolAI
- Data Warehouse Guide閱讀筆記(六):unique constraint & unique indexGUIIDE筆記AIIndex
- constraint enable,disable的問題解決AI
- ORA-02292: integrity constraint (xxxx) violated - child record foundAI
- 建立外來鍵時報 Cannot add foreign key constraint 解決方法AI
- Bug 9290526 - Poor plan for recursive SQL used for DML involving a UNIQUE constraint [ID 9290526.8]SQLAI
- MySQL——約束(constraint)詳解MySqlAI
- 慎用PHP的unset、array_unique方法PHP
- 使用deferred constraint 解決“先有蛋還是先有雞的問題”AI
- ConstraintAI
- TabError的解決方法Error
- EXE病毒解決方法
- ArtifactDescriptorException的解決方法Exception
- Unique Array
- 分散式系統中 Unique ID 的生成方法分散式
- MySQL中的 UNIQUE約束和UNIQUE索引MySql索引
- 【YashanDB資料庫】自關聯外來鍵插入資料時報錯:YAS-02033 foreign key constraint violated parent key not found資料庫AI
- linux解壓報錯gzip: stdin: invalid compressed data--format violatedLinuxORM
- 多執行緒05:unique_lock詳解執行緒
- SERVICE問題解決方法
- No Task Available解決方法AI
- No input file specified 解決方法
- ANR原因及解決方法
- pyenv BUILD FAILED解決方法UIAI
- defunct僵死程式解決方法
- putty亂碼解決方法
- hash衝突解決方法
- dns劫持怎麼解決 dns劫持的解決方法DNS
- javaweb中中文亂碼解決方法總結之response和request解決方法JavaWeb
- 約束CONSTRAINTAI
- constraint約束AI
- Unused&ConstraintAI
- hive使用報錯解決方法Hive