Security – Why is SQL Server automatically creating an explicit user mapping for the local Administrator account in every new database I create

database-administrationSecuritysql server

If I login to a particular instance of SQL Server 2008 using a Windows domain user who is in the sysadmin role and I create a brand new database via SQL Management Studio, a user in the newly create database is automatically mapped explicitly for my local MACHINE\Administrator account.

This doesn't happen on any other SQL instance I have running, or for any other user on the problematic instance. I'm thinking there must be a setting somewhere (at the server level or the user level), but I can't seem to find info anywhere in Microsoft's documentation or on the Google.

Best Answer

This is because there is a user created in the model database with that right. The SQL Server uses the model database to create other databases, so anything done within the model database will be created in the new database. This includes the tempdb database which is recreated every time the instance is started.