kzsigo
asked on
How to change the default database using SQL Server Management Studio
I don't see how to change the default database.
I have an ODBC connection in which I can tell it to use a different database than what the default database is, but if I delete that default database the ODBC connections fail. So I need to change the default database.
I have an ODBC connection in which I can tell it to use a different database than what the default database is, but if I delete that default database the ODBC connections fail. So I need to change the default database.
ASKER
this ran without an error, but did not seem to work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Points to aneeshattingal
exec sp_defaultdb 'LoginName', 'NewDefltDBName'
This works in SQL 2k