January 31, 2011 at 2:04 am
Hi Friends,
I have database having many schools data in more than 1000 tables. I want to create same database but for only one school data.
Can you please suggest me the best way to do this activity?
Thanks in Advance,
Pravin.
January 31, 2011 at 2:15 am
if you know the table and its related records for that specific one school then you can create one blank database and export the data with table definition to desitnation database.
----------
Ashish
January 31, 2011 at 6:09 am
There's no magic way to to do it. You're going to have a bunch of work in front of you. The easiest part is creating the blank database. You can use the Scripting Wizard within SQL Server Management Studio to create a script that creates an exact copy of your database that you can then run wherever you want. Once that's done, you have to migrate a single school's worth of information into that new database. My recommendation is to learn how to use SSIS and create a package that will move that data, a table at a time, in dependency order, into the new db. It's just going to take little while to lay it all out, but once you're done, with that type of approach, you can run it over & over.
An alternate method, which will in the end be just as hard, is to go the reverse route. Backup your database and restore it to a new location. Then write delete scripts that get rid of everything except one school's worth of information, in reverse dependency order.
Again, no silver bullet on this one, just hard work.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply