Are there any cirsumstances where 2 GUIDS could be created with the same value?
If one of the factors in GUID creation is time, then the granularity of the time factor received by the GUID generation process will depend on the hardware involved. The time returned by the clock processor is often at a coarser granularity than the CPU speed. This is further compounded when multiple CPUs exist in a single server. The outcome of this is that many records could be created in the database that have the same clock processor timestamp.
How does the GUID creation process cope with this?
The other main aspect with GUID creation is network address. There is another potential problem here, as not every network card has a unique network address. This issue probably will not affect server hardware, as reputable manufacturers ensure their network cards have a unique address. However, for low level machines that may easily be remote clients, the situation could be more problematic. If you have multiple cheap desktops or PDAs that have the same MAC address, it is possible that two records could be produced at the same time by different devices, potentially leading to a duplicate GUID.
Although it could be argued that 2 devices should never have the same MAC address, computer systems have to cope with the real world, where these things happen. It is potentially important that where an application uses a primary key of GUID and collects data from multiple low-end devices, it may be appropriate to include some other distinguishing value from the device along with the GUID to form the primary key.
Original author: SQL Server FineBuild 1-click install and best practice configuration of SQL Server 2017 2016, 2014, 2012, 2008 R2, 2008 and 2005. 14 Mar 2017
: now over 40,000 downloads.Disclaimer: All information provided is a personal opinion that may not match reality.Quote: When I give food to the poor they call me a saint. When I ask why they are poor they call me a communist. - Archbishop Hélder Câmara