Oracle9i has inbuilt solution for this, till then u have to write
your own pricedure.