I was curious as to how SQL Server calculates uniqueidentifiers. I understand that uniqueidentifiers, are GUIDs but are these calculated based on system time? Or are they calculated based on the name of job/script that has called the NEWID() function. I found this but i found this reference to be unclear.
I guess, when in doubt, wikipedia. Thanks
jgroat
2010-07-16 14:20:29
+1
A:
It depends on whether you are generating them from NEWID()
or NEWSEQUENTIALID()
(the last one uses an algorithm involving the mac address the first one doesn't)
Martin Smith
2010-07-16 14:29:34
How could the GUID change? Is it possible that jobs that run on SQL Server be assigned a new GUID if the server were to be reset?
jgroat
2010-07-16 14:44:43
@jgroat - No . That should remain permanent as far as I know. I assume this is related to your question yesterday? Maybe if you are seeing odd behaviour with the SQL Server jobs table post a new question describing the odd behaviour you are seeing.
Martin Smith
2010-07-16 14:54:20
I'm actually trying to store data from some system tables and if the GUID changes on system restart I have to find a new way to uniquely identify each job. Thanks for your help though.
jgroat
2010-07-16 14:58:31