Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to export database with data in MSSQL?

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.

like image 328
Jamie Avatar asked Aug 21 '13 10:08

Jamie


People also ask

How do I export and Import data from a table in SQL Server?

SQL Server import and export wizard To begin, open the Import and export wizard, right-click a database and select the Tasks sub-menu -> Export data command: Connect to a source database via the Choose a data source step. Connect to a destination SQL Server database in the Choose a destination step.


1 Answers

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.

like image 89
Vinu Avatar answered Sep 23 '22 18:09

Vinu