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
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
|||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...
when
and
>
>.
>
|||This will not transfer the passwords. You can add a login
by using sp_addlogin and then map it to the user in the
database but for that you will have to know all the
passwords. sp_help_revlogin will move the passwords for
you.
You can also move the logins by using Login Transfer task
in DTS wizard.
Obaid
>--Original Message--
>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?
>
>in your sp_addlogin call, or just add the login and
>the KB article to export the logins from the source
>message news:12ade01c41874$f63ca8e0$a001280a@.phx.gbl...
>when
>and
>.
>
|||> 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?
>
> in your sp_addlogin call, or just add the login and
> the KB article to export the logins from the source
> message news:12ade01c41874$f63ca8e0$a001280a@.phx.gbl...
> when
> and
没有评论:
发表评论