Generating a SQL script of my database's data (SQL SERVER)
sql, sql-server
Solution
Try this, using Sql Server Management Studio:
- Right click the database
- Select Tasks -> Generate Scripts
- (Click next if you get the intro screen)
- Select "Select specific database objects"
- Pick the objects to generate scripts for (tables, stored procedures, etc...)
- Click Next, then specify the output filename
- This will generate the schemas only. If you want to do data generating scripts as well, click the Advanced button and scroll down to the "Types of data to script" and change it from "Schema only" to "Data only" or "Schema and data"
- Click Finish to generate the script
Problem
I cannot find how to generate a script with all the INSERT i have done so far in my database I managed to generate a script for my database itself but not for the data. How could i do this ? Thanks in advance