Presumably the user has access through an AD group.
You can run this in the database:
EXECUTE AS USER = 'DOMAIN\USER'
SELECT name, type, usage
FROM sys.user_token
REVERT
This will list all security tokens that are associated with this user.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
We find that for a particular SQL Login, it can access a number of databases (FinanceDev and FinanceTest) even though we cannot find corresponding Database User. Is there any way for us to revoke the access for that particular SQL Login ?
On the other hand, we are not able to drop that SQL Login as somehow it is database owner of another database (FinanceProd). We have already raised another question as follow
Your advice is sought.
Presumably the user has access through an AD group.
You can run this in the database:
EXECUTE AS USER = 'DOMAIN\USER'
SELECT name, type, usage
FROM sys.user_token
REVERT
This will list all security tokens that are associated with this user.