如何在 C# 中以编程方式备份​​ Sql 数据库 [英] How to backup Sql Database Programmatically in C#

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

问题描述

我想编写一个代码来使用 .Net 4 FrameWork 中的 C# 备份我的 Sql Server 2008 数据库.任何人都可以提供帮助.

I want to write a code to backup my Sql Server 2008 Database using C# in .Net 4 FrameWork. Can anyone help in this.

推荐答案

以下链接 已经解释了如何使用 c# 支持 sql server 2008 数据库的完整细节

The following Link has explained complete details about how to back sql server 2008 database using c#

Sql 数据库备份可以通过多种方式完成.您可以像在其他答案中一样使用 Sql 命令,也可以创建自己的类来备份数据.

Sql Database backup can be done using many way. You can either use Sql Commands like in the other answer or have create your own class to backup data.

但这些是不同的备份模式.

But these are different mode of backup.

  1. 完整的数据库备份
  2. 差异数据库备份
  3. 交易日志备份
  4. 压缩备份

但是这种方法的缺点是需要在客户端系统上安装sql管理工作室.

But the disadvantage with this method is that it needs your sql management studio to be installed on your client system.

这篇关于如何在 C# 中以编程方式备份​​ Sql 数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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