Thursday, April 24, 2014

Oracle: select from list of values

select distinct column_value from table(sys.odcinumberlist(1,1,2,3,3,4,4,5));
or
select column_value from table(sys.dbms_debug_vc2coll('One', 'Two', 'Three', 'Four'));

Tuesday, April 1, 2014

ORA-01555: snapshot too old: rollback segment number 61 with name "_SYSSMU61_1706556987$" too small

SQL> select max(maxquerylen) from v$undostat;

26687
Add 20% to this value and update UNDO_RETENTION parameter.
SQL> ALTER SYSTEM SET UNDO_RETENTION = 32024;