Toad World® Forums

SQL Server Database

Greetings,

When I try to connect SQL Server get the error message : cannot open user default database. Can anyone provide some direction on how to troubleshoot this? Maybe someone knows a good sql server fix tool .

Regards

Hi,

Can you connect Sql Server by Windows Authentication?

Did you start all the services about Sql Server?

hi,

The user default database is master, maybe the username’s default database is not master , so i think you should change your username’s Default database as follows

Login database by Windows Authentication → Server Secuity → Right click the username that you want login → Alter Login → change Default database

Regards

Hello.

I started all the services about Sql Server.

Skila.Zheng, Thanks for you assistance but these steps are useless:((

hi,

Please try again as follows,

Login database by Windows Authentication → Server Secuity →Logins→ Right click the username that you want login → Alter Login → Server Roles→choose public and sysadmin

Regards

Hello,

The solution to log on is: From the Connect to Server dialog, click Options. Change value of Connect to database: to any valid database on the server. The permanent solution to fix the server is to run SQL like: ALTER LOGIN [test] WITH DEFAULT_DATABASE = master GO. Other method to troubleshoot this is - SQL Server Fix Toolbox

Best Regards

I want to say thank you for taking the time to share how to solve my problem.