Log in to SQL Server 2005 and click the New Query button. After that run the system stored procedure sp_defaultdb command as follows:
exec sp_defaultdb @loginame='login', @defdb='master'
To achieve this in Microsoft SQL Server Management Studio you need to edit your login by expanding the Security -> Logins node and then right clicking on your login name and selecting Properties. Once the properties page displays there should be a Default database dropdownlist under the General page as seen below:

No comments:
Post a Comment