how to clear database at specific time automatically

Posted by Abhi_patil under ASP.NET on 4/17/2009 | Views : 1517 | Status : [Member] | Replies : 3
i want to write such task which executed automatically at specific time suppose at midnight 1:00 Am.
that task will retrive all tables one by one from database and execute delete querues to clear database.




Responses

Posted by: Neeks on: 4/17/2009 [Member] Bronze

Up
0
Down
You can create a windows service to perform the task as you wanted.
http://www.blackwasp.co.uk/WindowsService.aspx
this link will help you for creating a windows service

Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/22/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Afternoon Abhi_patil

This Can be Done using SSIS. Create an SSIS Package in SQl 2000 we have DTS packaages and in SQL2005/8 we have SSIS. Create a Package after you tested the Package and its Working Create a Job in SQL , then in the Job you can select the Time it will execute everyday.

Here is more info on that

CREATING SSIS PACKAGES

http://vyaskn.tripod.com/sql_server_2005_making_ssis_packages_portable.htm

http://decipherinfosys.wordpress.com/2008/09/16/deploying-ssis-packages-in-sql-server-2005/

http://www.simple-talk.com/sql/sql-server-2005/executing-ssis-packages-/

CREATING A JOB IN SQL


http://www.codeproject.com/KB/aspnet/Schedule__Run__SSIS__DTS.aspx

http://support.microsoft.com/kb/918760/


Thank you for Posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Lakhangarg on: 8/31/2009 [Member] [Moderator] Silver

Up
0
Down
Hi-

Either Schecule Yor Jobs in Sql server or Write window service for this..

Thanks & Regards
Lakhan Pal Garg
http://lakhangarg.blogspot.com/


Abhi_patil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response