主頁 > 資料庫 > ORA-20000: Unable to set values for index xxx: does not exist or insufficient privileges

ORA-20000: Unable to set values for index xxx: does not exist or insufficient privileges

2023-07-05 09:04:50 資料庫

使用expdp/impdp匯出匯入資料時,遇到ORA-2000錯誤,如下所示:

Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/COMMENT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
xxxx.xxxxx : sqlerrm = ORA-20000: Unable to set values for index xxx: does not exist or insufficient privileges
Importing statistics failed for 1 object(s); 

匯出環境為Oracle 12c,匯入的資料庫環境為Oracle 19c,具體版本為19.16.0.0.0,查了一下Oracle Support,剛好是遇到了Bug 30978304,關于為什么會出現這個錯誤,ORA-20000 from Data Pump Import (IMPDP) when PK Constraint does not Create a New Index (Doc ID 2679433.1)[1]中,有詳細的案例描述,這里就沒有必要自己再構造一個案例來描述出現ORA-20000錯誤的場景,具體如下所示:

APPLIES TO:
Oracle Database - Enterprise Edition - Version 19.1.0.0.0 and later
Information in this document applies to any platform.
SYMPTOMS
While running Data Pump Import (IMPDP) with STATISTICS, the order of creating indexes and constraints allowed a primary key constraint to reference a user created index rather than creating a new index as it should.
 
A simplified test case:
SQL> drop user INDEXTEST cascade;
SQL> create user INDEXTEST identified by INDEXTEST;
SQL> grant dba to INDEXTEST;
SQL> connect INDEXTEST/INDEXTEST
SQL> create table i_test (id number, t1 varchar2(100), t2 varchar2(100));
SQL> alter table i_test add constraint i_test_pk primary key (id, t1, t2);
SQL> insert into i_test values (1,1,1);
SQL> commit;
SQL> create unique index i_test_idx on i_test(id, t2, t1);
SQL> select index_name from user_indexes;
SQL> select constraint_name from user_constraints;
SQL> EXEC DBMS_STATS.GATHER_SCHEMA_STATS('INDEXTEST');
SQL> !expdp system/<Password> schemas=INDEXTEST dumpfile=INDEXTEST reuse_dumpfiles=y
SQL> connect system/<Password>
SQL> drop user INDEXTEST cascade;
SQL> !impdp system/<Password> schemas=INDEXTEST dumpfile=INDEXTEST

Import: Release 19.0.0.0.0 - Production on Mon Mar 2 19:08:53 2020 Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.

Connected to: Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Master table "SYSTEM"."SYS_IMPORT_SCHEMA_01" successfully loaded/unloaded
Starting "SYSTEM"."SYS_IMPORT_SCHEMA_01": system/******** schemas=INDEXTEST
dumpfile=INDEXTEST
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
. . imported "INDEXTEST"."I_TEST" 5.898 KB 1 rows
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Processing object type SCHEMA_EXPORT/STATISTICS/MARKER
INDEXTEST.I_TEST_PK : sqlerrm = ORA-20000: Unable to set values for index I_TEST_PK: does not exist or insufficient privileges Importing statistics failed for 1 object(s);
Job "SYSTEM"."SYS_IMPORT_SCHEMA_01" completed with 2 error(s) at Mon Mar 2
19:09:13 2020 elapsed 0 00:00:19

SQL> connect INDEXTEST/INDEXTEST
SQL> select index_name from user_indexes;
SQL> select constraint_name from user_constraints;
SQL> exit;
 
Note:  It was reported that this issue also exists when the column order is the same, but the user created index has an extra column.
 
CHANGES
The database was upgraded to 19c release or higher.  The issue did not reproduce in 12.2 or 18c environments.
 
CAUSE

This issue is caused by a product defect.
It was investigated in:
     unpublished Bug 30978304 - ORA-20000 DURING IMPDP WITH STATS AND THE UNIQUE INDEX FOR THE PK IS NOT CREATED
Reference:
     Bug 30978304 - ORA-20000 During Data Pump Import While Importing Statistics (Document 30978304.8)

Bug 30978304 - ORA-20000 During Data Pump Import While Importing Statistics (Doc ID 30978304.8)[2]影響的版本還蠻多的,如下截圖所示

Bug 30978304的詳細描述如下所示:

Description
ORA-20000 error was occurring with Data Pump importing statistics, with certain combinations of indexes.
This has now been fixed.
 
What Happens?
 
After importing a transportable tablespace, extents belonging to an index are
incorrectly marked as unallocated in the tablespace bitmaps. This leads to
objd mismatch asserts because such extents could eventually be allocated to
another object.
 
Conditions
 
The export-side must have the following properties:
 
There is a user-created table with a multi-column PK constraint in the table
DDL. This constraint has a system-generated unique index (say ABC).
There is a user-created unique index (say XYZ) on the same columns as the PK,
but the column ordering differs.
Note that if the column ordering matches, XYZ creation would have failed with
ORA-1408 and this bug wont occur.
 
Fix
 
The fix forces the creation of ABC earlier. This resolves the corruption
 
REDISCOVERY INFORMATION:
 
ORA-20000 occurring while impdp is importing statistics, when two or more indexes exist on a table and
one of them is a primary key index.
 
Additional symptoms:
 
TTS import from a 12.1 DB to 19c corrupts the Tablespace bitmaps which can
result in the following errors being raised for operations on segments
belonging to the Tablespace :
 
1. ORA-8103
2. ORA-600 [kcl_mismatch_1]
3. ORA-600 [kdifind:kcbz_objdchk]
4. ORA-600 [ktrget2:kcbz_objdchk]
5. ORA-600 [ktspffbmb:objdchk_kcbnew_3]
6. ORA-600 [ktspgtb2:kcbz_objdchk]
 
Workaround
None.
 
You can likely get this fix in:
Data Pump Recommended Proactive Patches For 19.10 and Above (Doc ID 2819284.1)

這里記錄一下今天遇到的案例,了解一下問題的來龍去脈,

參考資料

[1]

: https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=g9qrlq9os_4&_afrLoop=203438157763988

[2]

: https://support.oracle.com/epmos/faces/SearchDocDisplay?_afrLoop=211126172370682&_afrWindowMode=0&_adf.ctrl-state=iqtartzdc_4

掃描上面二維碼關注我 如果你真心覺得文章寫得不錯,而且對你有所幫助,那就不妨幫忙“推薦"一下,您的“推薦”和”打賞“將是我最大的寫作動力! 本文著作權歸作者所有,歡迎轉載,但未經作者同意必須保留此段宣告,且在文章頁面明顯位置給出原文連接.

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/556620.html

標籤:其他

上一篇:“遠程客戶端操作hdfs創建檔案夾”,驗證環境是否配置成功,以及HDFS錯誤整改

下一篇:返回列表

標籤雲
其他(162086) Python(38266) JavaScript(25523) Java(18289) C(15238) 區塊鏈(8275) C#(7972) AI(7469) 爪哇(7425) MySQL(7285) html(6777) 基礎類(6313) sql(6102) 熊猫(6058) PHP(5876) 数组(5741) R(5409) Linux(5347) 反应(5209) 腳本語言(PerlPython)(5129) 非技術區(4971) Android(4610) 数据框(4311) css(4259) 节点.js(4032) C語言(3288) json(3245) 列表(3129) 扑(3119) C++語言(3117) 安卓(2998) 打字稿(2995) VBA(2789) Java相關(2746) 疑難問題(2699) 细绳(2522) 單片機工控(2479) iOS(2438) ASP.NET(2404) MongoDB(2323) 麻木的(2285) 正则表达式(2254) 字典(2211) 循环(2198) 迅速(2185) 擅长(2169) 镖(2155) HtmlCss(1987) .NET技术(1985) 功能(1967) Web開發(1951) C++(1942) python-3.x(1918) 弹簧靴(1913) xml(1889) PostgreSQL(1882) .NETCore(1863) 谷歌表格(1846) Unity3D(1843) for循环(1842)

熱門瀏覽
  • GPU虛擬機創建時間深度優化

    **?桔妹導讀:**GPU虛擬機實體創建速度慢是公有云面臨的普遍問題,由于通常情況下創建虛擬機屬于低頻操作而未引起業界的重視,實際生產中還是存在對GPU實體創建時間有苛刻要求的業務場景。本文將介紹滴滴云在解決該問題時的思路、方法、并展示最終的優化成果。 從公有云服務商那里購買過虛擬主機的資深用戶,一 ......

    uj5u.com 2020-09-10 06:09:13 more
  • 可編程網卡芯片在滴滴云網路的應用實踐

    **?桔妹導讀:**隨著云規模不斷擴大以及業務層面對延遲、帶寬的要求越來越高,采用DPDK 加速網路報文處理的方式在橫向縱向擴展都出現了局限性。可編程芯片成為業界熱點。本文主要講述了可編程網卡芯片在滴滴云網路中的應用實踐,遇到的問題、帶來的收益以及開源社區貢獻。 #1. 資料中心面臨的問題 隨著滴滴 ......

    uj5u.com 2020-09-10 06:10:21 more
  • 滴滴資料通道服務演進之路

    **?桔妹導讀:**滴滴資料通道引擎承載著全公司的資料同步,為下游實時和離線場景提供了必不可少的源資料。隨著任務量的不斷增加,資料通道的整體架構也隨之發生改變。本文介紹了滴滴資料通道的發展歷程,遇到的問題以及今后的規劃。 #1. 背景 資料,對于任何一家互聯網公司來說都是非常重要的資產,公司的大資料 ......

    uj5u.com 2020-09-10 06:11:05 more
  • 滴滴AI Labs斬獲國際機器翻譯大賽中譯英方向世界第三

    **桔妹導讀:**深耕人工智能領域,致力于探索AI讓出行更美好的滴滴AI Labs再次斬獲國際大獎,這次獲獎的專案是什么呢?一起來看看詳細報道吧! 近日,由國際計算語言學協會ACL(The Association for Computational Linguistics)舉辦的世界最具影響力的機器 ......

    uj5u.com 2020-09-10 06:11:29 more
  • MPP (Massively Parallel Processing)大規模并行處理

    1、什么是mpp? MPP (Massively Parallel Processing),即大規模并行處理,在資料庫非共享集群中,每個節點都有獨立的磁盤存盤系統和記憶體系統,業務資料根據資料庫模型和應用特點劃分到各個節點上,每臺資料節點通過專用網路或者商業通用網路互相連接,彼此協同計算,作為整體提供 ......

    uj5u.com 2020-09-10 06:11:41 more
  • 滴滴資料倉庫指標體系建設實踐

    **桔妹導讀:**指標體系是什么?如何使用OSM模型和AARRR模型搭建指標體系?如何統一流程、規范化、工具化管理指標體系?本文會對建設的方法論結合滴滴資料指標體系建設實踐進行解答分析。 #1. 什么是指標體系 ##1.1 指標體系定義 指標體系是將零散單點的具有相互聯系的指標,系統化的組織起來,通 ......

    uj5u.com 2020-09-10 06:12:52 more
  • 單表千萬行資料庫 LIKE 搜索優化手記

    我們經常在資料庫中使用 LIKE 運算子來完成對資料的模糊搜索,LIKE 運算子用于在 WHERE 子句中搜索列中的指定模式。 如果需要查找客戶表中所有姓氏是“張”的資料,可以使用下面的 SQL 陳述句: SELECT * FROM Customer WHERE Name LIKE '張%' 如果需要 ......

    uj5u.com 2020-09-10 06:13:25 more
  • 滴滴Ceph分布式存盤系統優化之鎖優化

    **桔妹導讀:**Ceph是國際知名的開源分布式存盤系統,在工業界和學術界都有著重要的影響。Ceph的架構和演算法設計發表在國際系統領域頂級會議OSDI、SOSP、SC等上。Ceph社區得到Red Hat、SUSE、Intel等大公司的大力支持。Ceph是國際云計算領域應用最廣泛的開源分布式存盤系統, ......

    uj5u.com 2020-09-10 06:14:51 more
  • es~通過ElasticsearchTemplate進行聚合~嵌套聚合

    之前寫過《es~通過ElasticsearchTemplate進行聚合操作》的文章,這一次主要寫一個嵌套的聚合,例如先對sex集合,再對desc聚合,最后再對age求和,共三層嵌套。 Aggregations的部分特性類似于SQL語言中的group by,avg,sum等函式,Aggregation ......

    uj5u.com 2020-09-10 06:14:59 more
  • 爬蟲日志監控 -- Elastc Stack(ELK)部署

    傻瓜式部署,只需替換IP與用戶 導讀: 現ELK四大組件分別為:Elasticsearch(核心)、logstash(處理)、filebeat(采集)、kibana(可視化) 下載均在https://www.elastic.co/cn/downloads/下tar包,各組件版本最好一致,配合fdm會 ......

    uj5u.com 2020-09-10 06:15:05 more
最新发布
  • ORA-20000: Unable to set values for index xxx: does not exis

    使用expdp/impdp匯出匯入資料時,遇到ORA-2000錯誤,如下所示: Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANTProcessing object type SCHEMA_EXPORT/ ......

    uj5u.com 2023-07-05 09:04:50 more
  • “遠程客戶端操作hdfs創建檔案夾”,驗證環境是否配置成功,以及HDFS

    文章中包含我所遇到的錯誤,進行了HDFS錯誤整改,以及后面有操作創建“遠程客戶端操作hdfs創建檔案夾”,驗證環境是否配置成功的程序。 ......

    uj5u.com 2023-07-05 09:04:09 more
  • 數倉性能調優:大寬表關聯MERGE性能優化

    摘要:本文主要為大家講解在數倉性能調優程序中,關于大寬表關聯MERGE性能優化程序。 本文分享自華為云社區《GaussDB(DWS)性能調優:大寬表關聯MERGE性能優化》,作者:譡里個檔。 【業務背景】 如下MERGE陳述句執行耗時長達2034s MERGE INTO sdifin.hah_ae_l ......

    uj5u.com 2023-07-05 09:03:43 more
  • 數倉性能調優:大寬表關聯MERGE性能優化

    摘要:本文主要為大家講解在數倉性能調優程序中,關于大寬表關聯MERGE性能優化程序。 本文分享自華為云社區《GaussDB(DWS)性能調優:大寬表關聯MERGE性能優化》,作者:譡里個檔。 【業務背景】 如下MERGE陳述句執行耗時長達2034s MERGE INTO sdifin.hah_ae_l ......

    uj5u.com 2023-07-05 09:02:32 more
  • ORA-20000: Unable to set values for index xxx: does not exis

    使用expdp/impdp匯出匯入資料時,遇到ORA-2000錯誤,如下所示: Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANTProcessing object type SCHEMA_EXPORT/ ......

    uj5u.com 2023-07-05 09:02:08 more
  • “遠程客戶端操作hdfs創建檔案夾”,驗證環境是否配置成功,以及HDFS

    文章中包含我所遇到的錯誤,進行了HDFS錯誤整改,以及后面有操作創建“遠程客戶端操作hdfs創建檔案夾”,驗證環境是否配置成功的程序。 ......

    uj5u.com 2023-07-05 08:55:55 more
  • sql server 資料庫自動備份

    一丶打開客戶端: 物件資源管理器->管理->維護計劃(右鍵點擊)->維護計劃向導 二丶打開后點擊下一步, 填寫名稱與說明并更改備份計劃 三丶點下一步, 選擇維護任務 四丶點擊下一步, 選擇需要備份的資料庫, 和備份檔案路徑 五丶點擊下一步, 選擇報告檔案保存路徑 六丶點擊下一步, 查看維護計劃, 沒 ......

    uj5u.com 2023-07-04 09:24:50 more
  • Mysql基礎篇(四)之事務

    # 一. 事務簡介 **事務是一組操作的集合,它是一個不可分隔的作業單位,事務會把所有的操作作為一個整體一起向系統提交或撤銷操作請求,即這些操作要么同時成功,要么同時失敗。** **就比如:張三給李四轉賬1000塊錢,張三銀行賬戶的錢減少了1000,而李四銀行賬戶的錢要增加1000。這一組操作就必須 ......

    uj5u.com 2023-07-04 09:24:11 more
  • 完全兼容DynamoDB協議!GaussDB(for Cassandra)為NoSQL注入新活力

    摘要:DynamoDB是一款托管式的NoSQL資料庫服務,支持多種資料模型,廣泛應用于電商、社交媒體、游戲、IoT等場景。 本文分享自華為云社區《完全兼容DynamoDB協議!GaussDB(for Cassandra)為NoSQL注入新活力》,作者:GaussDB 資料庫 。 DynamoDB是一 ......

    uj5u.com 2023-07-04 09:23:41 more
  • SQL Server中的NULL值處理:判斷與解決方案

    摘要: 在SQL Server資料庫中,NULL是表示缺少資料或未知值的特殊標記。處理NULL值是SQL開發人員經常遇到的問題之一。本文將介紹SQL Server中判斷和處理NULL值的不同方法,以及一些解決方案,幫助您更好地處理資料庫中的NULL值情況。 文章內容: 引言: 在資料庫開發中,經常會 ......

    uj5u.com 2023-07-04 09:23:31 more