Click here to Skip to main content
15,904,877 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I've c# app, and who can I backup and restore my database?
Posted

 
Share this answer
 
v2
Comments
Member 8584763 1-Nov-12 8:36am    
using c# app
Thomas Daniels 2-Nov-12 4:52am    
Ok, I updated my answer!
You can perform all sorts of SQL Server admin tasks using the SMO API:

http://msdn.microsoft.com/en-us/library/ms162169%28v=sql.105%29.aspx[^]

There is also a CodeProject article dealing specifically with backup and restore:

Using SMO for Backup, Restore and Security Purposes[^]
 
Share this answer
 
Comments
Member 8584763 1-Nov-12 8:37am    
is there another way?
jim lahey 1-Nov-12 8:48am    
Yes, there are other ways of doing this. What did you have in mind?
Member 8584763 1-Nov-12 10:07am    
I don't actually ,but if there using c# mainly?
jim lahey 1-Nov-12 10:34am    
If a C#-based solution is what you want then the solution I posted can be done using C# and the SMO libraries outlined in the CodeProject article. You could also do it in VB.net if you want.

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