gregnorm
gregnorm

Reputation: 319

Technique to convert database to sql script?

I want to convert a database into an sql script so that i can recreate it elsewhere. I want the copy to be same as original.

How do i do that ?

Upvotes: 3

Views: 5638

Answers (2)

Sachin
Sachin

Reputation: 40970

You can generate DB Script using Management Studio through available option.

Right Click on Database -> Task -> Generate Scripts

enter image description here

Here is an option for including Data with Schema in script

Upvotes: 6

Arsen
Arsen

Reputation: 965

In SQL Management Studio, right click on the database, select Tasks->Generate Scripts. It will guide you through a wizard.

Upvotes: 1

Related Questions