Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi all,

Thanks in advance,

For every 3 months I will take backup of the entire data and will delete all the data before 3 months so that only current 3 months data will be maintained.

Regards,

Jeevan.
Posted
Updated 25-Oct-10 0:59am
v2
Comments
Dalek Dave 25-Oct-10 6:59am    
Good to know. Excellent. What's the question?

Hi,For it u need to create job that is only way u would be able to take database backup as per ur scheduled time . and for truncating all the table u need to create a stored procedure to be execute after u take backup.
If u want to create job then go through


this link
http://www.sql-server-performance.com/articles/dba/creating_backup_jobs_p1.asp[^]
 
Share this answer
 
Comments
Rajesh Anuhya 25-Oct-10 7:49am    
Your Link is not working for me....
For this one You have to create a Job

Go through the below link for How to habdling Josbs in sqlserver
Jobs in sql server[^]

You have to maintain last 3 months data.., Don't TRUNCATE the tables(as Wasif) said, this leads to a Data Loss.

Execute DELETE Quires in Job that delete only before 3 months data..,
At time of Job execution You have total 6 months data(if you are executing it for every 3 months)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900