Home > Ask the SQL Server Experts > Questions & Answers > All about data purging
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

All about data purging

Rudy Limeback EXPERT RESPONSE FROM: Rudy Limeback

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 18 July 2005
What is data purging? What technology or method can I use to purge data in SQL Server 2000?

>
Data purging is deleting data that you no longer want. In SQL Server 2000, or in fact in any database system, the very first step is to make sure you have a copy of it, because you might want to restore it some day.

There are many ways to make sure you have a copy of your data. For example, you can back up the entire database. Or you could take a copy of only those rows about to be purged. In SQL Server, you have the very handy SELECT INTO FROM syntax:

select *
  into old_accounts_2003
  from current_accounts
 where account_lastactive < '2004-01-01'
Once that's done, you can go ahead and delete:
delete
  from current_accounts
 where account_lastactive < '2004-01-01'
Remember, always make sure you can restore it before you purge it.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Microsoft SQL Server 2000
Track changes to SQL Server 2000 and 2005 with one simple utility
Is it possible to find disabled indexes in SQL Server 2000?
FAQ: Creating and altering SQL Server tables
FAQ: SQL Server comparison features
SQL Server DBMS' growing popularity is no coincidence
What is a SQL Server instance?
Strange error when installing SQL Server 2000 Developer Edition
Working with multiple versions of SQL Server
Setting up automatic switchover between SQL Server instances
Test for hardware problems with PHYSICAL_ONLY
Microsoft SQL Server 2000 Research

Microsoft SQL Server Performance Monitoring and Tuning
Using traces in SQL Server Profiler
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Data restoration and DB property management
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Troubleshooting Distributed Transaction Coordinator errors in SQL Server
Clearing the Windows page file and its effect on server performance
Optimizing SQL Server indexes –- even when they're not your indexes
Performance implications of transaction log autogrowth in SQL Server
The short course on how SQL Server really works

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
application server  (SearchSQLServer.com)
comma-separated values file  (SearchSQLServer.com)
DDBMS  (SearchSQLServer.com)
entity-relationship model  (SearchSQLServer.com)
full-text database  (SearchSQLServer.com)
intelligent database  (SearchSQLServer.com)
OLE DB  (SearchSQLServer.com)
Quiz: Database Basics  (SearchSQLServer.com)
relational database management system  (SearchSQLServer.com)
SQL Server  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



SQL Solutions - SQL Database Design
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts