Generate a script of tables structure with data in SQL Server

Export the database backup as a script from SQL Server AWS

  1. Open your system’s SQL Server Management Studio and connect to the AWS environment SQL Server database.
  2. RIGHT click on the database you want to connect to and take a backup.
  3. Go to the Tasks –> Generate Scripts.

4. Generate Script wizard will open and press Next.

5. Select the objects from the database to generate a DDL script with data scripts. I choose the entire database in the following snapshot.

6. Choose the Save location and click the Advance setting to select the data and schema option.

7. In the Advance window, we have to choose the option if we want only schema structure or schema and data or data only as shown below. I choose schema and data.

8. In the advance window, we also have another option like selecting index, triggers, etc. as shown below. Choose as you needed.

9. Press next in the Summary tab will start the process of exporting data into the SQL file as shown below:

10. Finish the process, you will get the DDL and data into the SQL file.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.