MS-SQL Server Management Studio (SSMS) [v2005] provides a way to change this. And next time onwards this nerw selected database will selected by default instead of the MASTER DB.
Steps:
- Open Sql Server Management Studio
- Go to object Explorer -> Security –> Logins
- Right click on the login and select properties
- And in the properties window change the default database and click OK.
另外,也可以使用指令來操作:
Exec sp_defaultdb @loginame='TestUser', @defdb='Test'
Important: 【使用須知】
This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
Use ALTER LOGIN instead.
沒有留言:
張貼留言