.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

How to take Backup of Database at runtime... SQL-2005....

Posted By: susant     Posted Date: December 15, 2008    Points:2   Category :Sql Server
Hi


how to take backup of database at runtime...

suppose i am using one database in my app-on.. when i logon i will use that database.. and i have one menu take Backup so how to take back up at run time.. ??

Responses
Author: Amit Mehra             
Posted Date: December 16, 2008     Points: 5   

Hi,
The easy way to take backup of SQL Server 2005 Database using C#.

1) Write a stored Procedure which will take the backup
2)In that Stored Procedure write SQL Statement like this

BACKUP DATABASE DBName
TO DISK = ''C:\temp\DBName.bak''


3) And execute this sored procedure using ADO.Net Command.

Thanks,
Amit
Please "Mark As Answer " if this post help you.
Author: Santosh             
Posted Date: October 10, 2009     Points: 5   

hi susant
go for below link

http://www.dotnetspark.com/kb/917-how-to-take-backup-database-runtime-sql-2005.aspx
Santosh



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend