Re: fix logins

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 04/13/04


Date: Tue, 13 Apr 2004 11:31:44 +0200


> Does sp_change_users_login work for non-windows accounts?

Yes, it is used exactly for SQL Server logins.

> What about adding the login and fix the user's sid?

That is another option. See Books Online, sp_addlogin, and you'll find a parameter for specifying the SID.
Again, search KB for sp_help_revlogin and you'll find an a article with which you can export all logins from
one server to another.

> How
> does that work for non-windows, how do I keep the
> passwords from the database?

It work just fine for non-windows accounts. I'm not sure I understand the part about password. There's no
password stored inside a database, only in master.

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Adam" <anonymous@discussions.microsoft.com> wrote in message news:17c1601c418d4$d21fcf90$a101280a@phx.gbl...
> Thanks Tibor,
>
> Does sp_change_users_login work for non-windows accounts?
> What about adding the login and fix the user's sid? How
> does that work for non-windows, how do I keep the
> passwords from the database?
>
>
> >-----Original Message-----
> >Either specify the SID that the user has in the database
> in your sp_addlogin call, or just add the login and
> >fix the user's sid using sp_change_users_login, or use
> the KB article to export the logins from the source
> >server (search KB for sp_help_revlogin).
> >
> >-- 
> >Tibor Karaszi, SQL Server MVP
> >http://www.karaszi.com/sqlserver/default.asp
> >
> >
> >"Adam" <anonymous@discussions.microsoft.com> wrote in
> message news:12ade01c41874$f63ca8e0$a001280a@phx.gbl...
> >> How do you create the logins with the same password,
> when
> >> you backup and restore a database to a seperate server
> and
> >> those logins do not exist at the server level?
> >>
> >> Adam
> >
> >
> >.
> >


Relevant Pages

  • RE: Creating a DB User *not* on current Machine
    ... detach/attach the database to a new server. ... Server.When you move a database from one server that is running SQL Server ... the security identification numbers of the logins in the master ...
    (microsoft.public.sqlserver.security)
  • Re: Logins
    ... no databases are checked, ... On the Server Roles tab, ... That server was upgraded to SQL Server ... moved, I recreated the SQL Server logins we had added, making sure that the ...
    (microsoft.public.sqlserver.security)
  • Re: NT > 2003 domain name changes
    ... Can't use the DTS option as it doesn't retain the SID, ... -restore database to SQL2K ... - cut out logins that do not apply to the database at hand ... >> windows authentication over to a new sql server on a new ...
    (microsoft.public.sqlserver.security)
  • RE: Environment variables
    ... my $sid; ... Once connected normal database security takes over. ... servers, I probably have to log in to each server before connecting. ... > my $dbh; ...
    (perl.beginners)
  • Re: transfering logins
    ... has their name, password, and a SID, among other attributes. ... In <your database>.dbo.sysusers, you will notice that each database user has ... database not a server object), but since the SIDs are generated at random, ... do not have this problem with Windows logins (hint: ...
    (microsoft.public.sqlserver.security)