Sunday, February 19, 2012

Generate .sql ?

Hi!

When MS published starter kits there were files .sql in App_Data. This files contained some sample data for a DB. How to create such files when I have database with data ?

Jarod

The quick answer is you can't and the reason is when there is data you need to Backup and Restore because it moves everything including permissions and data in the database, the other option is to Detach and Attach with code, the last option use DTS/SSIS to move the database because it is a data transfer and cleaning tool. I have a faq of all the methods to move a database, post again if you still have question. Hope this helps.

http://forums.asp.net/thread/1454694.aspx

|||I agree with Caddre. For database objects, you can only generate DDL statements for them. There is no way to generate .sql for data.

No comments:

Post a Comment