0225Snapshot Too Old Error ora-01555.txt
[20150225]Snapshot Too Old Error ora-01555(測試1).txt
--測試的例子來源於Apress.Oracle.Database.Transactions.and.Locking.Revealed.1484207610.pdf
--記錄下來主要是為了以後講解的方便。
create table t as select * from all_objects;
create index t_idx on t(object_name);
exec dbms_stats.gather_table_stats( user, 'T', cascade=>true );
CREATE UNDO TABLESPACE UNDOTBS2 DATAFILE
'/u01/app/oracle11g/oradata/test/undotbs02.dbf' SIZE 1M AUTOEXTEND OFF
ONLINE
RETENTION NOGUARANTEE
BLOCKSIZE 8K
FLASHBACK ON;
alter system set undo_tablespace = UNDOTBS2;
begin
for x in ( select /*+ INDEX(t t_idx) */ rowid rid, object_name, rownum r
from t
where object_name > ' ' )
loop
update t
set object_name = lower(x.object_name)
where rowid = x.rid;
if ( mod(x.r,100) = 0 ) then
commit;
end if;
end loop;
commit;
end;
/
*
ERROR at line 1:
ORA-01555: snapshot too old: rollback segment number with name "" too small
ORA-06512: at line 2
This was a very artificial example just to show how it happens in a reliable manner. My UPDATE statement was
generating undo. I had a very small undo tablespace to play with (10MB). I wrapped around in my undo segments
many times, since they are used in a circular fashion. Every time I committed, I allowed Oracle to overwrite the undo
data I generated. Eventually, I needed some piece of data I had generated, but it no longer existed and I received the
ORA-01555 error.
You would be right to point out that in this case, if I had not committed on line 10, I would have received the
following error:
begin
for x in ( select /*+ INDEX(t t_idx) */ rowid rid, object_name, rownum r
from t
where object_name > ' ' )
loop
update t
set object_name = lower(x.object_name)
where rowid = x.rid;
-- if ( mod(x.r,100) = 0 ) then
-- commit;
-- end if;
end loop;
commit;
end;
/
begin
*
ERROR at line 1:
ORA-30036: unable to extend segment by 8 in undo tablespace 'UNDOTBS2'
ORA-06512: at line 6
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-1441564/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ORA-01555: snapshot too old: rollback segment number with name "" too small
- svn This client is too old to work with working copy錯誤解決方案client
- 【效能優化】處理ORA-01555:Snapshot Too Old優化
- ORA-01555: snapshot too old的分析與解決
- exp匯出blob資料時報 ORA-22924: snapshot too old
- MySQL ERROR 1040: Too many connectionsMySqlError
- Android Studio錯誤處理Plugin is too old, please update to a more recent versionAndroidPlugin
- error RS102 too stale to catch upError
- nodejs Error: request entity too large解決方案NodeJSError
- Error running ‘Application’Command line is too longErrorAPP
- The API server is burning too much error budget 異常處理APIServerError
- 關於如何解決解決The SDK platform-tools version ((25.0.3)) is too old to check APIs compiled with API 26PlatformAPICompile
- Out With the Old and in With the New
- Mongodb secondary上面replSet error RS102 too stale to catch upMongoDBError
- [old]wireless筆記筆記
- [20230104]Oracle too many parse errors PARSE ERROR.txtOracleError
- windows.old可以刪除嗎?windows.old檔案的刪除方法Windows
- 偶遇ERROR 1071 (42000): Specified key was too long; max key length is 767 bytesError
- 超過最大檔案數—Linux-x86_64 Error: 23: Too many open files in systemLinuxError
- win10 如何刪除windows old win10怎麼刪除windows.oldWin10Windows
- win10如何刪除windows.old_win10刪除windows.old的方法Win10Windows
- 用newsbeauter收the old reader RSS
- 解決 'PLAN_TABLE' is old version
- ORA-17500: ODM err:ODM ERROR V-41-3-2-207-5 Mirror Number too largeError
- [原文]Websites are clients, too!Webclient
- Purge Old Mongo Logs without User InterventionGo
- MySQL: Too many connectionsMySql
- [20200309]rlwrap: error: Cannot execute sqlplus: Too many levels of symbolic linErrorSQLSymbol
- win10如何刪除更新 old_win10系統更新後怎麼刪除windows.oldWin10Windows
- you are using an old unsupported version of gradle 1.9Gradle
- 解決 Too many symbol filesSymbol
- DEVICE DRAW VERTEX BUFFER TOO SMALLdev
- insert:key too large to index…Index
- ORACLE SQL調優之'PLAN_TABLE' is old versionOracleSQL
- Too many open files in system處理
- mysql specified key was too long與Index column size too large. The maximum column size is 767 bytes.MySqlIndex
- win10 ghost系統windows.old可以刪除嗎_win10系統windows.old檔案怎麼刪除Win10Windows
- Boring Old Menu Bar for Mac(選單欄美化工具)Mac