I need to define a default database for login. What system table / view should I query for SQL Server 2005?
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.
You can get this information for a specific login using sp_helplogins.