Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Entering generated unique value.

Re: Entering generated unique value.

From: Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK>
Date: Wed, 07 Feb 2001 00:51:34 GMT
Message-ID: <3a8093aa.2443221266@news.alt.net>

On Tue, 06 Feb 2001 15:11:20 -0800, "Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote:

>It definitely helps. Though as a DBA my first thought was "someone else mess up a
>session?" Try instituting some security. The fact that your numbering is
>randomized hardly prevents a malicious person from doing damage.
I am not doing this for sessions. I was just trying to explain it in a familiar setting. It seemed some people were getting hung up on the unique id rather than the question I was asking.

>
>But assuming that you have your reasons here's what I would do.
Thank you...

>
>Institute the random number feature as suggested by Niall. Generate them daily,
>weekly, or monthly and store them in a table. Make part of the generation process
>validating that they are unique. This is a great thing to do at 2:00am. Then each
>time a number is selected from the table ... delete it so it can't be used again.
>

Interesting, so similar to a sequence, I'll have a way of knowing that the next pop is unique.

A couple of questions though:

  1. How about changing the idea that say, one, two, or twenty ids are always queued and tested, and then every time a process grabs one, it fires off a trigger to add another one.
  2. Still, there is a time inbetween one process of grabbing the number the second process of inserting it, and the third process of removing it from the queue. I am not familiar with lockiong rows. Would that be appropriate here?

Brian Received on Tue Feb 06 2001 - 18:51:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US