Product: Oracle Databse
Version: 9.0.0 - 18.0
Since Oracle Database 9i, many DBA have been keeping UNDO_MANAGEMENT=AUTO setting, and developers/support often encountered following UNDO related error on long running SQL
Oracle <ORCL> error message for operation <OCIStmtExecute>: <ORA-12801: error signaled in parallel query server P07G ORA-01555: snapshot too old: rollback segment number 271 with name "_SYSSMU271_3009956035$" too small>.
If DBA don't study Oracle documentation on "Automatic Tuning of Undo Retention" but simply search Google/Internet for answer, then they often comes to following incorrect workaround:
- Increase UNDO_RENTENTION time - no change in the long running SQL
- Modify code to split the long running SQL to have several shorter running SQL, e.g. store into intermedia table, then select from the intermedia table
- Asks developer to tune the long running SQL to run faster, e.g. create index, don't select unnecessary columns, filter out unrequired data (more WHERE criteria)
- Don't insert/update/delete on the table that the long running SQL is SELECTing
So what does DBA missed in above analysis is he/she only focus in ORA-01555 error without considering the rest of the message. Following are the things that DBA missed:
- Parallel query server is enabled
- Above PQ number is P07G with starting number as P000
- Number of concurrent running SQL that that point of time, without considering Parallel query server (excludes parallel query coordination and slave)
- Size of the UNDO tablespace, which could be few TB in size, and bigger than entire DB size
- UNDO tablespace's dbf files are not in auto extend mode
- Even if UNDO dbf files are in auto extend mode, it hit max dbf file size
As the result, tuning UNDO_RETENTION or even increase the size of UNDO dbf to 300GB larger doesn't resolve the issue.
The resolution is in fact totally not related to modify UNDO_RETENTION.
Post your comment if you want to know the answer, as I want to know how many visitors are actually reading my blog post
No comments:
Post a Comment