I have a SQL 2000 server which has databases, under user section of the database object, I have some NT 4.0 groups. These groups were migrated over to Active Directory some time ago using ADMT with SID history. The original source domain groups have since been deleted. The access shown is olddomain\groupname. I don't know why, if they were ntfs permissions they would update automatically to target\groupname.
The users in the AD domain still have access to the database as they are a member of the migrated group (Target\groupname). I was wondering
1) Why does the old group (source\groupname) show up as it doesn't exist anymore. But access is still granted to the target group? 2) Is there any easy way to update the group name from source\groupname to target\groupname?
Thanks for any help.
If you were to look at the SQL Server Login assigned to the database user in question, you would probably find that the login has the new domain name. SQL Server 2000 database users have two main purposes: (1) a database security context; and (2) a database schema name (in later versions, users and schemas are totally separate entities).
Technically speaking, while SQL Server 2000 does not provide a way to rename a database user directly, you can work around this limitation by doing the following:
Everything described above can be performed directly through SQL Enterprise Manager, but if you need to script the operation, you can user the following stored procedures and Transact-SQL commands (see SQL Books Online for additional usage information):
SQL puts an record for the user in the database's sysusers table when you grant a login access to the database. One of the columns in this table is name which, for Windows logins, is the domain\user_or_group_name of the account or group (depending on how exactly you do the db user mapping). Your old domain name is probably coming from that record in the sysusers table. Access is based on SID which is why it's still working.
Run this query:
and look at the createdate column. I'm guessing it's going to be prior to the time that you migrated your domain.