mysqldump for sql server [closed]

Solution 1:

There is a freeware which creates SQL insert statements from the data of your tables:

[SQL Dumper] (Moderator note: link removed due to malware-infested site)

SQL Server Dumper enables you to dump selected SQL Server database tables into SQL INSERT statements, that are saved as local .sql files and contain all the data required to create a duplicate table, or to be used for backup purposes. You can choose to create an individual .sql file for each table, or combine all selected tables into a single file.

This program implements the following special features:

  • Foreign Keys order tables in text file in order to insert data without colisions/errors
  • Primary Key IDENTITY guarantees the value of the IDENTITY field
  • Reference to itself eliminates the constraint and at the end create it again

Use it in combination with SQL Server's built-in schema generation (object scripting).

Solution 2:

aside from writing your own sql to do this, there are commercially available tools eg:

  • ApexSql Script

Solution 3:

For Sql Server 2005 and 2000, Microsoft has the Database Publishing Wizard which you can download here for free. A newer version of that tool is built into Sql Server 2008.