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

Home -> Community -> Mailing Lists -> Oracle-L -> RE : RE: Dropping & re-Creating Sequences in PL/SQL

RE : RE: Dropping & re-Creating Sequences in PL/SQL

From: Stephane Faroult <sfaroult_at_oriolecorp.com>
Date: Tue, 04 Jul 2000 16:22:33 +0200
Message-Id: <10548.111171@fatcity.com>


A clever way was shown to me by Indian friend of mine in Singapore, by altering the sequence to make the maxvalue be the current one and to define it to 'cycle', then get the nextval and of course reset nocycle and maxvalue unlimited. The advantage of altering the sequence, as opposed to drop/create, is that you do not have to worry about granting SELECT on it again, etc. etc. Great for resetting dayly counters. Not certain about the invalidation of stored procedures referencing it though. Would tend to say that it invalidates them but I have not checked.

-- 
Regards,

  Stephane Faroult
  email: sfaroult_at_oriolecorp.com 
  Oriole Corporation
  Voice:  +44  (0) 7050-696-269 
  Fax:    +44  (0) 7050-696-449 
  Performance Tools & Free Scripts
------------------------------------------------------------------
http://www.oriolecorp.com, designed by Oracle DBAs for Oracle DBAs
------------------------------------------------------------------
>> 

> How would you reset the sequence? From Oracle 8i SQL reference "to restart the sequence from the different number you must drop and recreate the sequence".
Received on Tue Jul 04 2000 - 09:22:33 CDT

Original text of this message

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