Create Database SQL Server backup Script

 To generate a SQL Server backup script that includes data, you can use the SQL Server Management Studio (SSMS) Generate Scripts wizard. Here are the steps to do so:

  1. Open SSMS and connect to the SQL Server instance you want to backup.
  2. Right-click on the database you want to backup and select "Tasks" -> "Generate Scripts".
  3. In the "Introduction" page of the wizard, click "Next".
  4. In the "Choose Objects" page, select "Select specific database objects" and select the tables you want to include in the backup. Click "Next".
  5. In the "Set Scripting Options" page, set the following options:
    • "Script Data" to "True"
    • "Types of data to script" to "Data only"
    • "Script Drop and Create" to "False"
    • "Script for Server Version" to the appropriate version of SQL Server you want to run the script on
  6. Click "Next" to review the summary of your settings, then click "Next" again to generate the script.
  7. Save the generated script to a file or copy it to the clipboard.

The generated script will contain the SQL statements to recreate the selected tables with their data. You can run the script on another SQL Server instance to create a backup of the original database.

Create Database SQL Server  backup Step 1


Create Database SQL Server  backup Step 2




Create Database SQL Server  backup Step 3



Create Database SQL Server  backup Step 4



Create Database SQL Server  backup Step 5



Create Database SQL Server  backup Step 6



Create Database SQL Server  backup Step 7


Create Database SQL Server  backup Step 8





Create Database SQL Server  backup Step 8


Create Database SQL Server  backup Step 9





Comments