简体   繁体   English

如何在 SQL Server 2005 中打开分离的数据库

[英]How do you open a detached database in SQL Server 2005

I try to open the database YourGuruDB1 in this directory:我尝试在此目录中打开数据库 YourGuruDB1:

D:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data

I go to file and then open file.. Then it tells me, that i must ensure that the database is installed..我 go 到文件然后打开文件.. 然后它告诉我,我必须确保安装数据库..

Previously I backed up and restored the database, and then detached it..I have no idea where the program dropped the database to..以前我备份并恢复了数据库,然后分离它..我不知道程序将数据库放到哪里..

But I want to open it with all its stored procedures like any other database that i have in SQL Server 2005但我想用它的所有存储过程打开它,就像我在 SQL Server 2005 中拥有的任何其他数据库一样

If you detached it, you need to attach it.如果你分离了它,你需要附加它。

Just right click on the "Databases" node in SQL Server Managment Server, click "Attach", navigate to the data file you indicated, and tell it to attach the database.只需右键单击 SQL 服务器管理服务器中的“数据库”节点,单击“附加”,导航到您指定的数据文件,并告诉它附加数据库。

You have to attach back the database.您必须重新附加数据库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM