Sequential GUID are Unique
This post refers to the previous post, where liviu warns against the non uniqueness of T-SQL sequential guid. The technique used is based on the UuidCreateSequential API function of the operating system. This function generates unique guid unless there is no NetworkCard in the system, but this function warns you when the guid can be considered unique only on local machine, when it returns the value RPC_S_UUID_LOCAL_ONLY.
This happens when the machine has not network card, and this is not a problem in my scenario, but if this is something you fear, you can simply change the function in this way.
|
|
The change is in link 19, I check for the retvalue and if it is different from RPC_S_OK I use the standard Guid generator. This little change makes me sure that if the machine could not generate unique sequential guid, it uses standard guid generation avoiding the risk of having two identical GUID.
alk.