dbTalk Databases Forums  

Deletion of data when successful backup of DBs in DB Maintenence Plan

microsoft.public.sqlserver.programming microsoft.public.sqlserver.programming


Discuss Deletion of data when successful backup of DBs in DB Maintenence Plan in the microsoft.public.sqlserver.programming forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Melanie Mayfield
 
Posts: n/a

Default Deletion of data when successful backup of DBs in DB Maintenence Plan - 02-16-2005 , 07:13 AM








Hello

I need to runa procedure which deletes all data older than 3 months on
the successful completion of backups in a Datbase Maintenance plan.

Any ideas - please help

Melanie

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
  #2  
Old   
Uri Dimant
 
Posts: n/a

Default Re: Deletion of data when successful backup of DBs in DB Maintenence Plan - 02-16-2005 , 07:28 AM






Melany
declare @dt datetime
set @dt='20041101'

SELECT <column lists> FROM Table WHERE col >=@dt and col <
dateadd(day,1,getdate())


"Melanie Mayfield" <melanie.mayfield (AT) ultraasp (DOT) net> wrote

Quote:

Hello

I need to runa procedure which deletes all data older than 3 months on
the successful completion of backups in a Datbase Maintenance plan.

Any ideas - please help

Melanie

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Reply With Quote
  #3  
Old   
Melanie Mayfield
 
Posts: n/a

Default Re: Deletion of data when successful backup of DBs in DB Maintenence Plan - 02-16-2005 , 07:49 AM





Thanks Uri
I need the procedure to be automatically firect on the successful
completion of the back up in the DB Maintenance Plan, I know success of
the DB Maintenance Plan is logged in the sysdbmaintain_history table,
but I need to an automatic process to check this.

Thanks for your help once again!

Melanie

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.