Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Data Purge, please help Expand / Collapse
Author
Message
Posted Tuesday, October 09, 2012 4:31 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, April 21, 2013 6:19 PM
Points: 18, Visits: 77
We are supporting a new application which is in the development stage. Prior to moving the application to production we need to clear all the test data that's already there in the tables. Application development team here, call it data purge.  There are foreign key relationship between many tables in the databases. Not all tables need to be cleared, for example table with all public holiday details should stay as it is. As a DBA, what steps we should propose to the Application development team to accomplish this? There are many databases and each database has many tables in it. If we know the proper steps and their proper sequence, we just need to repeat it for all tables in all databases. 
Post #1370614
Posted Tuesday, October 09, 2012 11:19 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:11 AM
Points: 9,378, Visits: 6,473
I think the easiest way would be to script out the entire database: you can right click on a database, select task and then Generate Scripts. In the advanced properties of the wizard you can choose to script out schema, data or both. So for the tables where you still need the data, you can script out the data as well.

When everything is scripted, drop the database, recreate it and run the scripts.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1370678
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse