SMO 通过备份安装数据库

发布于 2024-09-24 15:37:32 字数 175 浏览 0 评论 0原文

我正在工作的项目使用 SMO 来恢复所需的数据库,作为应用程序安装程序的一部分。问题是,在一台从未安装过该应用程序的机器上。

从事件日志来看,数据库似乎无法恢复,因为实例中不存在该数据库。 (由于全新安装)

我可以使用 SMO 将数据库恢复到数据库尚不存在的实例吗?是否有以这种方式安装数据库的最佳实践?

The project I'm working uses SMO to restore the needed databases as part of the application installer. The problem is, on a machine that has never had the application installed.

From the event logs, it seems like the database can't be restored because it doesn't exist in the instance. (Due to the fresh install)

Can I use SMO to restore the database to an instance where it doesn't already exist? Is there a best practice for installing databases this way?

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

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

发布评论

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

评论(1

掩饰不了的爱 2024-10-01 15:37:32

您是否考虑过,假设您已经拥有 .mdf/.ldfs 和相关路径,则可以在新安装时使用 smo 附加数据库?

Have you thought about maybe just using smo to attach the database on new installation, assuming you already have the .mdf/.ldfs and related paths?

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