开发者

ASP.NET MVC2 database deployment issue: how to convert from "personal" to production database? SQL Server 2005

开发者 https://www.devze.com 2023-03-21 16:21 出处:网络
I am wrapping up an application using ASP.NET in Visual Studio 2008.I am using the following technologies:

I am wrapping up an application using ASP.NET in Visual Studio 2008. I am using the following technologies:

MVC 2 framework
Entity framework (version isn't jumping out at me)
SQL Server 2005

During development, the production database was not created. So I created all the tables on my personal database. Now that I am ready to deploy my web application, I need to use the production database.

I've used SQL Server Management Studio Express to transfer all the schema from my personal database to the production database. This worked smoothly. None of the data needs to get transferred.

Both my personal database(well call it personal) and the production database(well call it production) are on the same remote server(SQL server)

I am at a bit of a loss on what I need to convert to make my web application use the production database.

I have tried going to web.config and change all references of "personal" to "production". After doing that, I went into the edmx file and tried t开发者_开发问答o Update model from database. It showed the connection string changed. However, I get an Error 11007: "Entity type 'sysdiagrams' is not mapped.

None of my searches seemed related to this issue.

Do I need to completely delete the edmx file and start from scratch?


Do you have sysdiagrams on the production DB? It's a system table that is usually created by SQL Server itself when you access the diagramming portion of Management Studio.

Not sure why you'd have that table in your edmx anyway unless you're actually working against that data but that would be a little strange.

Either update your edmx to not ref that table (preferred) or create the table on your production system by using the diagramming tools so that Management Studio can create them for you.


We had similar problem and it worked after deleting sysdiagrams. Just wanted to know if there are any other issues that might occur if sysdiagrams is deleted.

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号