需要 C# SQL Server 2008 中 SMO 的参考代码

发布于 2024-09-28 12:19:39 字数 237 浏览 0 评论 0原文

我用 google 搜索,但找不到正确的简单代码来使用完整备份数据库并恢复备份,使用 C# 使用默认值。

我正在使用 C# Visual Studio 2008 和 SQL Server 2008 R2 评估,但我想 SQL Server 2005 和 C# 也可以工作。

微软网站没有相关代码,它只显示 Microsoft.SqlServer.Management.Smo 命名空间的描述......

I googled but cannot find proper simple code for using backup database full and restore the backup, using defaults by using C#.

I am using C# Visual Studio 2008 and SQL Server 2008 R2 evalution but I guess SQL Server 2005 and C# will work too.

The Microsoft site doesn't have code regarding it, it only show description of Microsoft.SqlServer.Management.Smo Namespace......

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

难得心□动 2024-10-05 12:19:39

MSDN 有一个主题SMO 入门,涵盖了很多内容 -还有一个名为编程特定任务的主题,它展示了如何执行某些常见操作使用 SMO 在 C# 中执行任务。

还有一整套在 SQL Server 2005 中开始使用 SMO,这些内容仍然非常有用这在很大程度上适用于 SQL Server 2008 和 2008 R2 版本。

这是另一篇SQL Server 管理对象 (SMO) 入门文章,可帮助您入门加快速度。

MSDN has a topic Getting Started in SMO that covers a lot of ground - there's also a topic called Programming Specific Tasks which shows how to do certain common tasks in C# with SMO.

And there's a whole series of Getting Started with SMO in SQL Server 2005 which still very much applies to the 2008 and 2008 R2 versions of SQL Server.

Here's another Getting started with SQL Server Management Objects (SMO) article to get you up to speed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文