Hi,
Did you change the priority of connection Service manager of SQL.
Please check the below blog.
Note 806925 - SQL Error 4064: Cannot open user default database
Are you able to login with another user like sa or any other user you would have added during the installation of MSSQL. Hope you are giving the host name and the database name in correctly as some times thats the issue.
Note 592514 - MSSQL: internal database users, permissions and security
1645041 - FAQ: Microsoft SQL Server logins and their usage in SAP environment
Thanks
Rishi Abrol