Thursday, August 16, 2012

Rollback a commited transaction

Using Oracle's FLASHBACK command, it is possible to take any table to its previous state (even after commiting some delete statements)

1) You need to enable row movement on the table
2) You can take the table back to its previous state as of any time period


1) alter table table_name enable row movement;

FLASHBACK TABLE table_name TO TIMESTAMP (SYSTIMESTAMP - INTERVAL '10' minute);
or
FLASHBACK TABLE table_name TO TIMESTAMP (SYSTIMESTAMP - INTERVAL '30' second);


Thursday, August 2, 2012

ORA-00904: "OBJECT_VALUE": invalid identifier

OBJECT_VALUE is the pseudocolumn for xmltype. Its also called as sys_nc_rowinfo$.

It only works if you create a table of xmltype



Note that, when you use select * from, the colum name is called SYS_NC_ROWINFO$



Alternativley, you can get the column using object_value pseudo column.


If you create the same table in a different way, OBJECT_value will not work