Re: restoring dB and login to new server
- From: "Tibor Karaszi" <tibor_please.no.email_karaszi@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Apr 2008 08:19:00 +0200
Perhaps sp_help_revlogin is useful? (Or maybe not, I missed beginning of the thread.) Google for it, and you find the KB.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"geekyguy" <geeky@xxxxxxx> wrote in message news:OMQcrmjqIHA.1952@xxxxxxxxxxxxxxxxxxxxxxx
"Tom Moreau" <tom@xxxxxxxxxxxxxxxxxxxx> wrote in message news:uDu0sVjqIHA.2188@xxxxxxxxxxxxxxxxxxxxxxxCheck out sp_change_users_login in the BOL.
Thanks Tom, that looks like it would simplify things a bit...but I still need to create the login manually? I don't mind doing this, except that it introduces fat-finger errors like mistyping the password.
--
Tom
----------------------------------------------------
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA, MCITP, MCTS
SQL Server MVP
Toronto, ON Canada
https://mvp.support.microsoft.com/profile/Tom.Moreau
"geekyguy" <geeky@xxxxxxx> wrote in message
news:%235s5EGjqIHA.1240@xxxxxxxxxxxxxxxxxxxxxxx
Hi All: I have a basic question about SQL 2005 security...I often transfer
databases between servers by doing a full backup, then restoring on the new
server through SMS. These are website databases that have a SQL login
associated with the connection string.
The restore works fine, but I then need to recreate the SQL login on the new
server, and if I try to add the same login in SMS and map it to the
database, I get an error that the "user or role already exists". My
workaround is to delete the database user in SMS, and then map the login
back to the database. Is there an easier way to restore the login associated
with the user account? Or is there no way to transfer logins at the same
time I'm restoring the dB?
.
- References:
- restoring dB and login to new server
- From: geekyguy
- Re: restoring dB and login to new server
- From: Tom Moreau
- Re: restoring dB and login to new server
- From: geekyguy
- restoring dB and login to new server
- Prev by Date: Re: transaction log shipping wizard uses wrong computer name?
- Next by Date: SQL Server Management Studio crashing
- Previous by thread: Re: restoring dB and login to new server
- Next by thread: transaction log shipping wizard uses wrong computer name?
- Index(es):
Relevant Pages
|