Due to a lack of search, I was unable to check if this had been asked before.
I was approached to do a data purge, and I have never used the software, the person that approached me wanted me to do it from a SQL point of view. I believe this is not likely the best course of action. Is there any sort of stored proc, or built in way to purge data? They have a DB approaching 4GB in 2005 and wanted to purge all data except the last year or so as a form of maintenance.
How would this be done?
*This post is locked for comments
HI ,as i know you need a third party software to purge DB,you use this SQL statment to delete old journal it may help reduce size,( do not forget to backup DB before you make any change)
execute this statement to delete journals older than 2 years: - where time <getdate()-730DELETE Journal
WHERE time < getdate()-365
The above statement will delete all journals over 12 months old (alter the
number of days as required)
and then run this SQL statement
dbcc shrinkdatabase (DatabaseName)
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,900 Super User 2024 Season 2
Martin Dráb 229,297 Most Valuable Professional
nmaenpaa 101,156