How do I Script the database into a text file so that it can be created by someone else?
3 answers
To recreate the structure, right-click the database and use Tasks → Generate Scripts. Work your way through the wizard, selecting the objects you want to create with the script. This TechNet article is a good starting point for learning how to do this if the process isn't obvious.
If you need structure and data, you might want to consider using the Red Gate SQL Packager for script data.
+1
a source to share
Try DBSourceTools.
http://dbsourcetools.codeplex.com
Its open source and script a complete database
- tables, views, procs and data to disk, then allow you to recreate that database using the deployment target.
It is specifically designed to help developers get their databases under source control.
0
a source to share