On a per-object basis, SQL Server Management Studio has the option to script the object to clipboard, file, etc. Is there a way (at the database level) to do a "1-click" export of ddl AND data to a text file? Ideally I'd like to select a database and create a big text file containing the ddl for all objects plus the data in all tables. I see the data export wizard (dts/ssis) as a very different thing which really isn't what I'm looking for.
Is this capability available either in SQL Server Management Studio or in the Visual Studio Database Edition?
Right-click the database, point to Tasks, and then select Generate Scripts. In the script wizard, verify that the correct database is selected. Click to select the Script entire database and all database objects, and then select Next.
Yes, in SQL 2008 you can script objects and data.
Right-click on database in Management Studio, Tasks, Generate Scripts ....
Go through the wizard and make sure to check "data" which is false by default.
It is not any easier to find in SQL 2012:
Right-click on database in Management Studio, Tasks, Generate Scripts.
On the "Set scripting options" tab click on Advanced, then select "data only", or "data and schema" for "Types of data to script" (in the General section).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With