Can a member of the SQL server 'sysadmin' role login to any database? I've been researching and can't find a definitive answer. So I apologize if this question is more obvious than I suspect. All documentation I can find definitively says 'sysadmin' roles can do absolutely anything on the server including accessing all databases.
Yet, if I try to connect using an explicitly defined database in the connection string (Using windows authentication), the sysadmin user fails to login if they have not been mapped to that database as well.
What is the definitive answer here? Is there a resource you can provide that specifies this?
A sysadmin can use any database and also specify any database in the connection string. The special dbo user is used whenever a sysadmin does anything inside a database.
If you failed to connect to a specific database, then I'd say that the database doesn't exist (or is inaccessible) or you aren't a sysadmin. :-)
(Sorry I don't have something to point to the specifics about having a database in the connection string.)