Re: Sequences and Roles

From: dan macdonald <dmacdonald_at_mailhost.wlc.com>
Date: 1997/08/27
Message-ID: <3403ae59.0_at_news.wlc.com>#1/1


rather than dropping and recreating it, you can change the increment step (to something that will leave the sequence at the new starting value), select from it, then reset the increment back to 1 (or whatever).

i *assume* that this would work to lower the starting value (use a negative increment) but i've never tried it. we have situations where we want some ids to start with the year (eg: 970000001) and next year start at 980000001....

this resetting technique works real well, without having to drop and recreate the sequence (and thereby having to regrant, etc).

hope this helps. it didn;t answer your question directly, but...

dan

In article <3402EB5D.67FA_at_interfacefamily.com>, richwoodland_at_interfacefamily.com says...
>
>I would like to be able to restart and Oracle sequence at a particular
>value. This requires dropping the sequence, then recreating it with the
>new starting value.
>
>Unfortunately, this also means that any roles associated with this
>sequence must also be recreated!!!
>
>Can anyone tell me ....
>
>How can I find out which roles are associated with a particular entity
>(in this case, a sequence), so that I might be able to recover them
>after a drop/create operation.
>
>Please post any replies to both the newsgroup (so that others might
>learn!) and to 'richwoodland_at_interfacefamily.com' (in case I miss the
>reply before it drops off the newsserver).
>
>Thanks.
>
>Rich Woodland
>Magic Interface, Ltd.
Received on Wed Aug 27 1997 - 00:00:00 CEST

Original text of this message