This error is caused by the account being unable to open the default database
Change the default open database for this account.
If, unfortunately, your SA account and Windows authentication are both open to the same database by default, logging in either way is equally useless
If you have an account that you can log in to, just right click on the security – login username property and change the default database to master.
If you cannot log in either way, modify the default database for the SA by following the command below
If you’re unlucky enough to forget your SA password and you can only log in with Windows authentication, and you don’t happen to know the Windows login name,
Ga can only try to find out what the Windows identity login name is
The combination is probably the computer name \Administrator. Run the following command with CMD to change the default open database for an account, sql2005 version below, and change SQLCMD to ISQL
sqlcmd -E -d”master” -Q”exec sp_defaultdb N’sa’, N’master'”
Reproduced in: https://www.cnblogs.com/Jerseyblog/p/4971227.html
Read More:
- SQL Server 2008 18456 error and SA unable to login solution
- SQL Server “login failed for user ‘domain account”. [sqlstate 28000] (error 18456). “Problem solving
- Solution to SQL Server Error: 4064
- Prompt SQL server error 15023 solution memo when modifying user mapping
- SQL server error 15404 solution
- Solution of error converting data type varchar to datetime in SQL Server
- [Four Solutions] FTP Login Error: 530 Login incorrect.Login failed”
- SQL server remote computer refused network connection, error: 1225, specific solution steps.
- The solution of PL / SQL can’t connect to the remote server after installing Oracle locally
- MS SQL Could not obtain information about Windows NT group/user ‘domain\login’, error code 0x5. [SQ…
- Microsoft SQL server, additional database error: error 916 solution
- MYSQL login error: mysqladmin: connect to server at’localhost’ failed
- xrdp_mm_process_login_response:login failed
- Solution of invalid username / password; login denied error in Oracle Database Foundation
- SQL 2005 remote connection error (provider: SQL network interface, error: 28 – the server does not support the requested protocol
- SQL Server SSPI handshake failed Error
- Idea login git cannot login prompt 401
- WordPress appears Too many failed login attempts error solution
- SSIS package error report login failed for user’nt authority\anonymous logon’ solution
- The solution of shared memory real does not exist when Oracle login