How to export database with data in MSSQL?

Jamie picture Jamie · Aug 21, 2013 · Viewed 46.5k times · Source

How can I export my 2012 database with data to a .sql file so I can import it to a 2008 server? I've never been able to export the data only the structure.

Answer

Vinu picture Vinu · Aug 23, 2013

You can right click on the database in management studio. then go to,

Tasks --> Generate scripts --> Advanced

There you can enable "Type of data to script" as Schema and data, then generate the script. So that your script file will be populated with your data in table.