I have a database in SQL Server 2008 R2 with years of data and hundreds of tables, stored procedures, views and jobs.
I want to create a replica of the database in the same server (it’s clustered) for archiving purposes. I want to keep in the production database just up to 2 years of data, and everything older then that, remove it from the production DB and insert it into the archive database. I plan on doing that using an SSIS package.
I would like to know the best way to create the new database with all empty objects in it and any pitfalls, tricks, or any other thing I should watch for.
Thanks, and a happy new year.
If you don’t need the data but just the schema this should help
Script Database