Reputation: 64737
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
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
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
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