0

How do I create a script of all the data in a particular database?

Thanks,

Sachin

2
  • Do you have SQL Server Management Studio? (not express) Commented Nov 16, 2012 at 13:44
  • You mean like mysqldump for MySQL? See: stackoverflow.com/questions/85186/… Commented Nov 16, 2012 at 13:46

1 Answer 1

1

This is a quick summary of what to do.

• In SQL Server Management Studio, connect to your database.

• Right-click on the database name in the object explorer

• In the context menu, mouse over "Tasks", and from the sub menu, click on "Generate Scripts"

• That will give you a popup window for "Generate and Publish Scripts"

• Read and follow the steps. Under "Set Scripting Options", click the "Advanced" button. Under general options, the last one should be "Types of data to script". Default is Schema Only. Change to "data and schema" to get both the table schema and data. Continue following the wizard.

Here's a link to the page in MSDN: http://msdn.microsoft.com/en-us/library/ms178078(v=sql.100).aspx

You can do more research on what to do.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.