sp_defaultdb (Transact-SQL)
SQL Server 2012
Changes the default database for a Microsoft SQL Server login.
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. |
sp_defaultdb calls ALTER LOGIN. This statement supports additional options. For information about changing default database, see ALTER LOGIN (Transact-SQL).
sp_defaultdb cannot be executed within a user-defined transaction.
Important