Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I make one Desktop application in which I took SQLSERVER 2008 databse backup as well as restore it manually.

Now, I want to make one application by Which I can Scheduled this backup.
like DATE specific
and also DAILY (Time Spacific)

Noted: this is Windows Application Using C#


kindly Help me to figure it out.
Posted

Hi,Create a Winform project,
1)Add Timer Control to it.
2)In timer Tick event check current time== your preferred time for example
if(currentTime=="18:00:00")
{
doBackup;
}
3) In form Load enable the Timer.
4) Always run your program in server.

You can also use SQL Job have a look at this no need to create separate program for this. http://blogs.msdn.com/b/sqlagent/archive/2010/10/12/create-a-database-backup-job-using-sql-server-management-studio.aspx
 
Share this answer
 
v2
Comments
Varun_nayak 17-Jul-13 2:20am    
thank you very much Syed shanu, your both solutions are great.
my reporting officer like that SQL job option.

i have Sqlserver 2008 in this "sql server agent" option is not visible in object explorer,
Do u have any idea how I can it enable or can download its services.

Thanking you
varun nayak
syed shanu 17-Jul-13 2:24am    
Thanks Varun for your reply,
You can have a look at here for SQL Server Agent Enable
http://technet.microsoft.com/en-us/library/ms191454%28v=sql.105%29.aspx
http://msdn.microsoft.com/en-us/library/ms178142.aspx
for more details about SQL Server Agent use Googling.
Varun_nayak 17-Jul-13 2:51am    
Thank you syed shanu,
I don't think there is any need for googling,
Indian software guys like you have more knowledge than it.

Your upper both links are perfect.
Got the solution.
syed shanu 17-Jul-13 2:54am    
Tahnks and Mark it as Answered
This is perfect Answer i got from syed shanu.



SQL
Hi,Create a Winform project,
1)Add Timer Control to it.
2)In timer Tick event check current time== your preferred time for example
if(currentTime=="18:00:00")
{
doBackup;
}
3) In form Load enable the Timer.
4) Always run your program in server.

You can also use SQL Job have a look at this no need to create separate program for this. http://blogs.msdn.com/b/sqlagent/archive/2010/10/12/create-a-database-backup-job-using-sql-server-management-studio.aspx
 
Share this answer
 
 
Share this answer
 
Comments
Varun_nayak 16-Jul-13 8:25am    
I checked above both the link, but still didn't get any idea.
do u have any other idea??
Means On my button click event I took back up manually,
So, is there any way so I can call my that button click Event repeatedly on daily basis, so i can able to scheduled my backup.
syed shanu 17-Jul-13 0:20am    
You can also use SQL Job have a look at this no need to create separate program for this.
http://blogs.msdn.com/b/sqlagent/archive/2010/10/12/create-a-database-backup-job-using-sql-server-management-studio.aspx

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