How to add a new database to app_data using SQL Server Enterprise Edition

I am an absolute beginner in MVC, and now I am starting to start it.

I checked the tutorial podcast in which I received, I can add a new SQL Server database item under app_data . But as soon as I click on it, a msg popup message is displayed to indicate that SQL Server 2005 or 2008 Express is not installed on my desktop.

But in fact, I already have SQL Server 2005 Enterprise installed. Why did this happen? And how to add a SQL Server database if I received the corporate version?

Many thanks.

+4
source share
1 answer

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

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

Or, if you do not like this approach, you can always install SQL Server 2005/2008 Express on your computer, and then use "put your MDF file in app_data " with this version of Express.

+8
source

Source: https://habr.com/ru/post/1309997/


All Articles