Hello, I have a database that I have created using SQL Server Developer 2008.
I want to script it to a file so that it can be recreated by anyone at any time.
Any Ideas?
Hello, I have a database that I have created using SQL Server Developer 2008.
I want to script it to a file so that it can be recreated by anyone at any time.
Any Ideas?
You can follow the steps at Pinal's site. Be careful to select all the options you want:
To recreate the structure, right-click on the database and use Tasks --> Generate Scripts. Walk your way through the wizard, selecting those objects that you want to have created by your script. This TechNet article will serve as a good starting point for exploring how to do this if the process isn't obvious.
If you need both structure and data, you might want to consider using the Red Gate SQL Packager to script the data.
Try DBSourceTools.
http://dbsourcetools.codeplex.com
Its open source, and will script an entire database
- tables, views, procs and data to disk, and then allow you to re-create that database through a deployment target.
It's specifically designed to help developers get their databases under source code control.