使用C#备份数据库 [英] Backup of database using c#

查看:72
本文介绍了使用C#备份数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了具有大量表的应用程序.
我想让客户端根据需要进行备份.
我可以通过在Windows应用程序的c#.net中单击按钮进行编码来获取一些用于备份的代码.
请任何有代码的人将其转发.
在此先感谢.

I have created Application with large No of tables.
I want to give option to client to take backup as it needed.
can i get some code for making backup by coding on button click in c#.net of Windows Application.
pls any one having code then forward it.
Thanks in Advance.

推荐答案

在这里:

问题有点含糊.如果您需要同时使用SQL Server和MySql,并且只有一种从客户端进行备份的方法,则可以执行
-
备份 [ mysqldump [
The question is a bit vague. If you need to use both SQL Server and MySql and have a single way of doing the backup from the client side, then you can execute
- BACKUP[^] in SQL Server
- mysqldump[^] in MySql

However, I feel that creating a button for this task may not be the appropriate way. This would mean that the user needs to remember to execute the backup and to place it in a safe location.

Instead typically backups are scheduled either using Windows Scheduler or for example SQL Agent with SQL Server. This way the backup is automatized and nobody would have to remember to take it regularly.


对于MySQL,请在此处查看:
MySqlBackup.NET-适用于C#,VB.NET, ASP.NET [ ^ ]
http://www.dotnetobject.com/Thread-Mysql-backup-using-c [ ^ ]
For MySQL look around here:
MySqlBackup.NET - MySQL Backup Solution for C#, VB.NET, ASP.NET[^]
http://www.dotnetobject.com/Thread-Mysql-backup-using-c[^]


这篇关于使用C#备份数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆