Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

DB2 Sequence objects.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Wed Jul 01, 2009 3:05 pm    Post subject: DB2 Sequence objects.
Reply with quote

I have a requirement for generating unique numbers and I am using DB2 sequence object.

My sequence object is defined like this:
Code:

CREATE SEQUENCE MYSEQUENCE
    AS DECIMAL(18)                                 
      START WITH 1                                 
      INCREMENT BY 1                               
      MINVALUE 1                                   
      MAXVALUE 999999999999999999                 
      NO CYCLE                                     
      NO CACHE                                     
      ORDER                                       


Now my question is what happens when two different processes
request for this sequence number?
Is there a possiblility that DB2 will generate the same number?
In that case there can be an error of duplicate rows as this sequence number will be used to insert in a table as the key.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jul 01, 2009 3:17 pm    Post subject:
Reply with quote

Discussion in manual about Seqences
Back to top
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Wed Jul 01, 2009 3:41 pm    Post subject:
Reply with quote

thanks. I will go thru it
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts COFVLH02E VLF trimmed objects younger... Robert Sample All Other Mainframe Topics 2 Tue Feb 09, 2016 3:37 am
No new posts Jobs from iseries not running in sequ... lyd All Other Mainframe Topics 4 Mon Jan 18, 2016 1:17 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us