For more information, see MSSQLSERVER_18456.The SQL Server error log will have the following message:"Login failed for user 'CONTOSO\User1'. Reason: Failed to open the explicitly specified database 'AdventureWorks'."To resolve this error, make sure that the database name is the same in ...
使用SSMS 之類的應用程式向使用者顯示錯誤 4064 時,SQL Server 錯誤記錄檔中會記錄下列訊息。 這是依照設計的行為。 使用本文所述的程式,修正失敗登入的默認資料庫,會自動解決 18456 錯誤。 輸出複製 2023-02-06 18:17:02.56 Logon Error: 18456, Severity: 14, State: 40. 2023-02-06 18:17:02.56 Logo...
Login failed for user ‘UserName’. (Microsoft SQL Server, Error: 4064) The fix for this problem is very simple. Fix/Workaround/Solution: First click onOption>>Button of “Connect to Server” Prompt. Now change the connect to database to any existing database on your server like master o...
Cannot open user default database. Login failed. Login failed for user ‘UserName’. (Microsoft SQL Server, Error: 4064) The fix for this problem is very simple. Fix/Workaround/Solution: First click on Option>> Button of “Connect to Server” Prompt. Now change the connect to database to...
错误原因就是删除了用户的默认数据库或移走了用户的默认数据库。 解决办法: 1.以windows验证(windows authentication)的:在登陆界面中单击Options>>这个按钮,然后在connection to database 中选择master数据库就行。 2.以sqlserver验证(sql server anthentication)的:先用方法1之后登陆到主界面,然后在【安】/【Scuri...
SQL Server 2000用户打开CMD命令提示符,使用以下命令: SQL帐户登录方式:isql -U"密码" -P"jtydl" -d"master" -Q"exec sp_defaultdb N'sa', N'master'" Windows验证登录方式:isql -E -d"master" -Q"exec sp_defaultdb N'BUILTIN/Administrators', N'master'" ...
使用SSMS 之類的應用程式向使用者顯示錯誤 4064 時,SQL Server 錯誤記錄檔中會記錄下列訊息。 這是依照設計的行為。 使用本文所述的程式,修正失敗登入的默認資料庫,會自動解決 18456 錯誤。 輸出複製 2023-02-06 18:17:02.56 Logon Error: 18456, Severity: 14, State: 40. 2023-02-06 18:17:02.56 Logo...
SQL Server 2000用户打开CMD命令提示符,使用以下命令: SQL帐户登录方式:isql -U"密码" -P"jtydl" -d"master" -Q"exec sp_defaultdb N'sa', N'master'" Windows验证登录方式:isql -E -d"master" -Q"exec sp_defaultdb N'BUILTIN/Administrators', N'master'" ...
For more information, see MSSQLSERVER_18456.The SQL Server error log will have the following message:"Login failed for user 'CONTOSO\User1'. Reason: Failed to open the explicitly specified database 'AdventureWorks'."To resolve this error, make sure that the database name is the same in ...
由于与默认数据库中登录名关联的数据库用户的权限问题或默认数据库存在问题,SQL Server 登录名无法连接到 SQL Server。 权限问题可以是以下一个或多个问题: 该登录名在其默认数据库中没有相应的映射用户。 已将默认数据库分配给登录名,但未在指定数据库中创建用户映射。