附加SQL Server数据库 [英] Attaching SQL Server DB

查看:112
本文介绍了附加SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我更改了SQL Server选项,因此更改了特定的数据库
是默认数据库,前几天我出于某种原因分离了数据库
并且知道我无法连接到我的SQL Server,因为它的
寻找我发货的那个特定的数据库.

当我在SQL Server Management Studio中按下连接按钮时
它给了我这个错误:并且没有连接

 连接 连接到 服务器

不能 连接 连接到 附加 信息:

无法 打开 用户 数据库. 登录 失败.
登录 失败   (Microsoft   SQL  服务器错误: 4064)

获得 帮助点击:  http: //  go.microsoft.com/fwlink?ProdName=Microsoft + SQL + Server& EvtSrc = MSSQLServer& EvtID = 4064& LinkId = 20476  



解决方案

转到SQL Server Management Studio.
正常登录,然后在左侧窗格(对象资源管理器")中右键单击数据库".
选择附加..."并按照对话框进行操作.


引用:

http://www .linglom.com/2009/08/11/restore-database-from-sql-server-2008-to-sql-server-2005-part-1-introduction/

http://www.c-sharpcorner.com/uploadfile/raj1979/how-to-attach-a-database-in-sql-server-2005/

http://www.packtpub.com/article/moving-a-database-from-sql-server-2005-to-sql-server-2008-in-three-steps

http://www.mssqltips.com/sqlservertip/1894/attach-a-sql-server-database-with-a-missing-transaction-log-file/


Hi all,

I changed my SQL server options so the specific DB
is the default DB and the other day I detatched the DB for some reason
and know I can''t connect to my SQL server because its
looking for that specific DB that I detatched.

When I press the connect button in SQL Server Management Studio
it gives me this error: And doesn''t connect

Connect to Server

Cannot connect to BEN-PC.

ADDITIONAL INFORMATION:

Cannot open user default database. Login failed.
Login failed for user 'BEN-PC\Ben'. (Microsoft SQL Server, Error: 4064)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=4064&LinkId=20476



Please help what can I do?

解决方案

Go to SQL Server Management Studio.
Log in as normal, then right click "Databases" in the Left hand pane ("Object explorer").
Select "Attach..." and follow the dialogs.


Quote:

http://www.linglom.com/2009/08/11/restore-database-from-sql-server-2008-to-sql-server-2005-part-1-introduction/

http://www.c-sharpcorner.com/uploadfile/raj1979/how-to-attach-a-database-in-sql-server-2005/

http://www.packtpub.com/article/moving-a-database-from-sql-server-2005-to-sql-server-2008-in-three-steps

http://www.mssqltips.com/sqlservertip/1894/attach-a-sql-server-database-with-a-missing-transaction-log-file/


这篇关于附加SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆