如何使用2010年C#使用C#在sql 2008中存储数据库备份.我想将sql数据库备份存储在"D"驱动器上. [英] how to store database backup in sql 2008 using C# using 2010 .I will like to need to store sql database backup on the 'D' Drive .

查看:76
本文介绍了如何使用2010年C#使用C#在sql 2008中存储数据库备份.我想将sql数据库备份存储在"D"驱动器上.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生,
我制作了一个应用程序,我想将sql数据库备份存储在"D"驱动器上.
我有搜索代码,但vs2010中不存在名称空间,例如,
使用Microsoft.SqlServer.Management.Common;
使用Microsoft.SqlServer.Management.Smo;
如何解决这个问题.
请给我我问题的正确答案.
谢谢,

Sir,
I made an application in which ,I will like to need to store sql database backup on the ''D'' Drive .
I have search code but namespace is not present in vs2010 like,
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
How to solve this problem .
Please given me the proper answer of my question.
Thanks,

推荐答案

,您需要在项目中引用以下程序集.它们应该已经在您的GAC中了.

Microsoft.SqlServer.ConnectionInfo
Microsoft.SqlServer.Management.Sdk.Sfc
Microsoft.SqlServer.Smo
Microsoft.SqlServer.SmoExtended

您可以在此链接中找到完整的示例

technico.qnownow.com/2012/04 /02/backup-and-restore-sql-server-database-programmatically-in-c
you need to references to following assemblies in your project. They should already be there in your GAC.

Microsoft.SqlServer.ConnectionInfo
Microsoft.SqlServer.Management.Sdk.Sfc
Microsoft.SqlServer.Smo
Microsoft.SqlServer.SmoExtended

You will find the complete example at this link

technico.qnownow.com/2012/04/02/backup-and-restore-sql-server-database-programmatically-in-c


这篇关于如何使用2010年C#使用C#在sql 2008中存储数据库备份.我想将sql数据库备份存储在"D"驱动器上.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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