[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 865
  • Last Modified:

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default database. Login Failed"

Hi All,
below is the error I'm getting

server: servername
DB name: database
Error:

"Unable to connect to server servername
Msg 4064, Level 16, State1
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open user default database. Login Failed"


Can some one pls help me with this error?
0
msdba
Asked:
msdba
3 Solutions
 
Scay7Commented:
server: servername you need to give it a full name
eg:

wsrv2008\sql

[servername]\[name of sql service]
0
 
QlemoC++ DeveloperCommented:
Check if the default database assigned to your SQL user does still exist. It might have been removed or marked "suspect" (damaged).
0
 
Aaron ShiloCommented:
hi

1. make sure the databas exists , and that you didnt misspeld it in connection string.
2. make sure the login has access priviliges to the database.
0
 
msdbaAuthor Commented:
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now