ORA 14099 錯誤解決

2022-05-07 03:24:09 字數 1505 閱讀 6306

db: 11.2.0.3.0

在測試把普通表修改為交換分割槽的時候,出現ora-14099: all rows in table do not qualify for specified partition

模擬如下:

建立測試表yoon

sql> create table yoon ( id number primary key,time date ) ;

table created.

插入資料

sql> insert into yoon select rownum,created from dba_objects;

74930 rows created.

提交sql> commit;

commit complete.

建立分割槽表

sql> create table yoon_new ( id number primary key,time date ) partition by range(time)

2  (partition p1 values less than (to_date('2011-10-01','yyyy-dd-mm')),

3   partition p2 values less than (maxvalue));

table created.

sql> alter table yoon_new exchange partition p1 with table yoon;

alter table yoon_new exchange partition p1 with table yoon

*error at line 1:

ora-14099: all rows in table do not qualify for specified partition

原因:資料中含有大於'2011-10-01'的資料,但是分割槽只能存放小區'2011-10-01'的資料,所以報錯

解決方法:

1.刪除yoon_new表,重新建立:

sql> create table yoon_new ( id number primary key,time date ) partition by range(time)

2  (partition p1 values less than (to_date('2015-10-01','yyyy-dd-mm')),

3   partition p2 values less than (maxvalue));

table created.

sql> alter table yoon_new exchange partition p1 with table yoon;

table altered.

2.sql> alter table yoon_new exchange partition p1 with table yoon  without validation;    

table altered.

盡量不要第二種方法,有可能會導致資料不準確

ORA 12571 ORA 03113錯誤解決

問題現象 windows2000 環境下system 檔案壞掉了,不能啟動,修復以後機器是啟動了,但發現原來的 oracle 服務都不見了,也沒有什麼重要的資料,就重灌了一遍,裝完以後一切正常,連線 oracle 正常,重啟動機器以後發現連線 oracle 出現錯誤 ora 12571 tns 包寫...

錯誤解決 ORA 01036

最近寫程式時,往oracle中插入資料,出現錯誤ora 01036 非法的變數名 編號,如下 dbconnection conn getcon conn.open dbcommand cmd conn.createcommand string sqlrt insert into t user id,...

ORA 08104錯誤解決

img 重新建立索引,會告訴你該索引已經存在,drop index 會告訴你該索引被鎖,或者是 ora 08104 this index object xx is being online built or rebuilt 錯誤。該過程失敗之前建立的一些臨時物件由 smon 負責清除,糟糕的是,sm...