Centers for Disease Control and Prevention
National Center for Chronic Disease Prevention and Health Promotion
Division of Cancer Prevention and Control
National Program of Cancer Registries
Registry Plus Software for Cancer Registries


How to export SQL Server Database table and data as script

  1. Open SQL Server Management studio and connect to the server where your database is.
  2. Right mouse click on the database where your tables are located (e.g. eMaRC_Plus)
  3. Select Tasks>> Generate Scripts
  4. You will see the following screen
  5. Click on Next. You will notice the following window. Choose “Select specific database objects”, then select check boxes for all desired tables (e.g. AbstractFields, Datamap etc.). Please check other instruction to see which tables are needed to select.
  6. Click on next. You will see the following window.
    Choose “Single file per object”.
  7. Critical and important Step: Click on “Advanced” button. Select the appropriate options. Please select the following options for eMaRC Plus related script export.

    Check for object existence è True
    Script Drop and Create è Script Drop and create
    Script for Sever Version è SQL Server 2008 R2
    Script Use Database è False
    Types of data to script è Schema and data

  8. Critical and important Step: Click on Browse button. Select a directory where you want to keep exported scripts. Please keep exported scripts in the safe place. You may need it to extract your customizations to apply that on new version.
  9. Click on OK button to close “Browse for Folder” Dialog box
  10. Click on Next button to continue. You will see the following Window
  11. Click on Next to generate script. You will see window similar to below. The items shown below with green circle would be different based on what you have selected to export.
  12. Exported Tables/Data as script would look similar to below.