Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Data Purge, please help
Data Purge, please help
Rate Topic
Display Mode
Topic Options
Author
Message
catchmekiran
catchmekiran
Posted Tuesday, October 09, 2012 4:31 PM
Grasshopper
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
Koen Verbeeck
Koen Verbeeck
Posted Tuesday, October 09, 2012 11:19 PM
SSCrazy 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 »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.