How to Create a Scripted SQL Database Backup

In this article it is explained how to create a Microsoft SQL server scripted backup
Please note: This article is intended for advanced users
  1. Connect to your database via remote connection following the below KB article:

    How To Connect to Your MS SQL 2012 Database
  2. Select your database and right click then go to Tasks > Generate Scripts

  3. Once you select Generate Scripts you will be taken to a separate window

  4. Click Next
  5. Keep Script entire database and all database objects selected

  6. Click Next
  7. Keep Save to file checked and select the Advanced button

  8. In the advanced window select from Script DROP and CREATE change it to Script DROP and CREATE from Script CREATE

  9. If you are moving to an older version of SQL server and need to script it to a different version this can be changed under the Script for Server Version option:

  10. The last thing to change is the Types of data to script change this to Schema and data, this ensures that you have all the data including the schema
  11. Click Next.
  12. At the Summary screen, click Next
  13. The Save or Publish Scripts will show the progress. Once it's finished, click Finish.


Add Feedback