IAdapter
IAdapter

Reputation: 64737

How to generate inserts?

I have Sql Server database and i would like to export the data as .sql file. The Generate Script for some reason is ignoring the data.

Upvotes: 1

Views: 154

Answers (4)

David Atkinson
David Atkinson

Reputation: 5899

Generate Scripts under the database Tasks in the Object Explorer should work. Could you check that Types of Data to Script is set correctly in the Advanced dialog in the Set Scripting Objects wizard pane, as confusingly it defaults to false and is not very discoverable? (are you using SSMS 2008?)

Upvotes: 0

Phil Helmer
Phil Helmer

Reputation: 1240

You could go with this script, which we've had success with (thank you, Narayana). Should you use it, please keep the copyright notice and usage notes with it.

If you need something more robust, then Red Gate's SQL Data Compare will do the trick.

Upvotes: 0

codingbadger
codingbadger

Reputation: 43974

The built in Generate Scripts only create the Schema not the Data.

You can use an add on such as SSMS Tools Pack to generate scripts that will populate data and schema.

Upvotes: 2

Xint0
Xint0

Reputation: 5389

Have you tried the Database Publishing Wizard?

Upvotes: 1

Related Questions