sarkari job, sarkari job railway, sarkari job for 12th pass, sarkari job result, sarkari naukri ssc, sarkari job news, sarkari job find, sarkari job alert, sarkari job news, sarkari job portal, sarkari result notification, sarkari result in hindi, sarkari result 10th, sarkari result 10+2 latest job, sarkari result bihar, sarkari result for girl, SarkariResult.com, SarkariResults.com, SarkariResult.in, latest govt jobs notifications, free job alert 2020, 10th pass govt job, government jobs in India, govt jobs today, central government jobs, freejobalert 2020, Govt Jobs 2020, Government Jobs 2020, Latest Govt Jobs in India, नौकरियां , Latest Govt Jobs Vacancy Notification, FreeJobAlert.Com, sarkari job for 12th pass, sarkari job for 12th pass, railwayjob, railway jobs, Sarkari Naukri Job 2020, सरकारी जॉब न्यूज़, Sarkari Naukri 2020, Sarkari Result, Top Online Form, Sarkari Exam, ssc admit card 2020, all admit card 2020 download, ssc mts admit card, admit card, admit card 2020, ssc.nic.in 2020 admit card, all admit card 2020, Exam Admit Cards, Download Exam Hall Ticket, Interview Call, CBSE 10th 12th admit card, Download All Exam Hall Ticket, admission form for college, admission form for school, admission form 2020, admission form pdf, online admission form 2020, admission form format, admission form for nursery 2020, rojgar result, bharat rojgar, bharat result, rozgar. com, rojgar.com

We Wish You All a Bright Future.
A Better Effort for a Brighter future.
A future attempt brilliant future.

Cannot open user default database. Login failed. Microsoft SQL Server, Error:4064[Solved]

Cannot open user default database. Login failed. Microsoft SQL Server, Error:4064[Solved]

Yesterday When I was trying to connect to Microsoft SQL Server database, I got an error like this – Cannot open user default database. Login failed. Login failed for user. (Microsoft SQL Server,error:4064). I did not made any changes in configuration or settings of SQL server, but still was not able to open SQL server databases due to this error. This error shows up due to some deleted database which was mapped as default database to my username. When you try to access that default database, the SQL server does not able find that database.
The solution of this problem is very simple. You need to set master as your default database. Here is how to do it:

Cannot open user default database. Login failed. – Fix

  • Click on the Options button in the Connect to Server window.
  •  
  •  
  • Under the Connection Properties tab, Change the Connect to database value from <default> to master.
  • Click on the Connect button and now you should be able to successfully log in.
  • After log in, you need to perform one more step to get rid of this error permanently. Type the following statement and hit F5 to run. Make sure to replace test with your Username and master with your database name(that you want to set as new default).
ALTER LOGIN [test] WITH DEFAULT_DATABASE = master
If you have made the above two replacements correctly, you should see a message – Command completed successfully.
Whether this solution worked for you or not, let me know in comment section.

Recent Post

Latest Update