SQL Server – Windows User Automatically Gets db_owner?

permissionssql server

All databases from a server have just been migrated to a new server. It looks as if some users were carried across and some weren't, I'm not really sure as I did not know the server very well.

One user who was on the old server has requested a new windows login on the new one. When I go to create this login, and map it to a particular database, the 'db_owner' role is already checked, whereas for other databases it is not? The user has only requested read only.

Obviously I can just uncheck this but how is it that this is the case? Were they an owner of the previous database and someone has cleared out the users and created them anew and SQL remembers this person was a user? Or have all new users automatically been set to have db_owner granted to them? Is there anything I can query to see more information on this?

Thanks

Best Answer

From Comments:

This issue could occur when there is no owner listed under properties --> files. Once you populate the owner with a valid login, this issue is gone and db_owner is not granted automatically.

Same can be done using sp_changedbowner.

Please mark it as accepted answer so this could help someone else facing this or similar issue on DBA.SE forum.