Re: SQL User SID format?



When you move databases to another server, you can remap users to logins
using sp_change_users_login - however, this will only work for SQL
logins/users. Starting with SQL Server 2005 SP2, we have added the
capability to remap a user to a login with new ALTER USER syntax - I
mentioned this at:
http://blogs.msdn.com/lcris/archive/2007/02/19/sql-server-2005-some-new-security-features-in-sp2.aspx.
The new ALTER USER syntax works for remapping both SQL and Windows
logins/users, so it should allow you to do what you need in the easiest way.

Thanks

--
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:46135bed$0$19247$da0feed9@xxxxxxxxxxxxxxxxx

"Laurentiu Cristofor [MSFT]" <Laurentiu.Cristofor@xxxxxxxxxx> wrote in
message news:%23Q8o%23lldHHA.4696@xxxxxxxxxxxxxxxxxxxxxxx
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

Thanks - basically our software uses a standard SQL User account to
connect to the database. The problem occurs when a customer wants to take
a backup and restore it to another server, or send the data to us for
maintenance. Each time, we have to go through dropping the user off the
database, and then re-selecting it to attach the Login that is on the
server in question.
I am trying to write a small program that creates our default user with a
standard SID so that this is less of an issue in future.
Still, your reply suggested I can probably just steal the one we already
have on our own server and utilise that, so I will give it a go...
James.


.



Relevant Pages

  • Re: SQL Server on XP Home Network
    ... The sa account is the system administrator "God" account witihin SQL ... This account is a SQL-Server login. ... You might be able to use Enterprise Manager to go in and create a new SQL ... Select the "SQL Server Authentication" ...
    (microsoft.public.sqlserver.setup)
  • Microsoft SQL server error:233
    ... Right click on the Instance name - Server Properties ... Restart the SQL Service. ... Login as an Administrator into the SqL Server ... A connection was successfully established with the server, ...
    (microsoft.public.sqlserver.connect)
  • Re: ASP.NET User.Identity.Name value after a domain username chang
    ... Can you point me to any resources I can use about getting the SID of the ... WebRequest user without using the username as the base of a lookup (since I ... access a website on the server. ... I have a very confusing issue when the domain login of a user is changed ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: SQL Server 2000 Replication Agents Credentials
    ... the snapshot agent IS using sql login to connect to the ... The pull distribution agent IS using sql ... Do you know where SQL Server 2000 saves the sql ...
    (microsoft.public.sqlserver.replication)
  • Re: Can you update/process AS2005 cube with AMO and SQL authentica
    ... We have cases where the AS server and the Data Source server reside on 2 ... The data source is properly secured using SQL Server ... login and no serious client will accept the login with no password. ...
    (microsoft.public.sqlserver.olap)