Re: SQL User SID format?



What are you trying to achieve exactly?

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
already have access to a SID from the syslogins catalog; you don't need to
generate one yourself.

Also, note that a SID and a GUID are different structures. It is true that
SQL Login SIDs are actually GUIDs, but the SID you selected below is a SID,
not a GUID. For SQL Logins, the catalog representation of the GUID reflects
the in-memory representation of the GUID, rather than the textual
representation with dashes that the GUID Generator provides.

Hope this helps

--
Laurentiu Cristofor [MSFT]
Software Development Engineer
SQL Server Engine
http://blogs.msdn.com/lcris/

This posting is provided "AS IS" with no warranties, and confers no rights.

"JamesB" <james@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:46127e46$0$19254$da0feed9@xxxxxxxxxxxxxxxxx
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 already have access to a SID from the syslogins catalog; you don't need to generate one yourself. ... It is true that SQL Login SIDs are actually GUIDs, but the SID you selected below is a SID, not a GUID. ...
    (microsoft.public.sqlserver.security)
  • Domain Collapse. Sql permission question.
    ... Internally sql server uses SID of NT users to link them ... with sql logins. ... change users display name. ...
    (microsoft.public.sqlserver.server)
  • Re: Creating SID Manaully
    ... Those typically use LDAP under the hood to actually create the user ... you can't specify the GUID or SID. ... however when the students request an account ...
    (microsoft.public.windows.server.active_directory)
  • Re: sids and sid history
    ... posting is provided "AS IS" with no warranties, ... also get a SID which is scoped to a certain AD domain. ... the GUID will NOT change, but the SID will change (remember, the GUID is ... under what circumstances does user object sid's change. ...
    (microsoft.public.windows.server.active_directory)
  • Re: sids and sid history
    ... The technet article SID vs ... GUID was insghtfull but it is always usefull to get clarification. ... under what circumstances does user object sid's change. ...
    (microsoft.public.windows.server.active_directory)