RE: Sequences in OPS/RAC

2003-11-03 Thread Mercadante, Thomas F
Hemant,

I would guess that this is true if you are caching values for the sequence.
Each database instance might cache the same set of values.

Turn sequence caching off, and I would think that the problem goes away.

Havn't tried this in awhile, but it makes sense.

Tom Mercadante
Oracle Certified Professional


-Original Message-
Sent: Monday, November 03, 2003 10:39 AM
To: Multiple recipients of list ORACLE-L




I have always been comfortable with the idea that Sequences continue to 
guarantee
uniqueness even in OPS / RAC environments.

However, a recent Builder.Com article by Scott Stephens on the SYS_GUID 
function has these lines :
Sequence generator numbers are guaranteed to be unique only for a single 
instance, which is unsuitable for use as a primary key in parallel or 
remote environments, where a sequence in each environment might generate 
the same number and result in conflicts. An identifier created by SYS_GUID 
is guaranteed to be unique for each database.

Huh ?!  Do the lines mean that a single sequence can have duplicate values 
in the two instances of an RAC cluster ?


Hemant K Chitale
Oracle 9i Database Administrator Certified Professional
My personal web site is :  http://hkchital.tripod.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Hemant K Chitale
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


RE: Sequences in OPS/RAC

2003-11-03 Thread Jamadagni, Rajendra
me don't think so. 

Raj

Rajendra dot Jamadagni at nospamespn dot com
All Views expressed in this email are strictly personal.
QOTD: Any clod can have facts, having an opinion is an art !


-Original Message-
Sent: Monday, November 03, 2003 10:39 AM
To: Multiple recipients of list ORACLE-L




I have always been comfortable with the idea that Sequences continue to 
guarantee
uniqueness even in OPS / RAC environments.

However, a recent Builder.Com article by Scott Stephens on the SYS_GUID 
function has these lines :
Sequence generator numbers are guaranteed to be unique only for a single 
instance, which is unsuitable for use as a primary key in parallel or 
remote environments, where a sequence in each environment might generate 
the same number and result in conflicts. An identifier created by SYS_GUID 
is guaranteed to be unique for each database.

Huh ?!  Do the lines mean that a single sequence can have duplicate values 
in the two instances of an RAC cluster ?


Hemant K Chitale
Oracle 9i Database Administrator Certified Professional
My personal web site is :  http://hkchital.tripod.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Hemant K Chitale
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

**
This e-mail message is confidential, intended only for the named recipient(s) above 
and may contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank you.
**4
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jamadagni, Rajendra
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: Sequences in OPS/RAC

2003-11-03 Thread Mladen Gogala
In the Oracle9i Real Application Clusters Administration manual, there is a chapter
about sequence numbers generator. Before believing to the snake oil sellers, read 
the fine manual. Sequence numbers are guaranteed to be unique PER DATABASE. What 
they're
not guaranteed is to come in ordered fashion. When sequence number are cached (that is 
the
default), they're cached separately, for each instance. Each instance returns the 
contents
of its cache, so it is possible for the smaller number being returned after a larger 
one.
There is ORDERED flag to deal with that, but that can be extremely expensive and 
impose
significant overhead on your cluster.

On 11/03/2003 10:39:26 AM, Hemant K Chitale wrote:
 
 
 I have always been comfortable with the idea that Sequences continue to 
 guarantee
 uniqueness even in OPS / RAC environments.
 
 However, a recent Builder.Com article by Scott Stephens on the SYS_GUID 
 function has these lines :
 Sequence generator numbers are guaranteed to be unique only for a single 
 instance, which is unsuitable for use as a primary key in parallel or 
 remote environments, where a sequence in each environment might generate 
 the same number and result in conflicts. An identifier created by SYS_GUID 
 is guaranteed to be unique for each database.
 
 Huh ?!  Do the lines mean that a single sequence can have duplicate values 
 in the two instances of an RAC cluster ?
 
 
 Hemant K Chitale
 Oracle 9i Database Administrator Certified Professional
 My personal web site is :  http://hkchital.tripod.com
 
 
 -- 
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 -- 
 Author: Hemant K Chitale
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).
 

Mladen Gogala
Oracle DBA



Note:
This message is for the named person's use only.  It may contain confidential, 
proprietary or legally privileged information.  No confidentiality or privilege is 
waived or lost by any mistransmission.  If you receive this message in error, please 
immediately delete it and all copies of it from your system, destroy any hard copies 
of it and notify the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the intended 
recipient. Wang Trading LLC and any of its subsidiaries each reserve the right to 
monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, except where 
the message states otherwise and the sender is authorized to state them to be the 
views of any such entity.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: Sequences in OPS/RAC

2003-11-03 Thread Tim Gorman
Sequences are mastered by the single SYS.SEQ$ table in each
database.  Cached or uncached, RAC or non-RAC, OPS or
non-OPS, sequence numbers generated by this mechanism are
unique across a database, not by instance.  Each instance
updates SEQ$ as individual numbers (noncached) or ranges of
numbers (cached) are reserved, and those updates are
controlled by the same synchronization mechanisms used by
OPS/RAC for all UPDATE statements.  This is precisely the
reason that setting CACHE on sequence numbers help
performance, as the number of updates to SEQ$ are reduced,
minimizing the bottleneck.

However, because of the simplicity of this caching
mechanism, sequence numbers are not guaranteed to be in
order (i.e. sequentially ascending) across multiple
instances.

Perhaps Mr. Stephens mis-spoke, confusing uniqueness for
ordering?  Or perhaps he is confusing distributed
databases for clustered databases?


 
 
 I have always been comfortable with the idea that
 Sequences continue to  guarantee
 uniqueness even in OPS / RAC environments.
 
 However, a recent Builder.Com article by Scott Stephens on
 the SYS_GUID  function has these lines :
 Sequence generator numbers are guaranteed to be unique
 only for a single  instance, which is unsuitable for use
 as a primary key in parallel or  remote environments,
 where a sequence in each environment might generate  the
 same number and result in conflicts. An identifier created
 by SYS_GUID  is guaranteed to be unique for each
 database. 
 Huh ?!  Do the lines mean that a single sequence can have
 duplicate values  in the two instances of an RAC cluster ?
 
 
 Hemant K Chitale
 Oracle 9i Database Administrator Certified Professional
 My personal web site is :  http://hkchital.tripod.com
 
 
 -- 
 Please see the official ORACLE-L FAQ:
 http://www.orafaq.net -- 
 Author: Hemant K Chitale
   INET: [EMAIL PROTECTED]
 
 Fat City Network Services-- 858-538-5051
 http://www.fatcity.com San Diego, California--
 Mailing list and web hosting services
 --
 --- To REMOVE yourself from this mailing list,
 send an E-Mail message to: [EMAIL PROTECTED] (note
 EXACT spelling of 'ListGuru') and in the message BODY,
 include a line containing: UNSUB ORACLE-L (or the name of
 mailing list you want to be removed from).  You may also
 send the HELP command for other information (like
 subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Gorman
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: Sequences in OPS/RAC

2003-11-03 Thread Hemant K Chitale
Yes, I've been aware of the difference between ORDERED and CACHED.

However, the Builder.Com article quite explicity asserts
Sequence generator numbers are guaranteed to be unique only for a single 
instance, which is unsuitable for use as a primary key in parallel or 
remote environments, where a sequence in each environment might generate 
the same number and result in conflicts
Sequence generator numbers are guaranteed to be unique only for a single 
instance, which is unsuitable for use as a primary key in parallel or 
remote environments, where a sequence in each environment might generate 
the same number and result in conflicts

As Tim has pointed out earlier, the author of the article might have confused
uniqueness with ordering.
{I've sent copies of the builder.com article by seperate emails to Raj and Tim}
Hemant

At 07:59 AM 03-11-03 -0800, you wrote:
In the Oracle9i Real Application Clusters Administration manual, there 
is a chapter
about sequence numbers generator. Before believing to the snake oil 
sellers, read
the fine manual. Sequence numbers are guaranteed to be unique PER 
DATABASE. What they're
not guaranteed is to come in ordered fashion. When sequence number are 
cached (that is the
default), they're cached separately, for each instance. Each instance 
returns the contents
of its cache, so it is possible for the smaller number being returned 
after a larger one.
There is ORDERED flag to deal with that, but that can be extremely 
expensive and impose
significant overhead on your cluster.

On 11/03/2003 10:39:26 AM, Hemant K Chitale wrote:


 I have always been comfortable with the idea that Sequences continue to
 guarantee
 uniqueness even in OPS / RAC environments.

 However, a recent Builder.Com article by Scott Stephens on the SYS_GUID
 function has these lines :
 Sequence generator numbers are guaranteed to be unique only for a single
 instance, which is unsuitable for use as a primary key in parallel or
 remote environments, where a sequence in each environment might generate
 the same number and result in conflicts. An identifier created by SYS_GUID
 is guaranteed to be unique for each database.

 Huh ?!  Do the lines mean that a single sequence can have duplicate values
 in the two instances of an RAC cluster ?


 Hemant K Chitale
 Oracle 9i Database Administrator Certified Professional
 My personal web site is :  http://hkchital.tripod.com


 --
 Please see the official ORACLE-L FAQ: http://www.orafaq.net
 --
 Author: Hemant K Chitale
   INET: [EMAIL PROTECTED]

 Fat City Network Services-- 858-538-5051 http://www.fatcity.com
 San Diego, California-- Mailing list and web hosting services
 -
 To REMOVE yourself from this mailing list, send an E-Mail message
 to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
 the message BODY, include a line containing: UNSUB ORACLE-L
 (or the name of mailing list you want to be removed from).  You may
 also send the HELP command for other information (like subscribing).

Mladen Gogala
Oracle DBA


Note:
This message is for the named person's use only.  It may contain 
confidential, proprietary or legally privileged information.  No 
confidentiality or privilege is waived or lost by any mistransmission.  If 
you receive this message in error, please immediately delete it and all 
copies of it from your system, destroy any hard copies of it and notify 
the sender.  You must not, directly or indirectly, use, disclose, 
distribute, print, or copy any part of this message if you are not the 
intended recipient. Wang Trading LLC and any of its subsidiaries each 
reserve the right to monitor all e-mail communications through its networks.
Any views expressed in this message are those of the individual sender, 
except where the message states otherwise and the sender is authorized to 
state them to be the views of any such entity.

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Mladen Gogala
  INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Hemant K Chitale
Oracle 9i Database Administrator Certified Professional
My personal web site is :  http://hkchital.tripod.com
--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Hemant K Chitale
 INET: [EMAIL PROTECTED]
Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services