PLS_INTEGER giving Error
Why are you purging 2 billion rows in one go?
If that's the entire content of the table, why not just truncate it?
If you really must do this in one go, you'll have to &quot;upgrade&quot; from PLS_INTEGER to INTEGER (a predefined subtype of NUMBER).  OK, you lose the efficiencies of PLS_INTEGER, but you also lose the 32-bit limitation that it imposes on you.
Most &quot;purging&quot; activities I've encountered &quot;nibble away&quot; at data rather than trying to remove great chunks of stuff.  If, say, you had top get rid of six years of very sizeable .. stuff .., you might set up your purging process to remove, one week's worth of data.  You'd configure it with a &quot;start date&quot; including the very oldest data that you want to get rid of and run it.  Then you'd &quot;move&quot; the start date &quot;up&quot; a week and run it again.
The chances are you can run this several times each the day (and more so as the backlog reduces and the process speeds up) until you're running dozens of times a day and clearing years-worth of data in doing so.
Eventually, your &quot;start date&quot; would catch up with today, at which point you simply leave it running daily, just taking the last few days.  By that time, your now &quot;Daily Maintenance Run&quot; will have been well and truly tested!