Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Purge dba_recyclebin

808880Jul 23 2013 — edited Jul 23 2013

All,

My oracle version : 11.2.0.2

Can someone help me to fix this sql ? I'm doing mistake at converting date function and trying to make a count of dropped objects before purge older than 15 days.

SQL> select count(*) from   dba_recyclebin where to_date('droptime','YYYY-MM-DD:HH:MI:SS') > to_date('sysdate','YYYY-MM-DD:HH:MI:SS')-15;

select count(*) from   dba_recyclebin where to_date('droptime','YYYY-MM-DD:HH:MI:SS') > to_date('sysdate','YYYY-MM-DD:HH:MI:SS')-15

                                                    *

ERROR at line 1:

ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Thanks

This post has been answered by JohnWatson on Jul 23 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2013
Added on Jul 23 2013
2 comments
522 views