如何使用SQL Server Enterprise Edition在app_data下添加新数据库 [英] How to add a new database under app_data with SQL Server Enterprise Edition

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

问题描述

我绝对是MVC的新手,现在我站在它的开始.

I'm a absolute newbie in MVC, and now I am standing the beginning of it.

我签出了教程播客,在其中我可以在app_data下添加SQL Server数据库的新项目.但是,一旦我单击该消息,就会弹出一个消息框,显示在我的桌面上没有安装SQL Server 2005或2008 Express.

I checked out the tutorial podcast, in which i got i can add a new item of SQL Server database under app_data. But once I click that, a msg popup to show that in my desktop, no SQL Server 2005 or 2008 Express was installed.

但是实际上,我已经安装了SQL Server 2005 Enterprise.为什么会这样呢?以及如果有企业版,如何添加SQL Server数据库?

But in fact, I have a SQL Server 2005 Enterprise installed already. Why this happened? And how to add a SQL Server database if I got a enterprise version?

非常感谢.

推荐答案

将数据库文件添加到app_data文件夹(仅 )适用于SQL Server Express版本.您无法为企业版启用它.

Adding the database file to the app_data folder only works with SQL Server Express editions. There's nothing you can do to enable it for Enterprise versions.

如果拥有SQL Server Enterprise,则需要在该服务器中创建数据库和db对象(使用SQL Server Mgmt Studio或Visual Studio)并连接到该服务器.您无法将您的MDF/LDF文件放入企业版的app_data中-它将无法正常工作.

If you have SQL Server Enterprise, you need to create your database and your db objects in that server (using SQL Server Mgmt Studio or Visual Studio) and connect to that server. You cannot put your MDF/LDF files into app_data with Enterprise version - it just won't work.

或者,如果您不喜欢这种方法,则可以始终在计算机上安装SQL Server 2005/2008 Express,然后在该Express版本中使用将MDF文件放入app_data"方法.

Or if you don't like this approach, you could always install SQL Server 2005/2008 Express on your machine and then use the "put your MDF file into app_data" approach with that Express edition.

这篇关于如何使用SQL Server Enterprise Edition在app_data下添加新数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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