How can I see the default database for login?

I need to define a default database for login. What system table / view should I query for SQL Server 2005?

+6
tsql sql-server-2005
source share
2 answers

The view master.sys.syslogins is provided for backward compatibility and will be removed in the future . You must use sys.server_principals and the column name default_database_name.

+5
source share

You can get this information for a specific login using sp_helplogins.

+3
source share

All Articles