Hi Stakoverflow,
I need to detect a login's default database. Which system table/view should I query for that in SQL Server 2005?
Hi Stakoverflow,
I need to detect a login's default database. Which system table/view should I query for that in SQL Server 2005?
You should be able to get this information for a specific login using sp_helplogins.
The master.sys.syslogins view is provided for backward compatibility and will be removed in future. You should use sys.server_principals view and the column default_database_name.