Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 users moving to new domain; how to prepare?

Author  Topic 

steelkilt
Constraint Violating Yak Guru

255 Posts

Posted - 2004-05-21 : 14:06:43
Hi. At least half of the folks with accounts on my SQL Server 7.0 machine (running on win 2k server) will have their usernames moved to a new domain in the coming weeks. As the main admin on the server, my account is also being moved.

I have two key concerns:

1. What's the easiest way to ensure that I don't lose access to the server once my username is migrated to the new domain? I notice SQL Server 7.0 gives top-level access to the BUILTIN\Administrators group. On my server there is a builtin administrator USERNAME an Administrators GROUP. I don't know that I can do anything with the administrator USERNAME, but if SQL Server 7.0 is using the Administrators GROUP, then it's just a matter of making sure the domain admin puts my new username in the group, correct?

2. any scripts out there to automate the addition of the new usernames as well as update permissions lists on all the dbs and associated objects?

thx

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-21 : 15:08:14
1. Yes.
2. One could easily be written. You would just query sysxlogins for the current users. Then change the domain name and add them using sp_grantlogin. Here's part of it:

select 'NewDomainName\' + SUBSTRING(name, PATINDEX('%\%', name) + 1, LEN(name))
from sysxlogins
WHERE PATINDEX('%\%', name) <> 0 AND name <> 'BUILTIN\Administrators'

Tara
Go to Top of Page
   

- Advertisement -