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





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)
  • source text file as input parameter from a stored procedure
    ... I am using an active X script in combination with a global ... transform task that loads data from a .txt file to a table. ... I can also tell that the stored procedure is correctly passing in the ... EXEC sp_OAGeterrorinfo @object, @hr ...
    (microsoft.public.sqlserver.dts)
  • Re: String manipulation - taking one long csv string and putting into separate record fields
    ... From what I can work out, it looks as if the script is taking ... "%2147746132" from the computer VPN-01 when attempting to activate the ... computer VPN-01 when attempting to activate the server: ... EXEC xp_startmail ...
    (microsoft.public.sqlserver.programming)
  • Re: [PHP] Creating process and do actions with signals
    ... execwill not return control to PHP to "listen" to SIGs until it is ... the exec command or... ... I have this script testing.php that I run on a Linux machine thru the ... sending SIGTERM to the other case it doesn't work. ...
    (php.general)
  • Re: convert e-mails to pdf / ps
    ... enscript it to ps and ps2pdf it. ... Hmmm...you could select the text and then run a script that grabs text from the clipboard to run it through enscript and ps2pdf... ... set mytext [selection get -selection PRIMARY] ... exec enscript mytext.txt -q -B -p mytext.ps ...
    (Debian-User)