import_schema_stats時報出ORA-20000:
今天在執行import_schema_stats報瞭如下錯
SQL>@imp_schema_stats.sql
Session altered.
old 3: wnname => '&u',
new 3: wnname => 's500',
old 5: statown => '&u');
new 5: statown => 's500');
begin
*
ERROR at line 1:
ORA-20000: no statistics are imported
ORA-06512: at "SYS.DBMS_STATS", line 10604
ORA-06512: at line 2
經查,由於我把統計資訊表dictstattab建立在s500下,所以在使用export出來的統計資訊import時導致找不到dictstattab自身的統計資訊,因此報錯。換了import_table_stats後工作正常。
SQL> @delete_schema_stats.sql
Session altered.
old 2: dbms_stats.delete_schema_stats('&user');
new 2: dbms_stats.delete_schema_stats('s500');
PL/SQL procedure successfully completed.
SQL> @impstats_s500.sql
Session altered.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'CUSTOMER',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'DISTRICT',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'HISTORY',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ITEM',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'NEW_ORDERS',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ORDERS',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ORDER_LINE',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'STOCK',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'WAREHOUSE',
PL/SQL procedure successfully completed.
SQL>@imp_schema_stats.sql
Session altered.
old 3: wnname => '&u',
new 3: wnname => 's500',
old 5: statown => '&u');
new 5: statown => 's500');
begin
*
ERROR at line 1:
ORA-20000: no statistics are imported
ORA-06512: at "SYS.DBMS_STATS", line 10604
ORA-06512: at line 2
經查,由於我把統計資訊表dictstattab建立在s500下,所以在使用export出來的統計資訊import時導致找不到dictstattab自身的統計資訊,因此報錯。換了import_table_stats後工作正常。
SQL> @delete_schema_stats.sql
Session altered.
old 2: dbms_stats.delete_schema_stats('&user');
new 2: dbms_stats.delete_schema_stats('s500');
PL/SQL procedure successfully completed.
SQL> @impstats_s500.sql
Session altered.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'CUSTOMER',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'DISTRICT',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'HISTORY',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ITEM',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'NEW_ORDERS',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ORDERS',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'ORDER_LINE',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'STOCK',
PL/SQL procedure successfully completed.
old 3: wnname=>'&u',
new 3: wnname=>'s500',
old 4: tabname=>'&t',
new 4: tabname=>'WAREHOUSE',
PL/SQL procedure successfully completed.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7734298/viewspace-680687/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- HP-UX 10.2.0.1 升級到 10.2.0.3 時報 ORA-20000: Upgrade re-run not supported from versionUX
- ORA-20000:index is in unusableIndex
- 轉oracle資料泵匯出時報錯Oracle
- ORA-20000的解決方法
- ORA-20000: Insufficient privileges to analyze an object in SchemaObject
- 資料泵匯出時報錯ORA-1422錯誤
- exp匯出blob資料時報 ORA-22924: snapshot too old
- MySQL create function時報錯MySqlFunction
- 安裝PostgreSQL 時報錯SQL
- dbms_stats.import_table_stats匯入報錯ORA-20000Import
- ORACLE10G ORA-20000問題處理詳解Oracle
- 資料庫匯入匯出時報ORA-01843的解決方法資料庫
- 環球時報:谷歌在內地出現短暫可順利登入狀態谷歌
- ORA-20000: index "xxxx" or partition of such index is in unusable stateIndex
- dimp時報錯,字串截斷字串
- yii執行phpunit時報錯PHP
- SSH獲取SESSION時報NullPointExceptionSessionNullException
- 安裝informix for nt時報錯ORM
- PD連線oracle時報錯Oracle
- 靜默安裝oracle時報錯Oracle
- vue專案部署時報的警告Vue
- 跪問:java編譯時報錯Java編譯
- 跪問:java編譯時報錯!!!Java編譯
- laravel11: 安裝時報錯Laravel
- ORA-12012、ORA-20000錯誤解決過程
- ORA-20000, ORU-10027: Buffer overflow, limit of <buf_limit> bytesMIT
- 使用 Composer 安裝 Laravel 時報錯Laravel
- laravel 資料庫遷移時報錯Laravel資料庫
- 深入紐約時報新推送團隊
- EF:開啟Oracle連線時報錯Oracle
- 金融時報:迎接“大資料”時代大資料
- 啟動網路卡時報:does not seem to be present
- 測試dns時報Error: Dynamic update is not enabledDNSError
- 金融時報:預計蘋果iWatch釋出12個月銷量將達1000萬臺蘋果
- 資料泵匯出時報ORA-31623、ORA-06512問題的解決
- startup 資料庫時報出ORA-01157、ORA-01110的錯誤資料庫
- 匯入sql時報日期型別錯誤SQL型別
- 備份時報no channel allocated for maintenance(of an appropriate type)AINaNAPP