Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Dario Palladino,
I needed something to create all my database tables into another new database I've just created but I didn't wnat to do that by hand so I created this Store Procedure starting from a Jonathan AC Roberts idea that he developed on indexes. (http://www.sqlservercentral.com/Forums/Topic401784-562-2.aspx)
This script creates a store procedure that you can run every time you need to recreate your database somewhere else.
Just create you new DB and run this SP on your Production DB. Then, run the results into the new DB where you want to replicate all the tables.
If you find error or you think it could be done better, please advice me, I'm really open mind and looking for new knowledge.
I hope you found it useful.
Create database taking forever
create database security
CREATE DATABASE failed
create the database
Problems in creating database snapshots