IMG-LOGO

How to generate sql scripts with data in SQL Server Management Studio?

andy - 09 Oct, 2019 2203 Views 0 Comment

In this tutorial, I am going to show you how to generate SQL scripts with data in SQL Management Studio. This method is another alternative way if you decide do not want to back up in .bak format.

Once you have connected to the SQL server. Right-click the database and navigate to Tasks menu and choose to Generate Scripts option.

A wizard screen will appear. Click the Next button to start to generate the scripts.

Then in the next screen, choose the Script entire database and all database objects. If you want partial data script, you can choose the Select specific database objects. Once you have decided your option, click Next button.

p>

In the next screen, specify where you want to save the location of the script file. Then click the Advanced button. A popup window will appear. Under the option Types of data to script choose option Schema and data. Then click the Ok button. This popup window will close. Then click the Next button.

p>

The next screen will review of your selected options. If everything is good, click the Next button.

p>

It will then process all of the required jobs. Once everything is completed you will be able to click Finish button.

p>

Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.

Related Articles

How to restore database using SQL query in TSQL?

If you have a database backup bak file extension and want to restore it using SQL query You can use the built in RESTORE DATABASE function Remember in order to be able to restore a database successfully You need to ...

How to get all table sizes in TSQL?

To get the information about how much space or size used by tables You can retrieve the size information by linking multiple tables in sys tables There are two tables that hold this information The first one is the sys ...