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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle's SYS_GUID() vs MS SQL Server NEWID()

Re: Oracle's SYS_GUID() vs MS SQL Server NEWID()

From: Richard Kuhler <noone_at_nowhere.com>
Date: Fri, 22 Aug 2003 20:58:53 GMT
Message-ID: <huv1b.1058$Pd3.39006@twister.socal.rr.com>


Uma Muthu wrote:
> I am working with two databases who share data: an Oracle 9i DB and a MS SQL
> Server 2000. I am concerned that GUIDs that are generated on one DB may be
> duplicated ):- on the other DB, and when we go to share data a duplicate key
> scenario might arise.
>
> Is there any way I can determine the algorithms used to generate the GUIDs
> on both DBs so that I can format them (if I have to) in a way that they
> will
> never collide? I use sys_guid() to generate GUIDs in Oracle, and NewID() in
> SQL Server.
>
> Any suggestions would be appreciated.

Even if you knew the algorithms, you wouldn't have any assurance that one of the vendors couldn't change it in some way that still guaranteed uniqueness in their own product but now produced collisions across both products. I would suggest that you add a byte and use 0 for Oracle and 1 for SQL Server, etc...

Richard Kuhler Received on Fri Aug 22 2003 - 15:58:53 CDT

Original text of this message

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