Site icon Database Tutorials

Cannot open user default database

 

ERROR MESAGGE:

“Cannot open user default database. Login failed. Login failed for user . (Microsoft SQL Server, Error: 4064)”

EXPLANATION:

In SQL Server, a default database is assigned to each Login. This can be done from the properties of Login.

If a Login doesn’t have access ton its default database, Login will get this error when it tries to login.

Also, after a Login’s default database is set, the same error will occur if the name of the assigned database is changed or deleted.

SOLUTION:

The default database must be changed to a database that the login has access rights, or the login must be authorized on its default database.

Exit mobile version