Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Management Studio 2008 R2 Export Structure + Data

I want to export the structure and data in my database into a .sql file to then execute as a query on another machine.

Any ideas on how this can be achieved? I have tried using the database import/export wizards to no avail...

like image 972
JHarley1 Avatar asked Nov 18 '10 12:11

JHarley1


1 Answers

Right click on database, to go tasks, generate scripts. Make sure you choose the option "Schema and Data" for what "Types of Data to Script" when clicking on the "Advanced" button.

like image 76
drew Avatar answered Nov 13 '22 12:11

drew