Medium severityauthentication
Power BI Refresh Error:
4064
What does this error mean?
The login's default database does not exist or the login has no access to it — SQL Server cannot complete the connection.
Common causes
- 1The login's default database was dropped after the login was created
- 2The login's default database was renamed
- 3The login has no access to its default database
How to fix it
- 1Step 1: Change the login's default database to master or an existing DB: ALTER LOGIN [loginname] WITH DEFAULT_DATABASE = [master];
- 2Step 2: Grant the login access to its intended default DB: USE [targetdb]; CREATE USER [loginname] FOR LOGIN [loginname];
- 3Step 3: As a workaround in the connection string, explicitly set Initial Catalog to an accessible database to bypass the default DB check.
Frequently asked questions
Official documentation: https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-4064-database-engine-error