how to change users login name in sql 2000 SP4 after domain change...

  • Hi,

    I migrated windows domain & users and it happened that the users now belong

    to a new domain domain2,

    The users in sql server 2000 SP4 are still defined as part of domain1,

    now I needs to some how change all sql server 2000 users from the domain1 to

    the domain2 (just the name of the accounts, users or logins).

    Any idea please. if it s also to go through users and change their

    credentials in sql 2000 to reflect the new domain name.

    Thank you.

  • You will need to go through each of the users and add their new domain account. I'd script out all the logins and permissions and then edit the script to change the login domain. Run the script, then drop the old logins.

  • Hi thanks for reply

    is it possible you can hlep me with script.

    Imran.

  • You can get a series of sp_grantlogin statements for the current Windows logins by running this:

    use master

    select 'sp_grantlogin ' + name

    from syslogins

    where isntname = 1

    Then, as Jack suggested, edit the list and change the domain name and run the statements. The next step depends on whether the user names in the databases include the domain name. If they do, you'll need to add users for the new logins and drop the old users. If they don't you'll have to run sp_change_users_login in each database to re-link the users to the new logins.

    Greg

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

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