Re: SQL User SID format?
- From: "Laurentiu Cristofor [MSFT]" <Laurentiu.Cristofor@xxxxxxxxxx>
- Date: Wed, 4 Apr 2007 11:12:08 -0700
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:
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.
Laurentiu Cristofor [MSFT]
Software Development Engineer
SQL Server Engine
This posting is provided "AS IS" with no warranties, and confers no rights.
"JamesB" <james@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
"Laurentiu Cristofor [MSFT]" <Laurentiu.Cristofor@xxxxxxxxxx> wrote in
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...
- Prev by Date: Re: SQL 2k5 Views Referencing Different Schemas - Permissions Issues
- Next by Date: Re: SQL 2k5 Views Referencing Different Schemas - Permissions Issues
- Previous by thread: Re: SQL User SID format?
- Next by thread: Re: SQL User SID format?