部署使用 SQL Server 2008 Express 的应用程序时出现问题

发布于 2024-07-26 08:23:54 字数 422 浏览 3 评论 0原文

我用 Visual C# 为我的大学项目开发​​了一个应用程序,它使用 SQL Server 2008 Express 数据库。 我的应用程序是基于桌面的。 但现在的问题是部署应用程序。 是否需要在客户端计算机上安装 SQL Server 2008(插入我的表和数据),或者我可以只导出 .mdf 文件并且一切正常吗?

有没有办法避免在目标计算机上安装 SQL Server 2008?


抱歉,刚刚找到了重复项: 如果我使用 .mdf 文件部署应用程序,用户是否需要安装 SQL 2008 Express?

I've developed an application for my college project in Visual C# which uses SQL Server 2008 Express database. My application is desktop-based. But the problem now is deploying the application. Is it required that a SQL Server 2008 be installed on the client machine (with my tables and data inserted) or can I just have the .mdf file exported and everything works well?

Is there a way to escape the installation of SQL Server 2008 on the target machine?


Sorry, just found a duplicate: Does user need SQL 2008 Express Installed if I deploy app with .mdf file?

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

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

发布评论

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

评论(1

您可以将 SQL Server Express 与您的应用程序一起部署。 然而,大多数时候这是错误的做法。 SQL Server Express 是服务器级数据库,因此喜欢消耗系统资源。 它还作为服务运行,这意味着即使您的应用程序未处于活动状态,它也会使用这些资源。

相反,您应该选择桌面(或进程内)类引擎,例如 SQL Server Compact Edition、Sqlite 甚至 MS Access。 除了作为桌面程序的全面更好选择之外,这些数据库通常也更容易部署。

You can deploy SQL Server Express with your application. However, most of the time this is just the wrong thing to do. SQL Server Express is a server-class database, and likes to use up system resources as such. It also runs as service, which means it's using those resources even when your application isn't active.

Instead, you should choose a desktop (or in-process) class engine, like SQL Server Compact Edition, Sqlite, or even MS Access. In addition to being an all around better choice for your desktop program, these database will also generally be much easier to deploy.

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