开发者

How do I migrate a SQL MDF File to a production SQL Server? (ASP.NET)

I have an ASP.NET pr开发者_如何转开发oject that also uses a SQL MDF File. My target server is SQL 2008R2 or SQL Azure.

I would like to know what deployment options I have as I migrate from DEV to PROD. In case it matters I'm not under any regulation to maintain PII or similarly private data.

How do I move my test schema and perhaps data to production?


You can move the entire database, including the data by attaching the MDF file to the new SQL server. Otherwise you can select all objects and generate CREATE scripts to copy the schema over.


Yes, you can attach to the MDF file directly, or do a backup / restore to get it over to SQL Server 2008.

I haven't played with SQL Azure... From what little I've heard I think you might be stuck scripting the data as durilai suggested (last I heard we're not allowed to do backups / restores for SQL Azure).


In SQL Server Management tools, right click on the database and click 'Script Database As' to create an SQL script for your database. You can also do something similar at the table level if you want the data.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜