If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Duplicating SQL DB Structure

Hey all,

I was wondering if anyone here knows how to duplicate an MS SQL Server Database, but without the data. I just need the structure. If I was to back up the current database and then do a restore on the back up and rename it, then I'd have a duplicated database. However, I don't want the data that's in it, so what's the best method. Should I use the method I just described and then just clear the tables? We're using SQL Server Enterprise Manager 8.0. There's an import/export function, but I think that will also import the tables, views, AND data into a new database I just created. Any help will be much appreciated.

Thanks Roelf, but what I need is actually a bit more complicated than what I first described (now that I have a full understanding of what our corporate controller wants).

What we have:
A database with all transactions that store info from about the middle of 2002 until current.

What we need:
A database that stores only info from 9/1/06 until current and a second database with only info from mid-2002 until 8/31/06.

We have about a million tables, relationships, etc. (slight exaggeration) to actually go through the tables and split them by a certain transaction date (and find out which dependent tables were affected by this), esp. transactions that were posted post-9/1/06, but affect the previous month. I called Microsoft to see if Great Plains has any capabilities to remove history, and let's just say that it's not very friendly and agreeable. Since the year isn't closed, we attempted (using MS's advice) to change the fiscal year end to 8/31/06, close out the year, and then remove the history for that year. Let's just say that good thing it was a test copy.

The accounting department is doing it their own way, so I've sort of backed out of this project. So I'll just leave it at that. Thanks for your help Roelf.