I read from somewhere that issuing harmless DDL, for examples comment and grant statements could be a good way to invalidate a cursor. I have not got chance to verify it until today. I set up a test and find that the following method can invalidate a cursor.
- flush the shared_pool
- grant: i.e. grant select on t to system;
- comment: i.e. comment on table t is 'I am a table';
- dbms_stats.gather_table_stats (no_invalidate should not be true);
来自 “ ITPUB博客 ” ，链接：http://blog.itpub.net/21335783/viewspace-591766/，如需转载，请注明出处，否则将追究法律责任。