使用Winforms应用程序部署SQL Server数据库 [英] deploy SQL Server Database with a Winforms app

查看:187
本文介绍了使用Winforms应用程序部署SQL Server数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经创建了一个基于SQL DB的winforms应用程序,我想将其部署在客户端计算机上。该程序是单用户桌面应用程序。

I have created a SQL DB-based winforms application, and I want to deploy it on a client machine. The program is a single user desktop application.

帖子建议在这种情况下使用SQLite或SQL Server Compact Edition更好。但是,我更喜欢使用存储过程,这些产品不支持。

Opinions in this post suggest it's better to use SQLite or SQL Server Compact Edition in such scenarios. However, I prefer to use stored procedures, which are not supported in those products.

我的问题是关于安全性问题:

My question is about security concerns:


  • 如果我使用Access数据库,我可以设置数据库的密码,所以至少没有经验的用户不能直接查看数据库。

  • 如何部署Winforms应用程序来安装SQL Server 2005 Express Edition并为我的.mdf数据库文件设置密码?

  • 哪些安装程序支持此请求? clickonce,windows安装程序,installshield等?

推荐答案

.mdb是。换句话说,您不需要使用密码配置您的.mdf文件,因为SQL Server将处理身份验证和授权的安全性。

The .mdf isn't executing as an .mdb is. In other words, you won't need to configure your .mdf file, with a password, as SQL Server will handle the security for authentication and authorization.

建议在应用程序旁边部署SQL Server Express有太多的潜在问题。可能的情况是, 的存储过程的值,可能不足以保证安装SQL Server Express的麻烦。

Suggest that there are too many potential issues with deploying SQL Server Express alongside your app. It may be the case that the value of stored procs, in this case, may not be enough to warrant the hassle of installing SQL Server Express.

评估这些存储过程中正在进行的工作。它们只是CRUD,或更复杂。

Evaluate the work being done inside those stored procs. Are they CRUD only, or much more complex. What is your reason for stored procs in this single-user app?

请考虑将您的申请重新设计为:

Consider re-architecting your application to:


  • 使用参数化查询。

  • SQL Server Compact Edition

平衡潜在客户支持问题的时间间隔!

Balance the time-to-refactor with the potential customer-support issues!

请考虑

Please consider the blogpost by Steve Lasker (Stored Procedures & SQL Server Compact-The Great Debate). It's got some great insight on assessing whether stored procs are the right tool for the job in regards to client applications.

一些更新:

这听起来像是你试图避免.mdf出你的手。你可以采取一些措施来锁定数据加密的数据,但没有一个100%的解决方案,以避免你的.mdf在别处。当你评论,一旦它在客户的手中,它是你的。 :)

It sounds like you are trying to avoid that .mdf getting out of your hands. You CAN take some measures to lock down the data within - encryption of the data, but there isn't a 100% solution to avoid your .mdf being taken elsewhere. As you comment, once it's in the customer's hands, it's out of yours. :)

这篇关于使用Winforms应用程序部署SQL Server数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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