Re: how to migrate users/logins with different domain account



One option is to change domains for the logins using
sp_SidMap that comes with a utility from Microsoft. Refer to
the following article for the download link and more
information:
How to resolve permission issues when you move a database
between servers that are running SQL Server
http://support.microsoft.com/?id=240872

-Sue

On Thu, 02 Mar 2006 11:47:50 -0800, be be
<anonymous@xxxxxxxxxx> wrote:



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 ***

.



Relevant Pages

  • RE: Login.bat issue
    ... I also want to add that the user account is in OldDomain. ... under their domain account when the computer is in the NewDomain. ... I have an issue with users not being able to run a login script. ...
    (microsoft.public.windows.server.active_directory)
  • RE: Login.bat issue
    ... I have an issue with users not being able to run a login script. ... two domains (we'll call them OldDomain, NewDomain). ... The script fires perfectly in OldDomain, then when we join the computer to ...
    (microsoft.public.windows.server.active_directory)
  • Re: writting to already connected database
    ... Logins.....that would confuse you and probably the script as well. ... username and password submited by a form exsist and that they match. ... script verifies that the username and password match have it write those values ... to is "logins" and the name of the column inside the table is "Logins". ...
    (microsoft.public.frontpage.client)
  • Login.bat issue
    ... I have an issue with users not being able to run a login script. ... two domains (we'll call them OldDomain, NewDomain). ... The script fires perfectly in OldDomain, then when we join the computer to ...
    (microsoft.public.windows.server.active_directory)
  • Re: aix shell script
    ... > I need a shell script to stop duplicate concurrent logins. ... auth1 = SYSTEM,auth_method ... "root" should be set as an exception to this rule: ...
    (comp.unix.aix)