Domain change for Logins - Best way to do?

  • We're a multi-facility operation, but due to a faulty raid controller, must move one location to a new DOMAIN. Thus, we have logins on SQL that have the old domain, but not the new domain. What's the fastest and easiest script to run to pull only LOGINS that have a specific DOMAIN listed, and also script the DATABASE ROLES and Database permissions they are assigned to, and do this across an entire SQL server for EVERY DATABASE?

    I'm thinking there has to be a script out there that has a 'LIKE' statement in it that pulls all perms for the old domain users, and then I can do a search/replace to change the domain name from the old to the new one.

    One problem I've run across with SQL 2000, is that if we keep the old domain and new domain logins, if the logins are the same (except for the domain name), you'll get an error if trying to add database permissions because it says the user already exists (it's seeing the old account with the old domain but we need to use both for awhile).

  • I'd use the scripting facility and script out everything related to security. Then search for the old domain and snag those items out into another file.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply