How to get list of databases that are mapped to a login? I was trying to list all databases that are mapped to a login in sql server using T-SQL without creating a temp or any type of table. Any help will be appreciated.
The simplest way is inside SQL Server Management Studio (SSMS). Go to the  Security tab, right click the user name, and select the option User Mapping. Wait a bit, and a list of all DBs on the server comes up, with a check mark next to the ones that the user has access to.

If you also want to know what roles the user has in each of the DBs, you can click on the database name, and the database role membership will show in the bottom window.