2

I want to export the data in my SQL database to a script file (file filled with insert commands) using C# but I can't get it done. Is there a setting for it in the BACKUP DATABASE statement?

4
  • This seems to be a similar question: stackoverflow.com/questions/5801175/… Commented Oct 3, 2021 at 13:33
  • Which RDBMS is this for? Please add a tag to specify whether you're using mysql, postgresql, sql-server, oracle or db2 - or something else entirely. Commented Oct 3, 2021 at 14:22
  • Sql Server doesn't do INSERT-based exports. That's more of a MySql thing, and Sql Server people tend to look down on MySql for making you do it that way... it's much slower, creates larger files, and is error-prone with regards to certain characters or keywords getting into the scripts. Commented Oct 4, 2021 at 14:40
  • Hi Joel, thanks, that explains why I couldn't find it... MS SQL Server Management Studio does provide this option, so I thought it was kind of standard. Maybe I find some c# that can do it. Bas Commented Oct 5, 2021 at 18:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.