10g升級至11g exp的問題解決
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Produ
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in TH8TISASCII character set and UTF8 NCHAR character set
About to export specified tables via Conventional Path ...
. . exporting table xxxx 2201 rows exported
EXP-00008: ORACLE error 1466 encountered
ORA-01466: unable to read data - table definition has changed
Export terminated successfully with warnings.
Mon Sep 23 15:58:26 2013
ORA-1466 (RO Tx began: 09/23/2013 08:58:25, Last DDL: 09/23/2013 11:14:16, Curr Time: 09/23/2013 08:58:26)
Mon Sep 23 15:58:38 2013
4.對於ORA-1466的解決方法,MOS上的一些建議是重建資料庫,這也太狠了。
5.最後在TOM的帖子裡找到了靈感,他是這麼寫的。
you mentioned out of sync clocks, that is what caught my eye on that note.
It could even be a TIMEZONE issue. The dedicated server you are running might have a different TZ
than the environment the export is running in. Consider:
[tkyte@xtkyte-pc tkyte]$ echo $TZ
[tkyte@xtkyte-pc tkyte]$ plus
SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 6 12:53:04 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
ops$tkyte@ORA9IR2> select to_char(sysdate,'dd-mon-yyyy hh24:mi:ss' ) from dual;
TO_CHAR(SYSDATE,'DD-
--------------------
06-jun-2005 12:53:15
ops$tkyte@ORA9IR2> !
[tkyte@xtkyte-pc tkyte]$ export TZ=PST
[tkyte@xtkyte-pc tkyte]$ plus
SQL*Plus: Release 9.2.0.5.0 - Production on Mon Jun 6 16:53:23 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.5.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.5.0 - Production
ops$tkyte@ORA9IR2> select to_char(sysdate,'dd-mon-yyyy hh24:mi:ss' ) from dual;
TO_CHAR(SYSDATE,'DD-
--------------------
06-jun-2005 16:53:33
One thing to check would be that the TZ of the export session is consistent with the rest of the
sessions.
排除了系統級的timezone問題,我覺得可能是db級的timezone問題。
最後發現升級timezone的時候沒有把步驟做完。
SQL> select *from v$timezone_file;
FILENAME VERSION
-------------------- ----------
timezlrg_4.dat 4
SQL> SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 4
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
Timezone資料庫層面的升級。
注意:該步驟是否執行是和Step 6中的檢查結果相關的,只有當Timezone的版本小於14時,才需要執行該步驟。
主要參考:Updating the RDBMS DST version in 11gR2 (11.2.0.1 and up) using DBMS_DST [ID 977512.1]
1)Timezone升級前的準備工作:
先檢查一下當前的timezone版本:
conn / as sysdba
SELECT version FROM v$timezone_file;
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value FROM DATABASE_PROPERTIES WHERE PROPERTY_NAME LIKE 'DST_%' ORDER BY PROPERTY_NAME;
一個典型的輸出是:
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 4
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
然後開始準備工作:
alter session set "_with_subquery"=materialize;
exec DBMS_DST.BEGIN_PREPARE(14);
接著檢查準備狀態:
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
一個典型的輸出是:
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 4
DST_SECONDARY_TT_VERSION 14
DST_UPGRADE_STATE PREPARE
-- truncate logging tables if they exist.
TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;
TRUNCATE TABLE sys.dst$affected_tables;
TRUNCATE TABLE sys.dst$error_table;
-- log affected data
set serveroutput on
BEGIN
DBMS_DST.FIND_AFFECTED_TABLES
(affected_tables => 'sys.dst$affected_tables',
log_errors => TRUE,
log_errors_table => 'sys.dst$error_table');
END;
/
下面的語句都不能有返回結果:
SELECT * FROM sys.dst$affected_tables;
SELECT * FROM sys.dst$error_table;
SELECT * FROM sys.dst$error_table where ERROR_NUMBER= '1883';
SELECT * FROM sys.dst$error_table where ERROR_NUMBER= '1878';
SELECT * FROM sys.dst$error_table where ERROR_NUMBER not in ('1878','1883');
-- end prepare window, the rows above will stay in those tables.
EXEC DBMS_DST.END_PREPARE;
-- check if this is ended
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
一個典型的輸出是:
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 4
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
2)真正開始升級Timezone
conn / as sysdba
shutdown immediate;
startup upgrade;
set serveroutput on
purge dba_recyclebin;
TRUNCATE TABLE SYS.DST$TRIGGER_TABLE;
TRUNCATE TABLE sys.dst$affected_tables;
TRUNCATE TABLE sys.dst$error_table;
alter session set "_with_subquery"=materialize;
EXEC DBMS_DST.BEGIN_UPGRADE(14);
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
一個典型的輸出是:
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 4
DST_UPGRADE_STATE UPGRADE
下面這條語句應該沒有返回結果:
SELECT OWNER, TABLE_NAME, UPGRADE_IN_PROGRESS FROM ALL_TSTZ_TABLES where UPGRADE_IN_PROGRESS='YES';
重啟資料庫:
shutdown immediate
startup
升級相關的table:
alter session set "_with_subquery"=materialize;
set serveroutput on
VAR numfail number
BEGIN
DBMS_DST.UPGRADE_DATABASE(:numfail,
parallel => TRUE,
log_errors => TRUE,
log_errors_table => 'SYS.DST$ERROR_TABLE',
log_triggers_table => 'SYS.DST$TRIGGER_TABLE',
error_on_overlap_time => FALSE,
error_on_nonexisting_time => FALSE);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :numfail);
END;
/
如果沒有錯誤,則結束升級:
VAR fail number
BEGIN
DBMS_DST.END_UPGRADE(:fail);
DBMS_OUTPUT.PUT_LINE('Failures:'|| :fail);
END;
/
最後一次檢查:
SELECT PROPERTY_NAME, SUBSTR(property_value, 1, 30) value
FROM DATABASE_PROPERTIES
WHERE PROPERTY_NAME LIKE 'DST_%'
ORDER BY PROPERTY_NAME;
典型輸出是:
PROPERTY_NAME VALUE
------------------------------ ------------------------------
DST_PRIMARY_TT_VERSION 14
DST_SECONDARY_TT_VERSION 0
DST_UPGRADE_STATE NONE
SELECT * FROM v$timezone_file;
FILENAME VERSION
-------------------- ----------
timezlrg_14.dat 14
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23718752/viewspace-773275/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 10g升級至11g後資料庫無法啟動的問題解決資料庫
- 10g升級到11g密碼問題密碼
- impdp 10g/11g問題解決
- 解決Oracle 11g空表不能exp匯出的問題Oracle
- 10g升級至11g需要考慮的引數優化優化
- EXP-00091問題的解決
- 解決:ORACLE 11G使用exp無法導空出表問題Oracle
- XP升級至Windows7的問題彙總Windows
- 升級Android Studio到1.0.2的問題解決Android
- exp時報ORA-29275問題解決
- oracle 9.2.0.4升級到9.2.0.8時exp匯出時遇到的問題Oracle
- Kubernetes slave節點升級至1.3版本註冊失敗問題解決
- ArchLinux/Manjaro升級到6.9核心後的問題解決LinuxJAR
- Windows 系統安裝Oracle升級到9.2.0.8 後,exp問題WindowsOracle
- Oracle 10g升級psu的兩個小問題Oracle 10g
- Laravel5.5 升級到 5.7 問題及解決方法Laravel
- Rails 3 升級 Rails 4 中遇到的問題及解決方法AI
- 10g和11g之間建立db_link的問題解決
- EXP Or EXPDP時hang住問題,MOS解決方案
- 解決“華為雲伺服器Ubuntu系統升級”問題伺服器Ubuntu
- react-navigation升級3.x 問題解決方案ReactNavigation
- 使用weiXinRecorded不支援targetSdkVersion升級23及以上問題的解決方案
- 升級react-native至0.45.0後Redefinition of 'RCTMethodInfo'解決方法React
- Oracle 10g/11g 升級psu步驟Oracle 10g
- 生產系統中EXP-00000的問題及解決
- 升級到iOS5後ASIHttpRequest庫問題及解決方法iOSHTTP
- Oracle 10g Express Edition(XE) 轉至資料庫主頁中文亂碼問題的解決Oracle 10gExpress資料庫
- 升級win10系統後凍結bug問題的解決方法Win10
- 關於Linux發行版Ubuntu升級卡死的問題解決方案LinuxUbuntu
- 資料庫11g升級中一次奇怪的問題資料庫
- 升級至MIUI8手機分身常見問題解答彙總UI
- LNMP架構php升級問題及解決方法 php-5.3.10升級到php-5.4.0薦LNMP架構PHP
- 解決Oracle中Exp/Imp大量資料處理問題Oracle
- oracle 10g 字符集問題解決Oracle 10g
- EXP匯出資料檔名稱重複問題的解決
- 解決MacBook Pro升級風扇狂轉和CPU飆高問題Mac
- iOS10升級常見問題彙總以及解決辦法iOS
- 11g升級到Oracle 12c碰到的問題(11g中不存在問題) - ORA-01792Oracle