ALTER SEQUENCE START WITH 1

From: JEFF CHAMBLEE <chamblej_at_author.gsfc.nasa.gov>
Date: 14 Sep 1993 11:31 -0500
Message-ID: <14SEP199311314713_at_author.gsfc.nasa.gov>


All I want to do is have my data loading program (Pro*C) reset my sequence to 1 before loading a batch of data.

SQLPLUS> HELP ALTER SEQUENCE says you can use START WITH but if you try it, you get "ORA-02283: cannot alter starting sequence number"

So it looks like I have to DROP SEQUENCE and re-create it. This leads to security and configuration hassles. I'd like anybody to be able to run this program, but they would have to have DROP ANY SEQUENCE privilege, etc.

I've got to put all this crap in my program:

   DROP SEQUENCE SOURCE_SEQ;
   create sequence source_seq;
   grant all on source_seq to privileged_archive_user;    drop public synonym source_seq;
   create public synonym source_seq for source_seq;

Anybody have a simpler solution?


Jeff Chamblee			      	"I'm not very smart, but 	
Computer Sciences Corp. 	      	I can lift heavy things."
Laurel, MD 20707 USA Received on Tue Sep 14 1993 - 18:31:39 CEST

Original text of this message