Re: sys_guid()

From: Jonathan Lewis <jlewisoracle_at_gmail.com>
Date: Fri, 1 Oct 2021 13:01:06 +0100
Message-ID: <CAGtsp8=SKtwQ9eBx6JQcv_K9bMNPKrZPm1bXGi0n1eka7bgzdw_at_mail.gmail.com>



Angelo,

Thanks for checking and confirming.
It's easy to miss in a 32-character string of repetitive garbage - and I mis-counted, it was 11th and 12th, even when I knew what I was expected to see!

Regards
Jonathan Lewis

On Fri, 1 Oct 2021 at 12:46, angelo <angelolistas_at_gmail.com> wrote:

> Hello, Jonathan,
>
> I ran again just for certifying
>
> Connected to:
> Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
> Version 19.12.0.0.0
>
> SQL> select sys_guid() from all_tables where rownum <= 5;
>
> SYS_GUID()
> --------------------------------
> CD49EAB78EB01638E053283210ACAC6E
> CD49EAB78EB11638E053283210ACAC6E
> CD49EAB78EB21638E053283210ACAC6E
> CD49EAB78EB31638E053283210ACAC6E
> CD49EAB78EB41638E053283210ACAC6E
>
> SQL> select sys_guid() from all_tables where rownum <= 5;
>
> SYS_GUID()
> --------------------------------
> CD49EAB78*EB5*1638E053283210ACAC6E
> CD49EAB78EB61638E053283210ACAC6E
> CD49EAB78EB71638E053283210ACAC6E
> CD49EAB78EB81638E053283210ACAC6E
> CD49EAB78EB91638E053283210ACAC6E
>
> SQL>
>
> yep, has changed on the same session
>
> Disconnect and connect again
>
> Connected to:
> Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0 - Production
> Version 19.12.0.0.0
>
> SQL> select sys_guid() from all_tables where rownum <= 5;
>
> SYS_GUID()
> --------------------------------
> CD49*FB65A*51B281AE053283210AC31C2
> CD49FB65A51C281AE053283210AC31C2
> CD49FB65A51D281AE053283210AC31C2
> CD49FB65A51E281AE053283210AC31C2
> CD49FB65A51F281AE053283210AC31C2
>
> SQL>
>
> Yes, they had changed on 12th character
> I didn't see before
>
> regards
>
> Angelo
>
>
> On Fri, 1 Oct 2021 at 08:21, Jonathan Lewis <jlewisoracle_at_gmail.com>
> wrote:
>
>> Angelo.
>>
>> Thanks for the response.
>> "... got these same guids above" - that's a little worrying since GUID
>> are supposed to be "Globally Unique"!
>> Are you sure they didn't change on the 12th and 13th characters ?
>>
>> Regards
>> Jonathan Lewis
>>
>>
>>
>> On Fri, 1 Oct 2021 at 11:59, angelo <angelolistas_at_gmail.com> wrote:
>>
>>> Hello Jonathan,
>>>
>>> I did.. 19.12 running on OCI (Oracle Cloud)
>>>
>>> First execution
>>>
>>> SQL> select sys_guid() from all_tables where rownum <= 5;
>>>
>>> SYS_GUID()
>>> --------------------------------
>>> CD491BB3C35586D4E053283210AC3600
>>> CD491BB3C35686D4E053283210AC3600
>>> CD491BB3C35786D4E053283210AC3600
>>> CD491BB3C35886D4E053283210AC3600
>>> CD491BB3C35986D4E053283210AC3600
>>>
>>> obs: running the query again with / I got these same guids above
>>>
>>> then disconnect and reconnect another session
>>>
>>> Second execution (new session):
>>>
>>> SQL> select sys_guid() from all_tables where rownum <= 5;
>>>
>>> SYS_GUID()
>>> --------------------------------
>>> CD4924E586A095C0E053283210ACDD33
>>> CD4924E586A195C0E053283210ACDD33
>>> CD4924E586A295C0E053283210ACDD33
>>> CD4924E586A395C0E053283210ACDD33
>>> CD4924E586A495C0E053283210ACDD33
>>>
>>> SQL>
>>>
>>> guid has changed, similar yours
>>>
>>> I´ve never observed them before
>>>
>>> regards ,
>>>
>>> Angelo
>>>
>>>
>>> On Fri, 1 Oct 2021 at 06:28, Jonathan Lewis <jlewisoracle_at_gmail.com>
>>> wrote:
>>>
>>>>
>>>> I put out a tweet yesterday (
>>>> https://twitter.com/JLOracle/status/1443302780266029061 ) about
>>>> sys_guid() and the different pattern of results you could get depending on
>>>> the platform you were running on. The most recent check I had done was
>>>> 12.1.0.2, and I don't have access to anything other than OEL 7.9 at the
>>>> moment to check more recent versions.
>>>>
>>>> It would be nice if a few people could run the following query on their
>>>> systems and report the results, along with O/S, for 19c to see if there are
>>>> stll differences.
>>>>
>>>>
>>>> Here's my result from 19.11
>>>>
>>>> SQL> select sys_guid() from all_tables where rownum <= 5;
>>>>
>>>> SYS_GUID()
>>>> --------------------------------
>>>> CD47CA7FBE987B90E0530100007FE7D5
>>>> CD47CA7FBE997B90E0530100007FE7D5
>>>> CD47CA7FBE9A7B90E0530100007FE7D5
>>>> CD47CA7FBE9B7B90E0530100007FE7D5
>>>> CD47CA7FBE9C7B90E0530100007FE7D5
>>>>
>>>> 5 rows selected.
>>>>
>>>> Almost simultaneously from another session
>>>> SYS_GUID()
>>>> --------------------------------
>>>> CD47CB493173114BE0530100007FA8A8
>>>> CD47CB493174114BE0530100007FA8A8
>>>> CD47CB493175114BE0530100007FA8A8
>>>> CD47CB493176114BE0530100007FA8A8
>>>> CD47CB493177114BE0530100007FA8A8
>>>>
>>>> This seems to have a sequential component tied to the session (possibly
>>>> to the moment the session connected** rather than the session id). If you
>>>> follow the links in the tweet you'll find that Oracle on Windows used to
>>>> produce very random-looking leading values
>>>> you reconnect once per session and run t
>>>>
>>>> ** If I reconnect once per session then the 7th digit of the guid
>>>> increments by 1.
>>>>
>>>>
>>>> Regards
>>>> Jonathan Lewis
>>>>
>>>>
>>>>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 01 2021 - 14:01:06 CEST

Original text of this message