How to rebuild the AWR Repository
I noticed that my SYSAUX tablespace was approaching 15GB. In researching, I ran the awrinfo.sql and discovered that the SM/AWR occupant space was over 14GB. We only keep 8 days of snapshots. I definitely found orphaned rows in many of the AWR tables. I found 116 SYS tables with the column SNAP_ID. All of the documents I could find only referenced deleting the rows from a few of the larger tables, like the WRH$_EVENT_HISTOGRAM and the WRH$_ACTIVE_SESSION_HISTORY. (Also, the delete statements run forever and generate a lot of redo) I discovered orphaned rows in most of the 116 tables, and want to clean them also. I found