Microsoft SQL Server, 错误:4064的解决方法 (转载)
2014-03-22 00:33
866 查看
SQL SERVER – Fix : Error: 4064 – Cannot open user default database. Login failed. Login failed for user
November 4, 2008 by pinaldaveI have received following question nearly 10 times in last week though emails. Many users have received following error while connecting to the database. This error happens when database is dropped for which is default for some of the database user. When user try to login and their default database is dropped following error shows up.
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 any existing database on your server like master or msdb.
Now click on connect and it will successfully log you in. Once you
login in the system run following statement for your username and it
should fix your problem. Make sure to replace [test] with your username and master with yourdatabase name.
ALTER LOGIN [test] WITH DEFAULT_DATABASE = master
GO
相关文章推荐
- 【转载]】Microsoft SQL Server, 错误:4064的解决方法
- Microsoft SQL Server, 错误:4064的解决方法
- Microsoft SQL Server错误: 15138删除对于用户失败,数据库主体在该数据库中拥有架构,无法删除。解决方法
- Microsoft Dynamics CRM 2013 安装 报表服务出现“ SQL Server Reporting Services 帐户是本地用户且不受支持 ”错误的解决方法
- (Microsoft SQL Server,附加数据库 错误: 916)解决方法
- Microsoft SQL Server 错误代号: 15535 解决方法
- 无法打开物理文件xxx.mdf操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120)的解决方法
- 无法打开物理文件xxx.mdf操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120)的解决方法
- Microsoft SQL Server 错误代号: 15535 解决方法
- Microsoft SQL Server错误: 15138删除对于用户失败,数据库主体在该数据库中拥有架构,无法删除。解决方法
- PowerDesigner反向数据库时遇到[Microsoft][ODBC SQL Server Driver][SQL Server]无法预定义语句。SQLSTATE = 37错误解决方法
- Microsoft Dynamics CRM 2013 安装 报表服务出现“ SQL Server Reporting Services 帐户是本地用户且不受支持 ”错误的解决方法
- 当sqlserver启用sa账户时,出现Microsoft SQL Server 错误代号: 15535 解决方法 (转)
- (Microsoft SQL Server,附加数据库 错误: 916)解决方法
- 无法打开物理文件xxx.mdf操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120)的解决方法
- sql server 2012错误:"用户 sa 登录失败 microsoft sql server,错误:18456"解决方法
- Microsoft OLE DB Provider for SQL Server 错误 '80040e37'解决方法
- 无法打开物理文件xxx.mdf操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120)的解决方法
- 在Microsoft SQL Server 2008环境下安装mscrm4.0报“The specified path is not a metabase path”错误解决方法
- 无法打开物理文件xxx.mdf操作系统错误 5:“5(拒绝访问。)” (Microsoft SQL Server,错误: 5120)的解决方法