We used to have an Oracle DB where we had a schema with sequence number tables which gave us a guaranteed and safe place to retrieve the next number in a sequence. When the DB was removed and no replacement provided I wrote this script to provide an alternative and safe method to get the multiple sequence numbers we needed.

See the script getseqnum.sh (download)

This script has been tested at 2,000 concurrent connections and always provided a unique number, so it's safe (well, up to 2,000 simultaneous calls).

Back