SQL User SID format?



Hi.
I'm trying to create a user with a specified SID. How can I generate one? I tried the GUID Generator in Visual Studio, and it gave me something like:
79E3FAA5-9AE7-42d0-8C6A-0F87E6FB19C8

But if I feed that in to the CREATE LOGIN command it breaks it. Doing a select * from syslogins, I see the actual SIDs are differently styled, such as: 0x010600000000000901000000D22E3279284D08C7BF5EE0CE6529091DDFD9CA17

Can I just remove the dashes and pop 0x on the front of mine safely? Or is there a different way of generating the SID?
Thanks

James.

.



Relevant Pages

  • Re: SQL User SID format?
    ... The option of creating a login with a specified SID is provided for allowing ... SQL logins to be moved from one server instance to another - this means you ... note that a SID and a GUID are different structures. ... I'm trying to create a user with a specified SID. ...
    (microsoft.public.sqlserver.security)
  • How to use LookupAccountSid? Help!
    ... I am not a VB programmer but I really need to resolve a SID in the ... string format to a user name. ... I have MS Visual Studio ...
    (microsoft.public.win2000.active_directory)