Re: how to migrate users/logins with different domain account
- From: be be <anonymous@xxxxxxxxxx>
- Date: Thu, 02 Mar 2006 11:47:50 -0800
Hi,
I'm facing the same challenge that is migrate database logins/users to a
different domain. sp_revlogin created a script fine. But the generated
script has "exec master..sp_grantlogin 'olddomain\user' for all the
logins. What I need is "exec master..sp_grantlogin 'newdomain\user'".
Since there are quite a few domain users/groups are involved, replacing
'olddomain' with 'newdomain' is out of the question. So the question is
in the original script that's used to generate sp_revlogin, how to
replace 'olddomain' with 'newdomain' in @name in the following
statement?
SET @tmpstr = 'EXEC master..sp_grantlogin '''+ @name + ''''
I'm not familiar with the scripting language and its syntax. I'd
appreciate any help.
Thanks,
Bing
*** Sent via Developersdex http://www.developersdex.com ***
.
- Follow-Ups:
- Re: how to migrate users/logins with different domain account
- From: Sue Hoegemeier
- Re: how to migrate users/logins with different domain account
- Prev by Date: Re: How to separate users in one database (MSSQL 2000)
- Next by Date: Re: how can i know
- Previous by thread: how can i know
- Next by thread: Re: how to migrate users/logins with different domain account
- Index(es):
Relevant Pages
|