ASP.NET数据库不能附加到SQL Server Management Studio中
我有了一个数据库中的ASP.NET MVC3项目。我要附加的数据库SQL Server Management Studio中。
I have an ASP.NET MVC3 project that has a database. I want to attach that database to SQL Server Management Studio.
在SQL Server Management Studio中,我右键单击数据库
,然后点击连接
,然后点击添加
,它显示了文件夹/文件选择对话框。
In SQL Server Management Studio, I right click Databases
, then click Attach
, then click Add
and it shows the folder/file selection dialog.
问题是,它不会让我探索我的用户帐户,文件夹内的任何文件夹( C:\\用户\\鲍勃
)。我可以看到鲍勃
文件夹,但没有 +
扩大,并显示没有子项(尽管我知道有文件在我的Windows用户文件夹)。为什么是不是让我探索呢?
The problem is it won't let me explore any folder inside my user account folder (c:\users\Bob
). I can see the Bob
folder but there is no +
to expand, and shows no child items (even though I know there are files in my windows user folder). Why isn't it letting me explore there?
SQL Server Management Studio中是11.0.21版本(SQL Server 2012中)
SQL Server Management Studio is version 11.0.21 (SQL Server 2012)
我曾尝试选择所有从过滤器下拉菜单,而不是
,但没有文件显示。 *。MDF
文件
I have tried selecting All files
from the filter dropdown instead of *.mdf
, but no files show.
另外有两点需要注意:
- 在'附加'看在默认的DATA目录是
配置为如下所示的服务器。 - 您可以或可以不具有一个* .LDF文件。当您尝试连接,
SSMS认为你有一个,所以如果你不这样做,你必须点击
在文件列表中的文件删除附加。