Obviously this has to be done when no one else is using your application.

I think all you can do is take NEXTVAL from the sequence.