How to Create a database script with schema and data in sql server 2008 r2

Introduction

Sql server provides us two kind of backup facility like

  1. Back Up and Restore 
  2. Generate Script

Today I will explain you how to generate script with schema and Data in SQL server 2008 r2


Step 1

Select the database which you want to get script of database from object explorer



Step 2

Click on Tasks and Click on Generate Scripts

Step 3

Select the table which you want to get script with data


















Step 4

Now Click on Advance Tab



















Step 5

Now Select Type of Data script with "Schema And Data"















Output (Automated Generated script file of Database)


















Happy Programming.



Comments