1. Home
  2. Technology
  3. Microsoft SQL Server
  4. Error Code: 4064 when attempting to connect to Microsoft SQL Server

Error Code: 4064 when attempting to connect to Microsoft SQL Server

When Variphy is attempting to connect to Microsoft SQL Server it returns the following error:

Error: Unable to Connect to Database Server (Error Code: 4064)

This error usually occurs when a database user tries to login after their default database has been dropped from SQL Server. There are two methods to resolve this issue.

Using a SQL Statement

Use ALTER LOGIN to update the user’s default database. Refer to the syntax and example below:


Example: ALTER LOGIN variphyuser WITH DEFAULT_DATABASE = master

Using Management Studio

Open Microsoft SQL Server Management Studio and go to SecurityLogins. Locate your login, right-click and select Properties.

The Default database setting can be found under the General page in the Login Properties menu (towards the bottom). The value will be blank. Open the drop-down list and select another default database and click OK to save. See the screenshot below.

If you are still experiencing issues connecting to Microsoft SQL Server please contact us at Support@variphy.com for further assistance, and a new support ticket will be automatically created. Please include a brief problem description in the body of your email.

Thank you!

Variphy Support Team

Updated on March 30, 2020

Was this article helpful?

Related Articles