我试图抓住创建使用SQL Server数据库程序的概念,但我已经习惯了只在我的本地机器上运行它我的、但我、只在、习惯

2023-09-07 10:14:46 作者:我酷所以撩妹

我怎样才能使一个程序中使用SQL Server数据库,并有任何电脑它的安装上该程序的工作。

How can I make a program use a SQL Server database, and have that program work on whatever computer it's installed on.

如果您一直在今天跟随我的字符串的问题,你知道我在做一个开源和免费服务台套件中小型企业。

If you've been following my string of questions today, you'd know that I'm making an open source and free Help Desk suite for small and medium businesses.

客户端应用程序。 客户端应用程序是一个Windows窗体应用程序。在安装和每一个客户机上首次启动时,它会要求主帮助台服务器的地址。

The client application. The client application is a Windows Forms app. On installation and first launch on every client machine, it'll ask for the address of the main Help Desk server.

服务器。 在这里,我计划,以处理所有传入请求帮助,他们展示给IT人员,并为客户端应用程序使用WCF提供服务。

The server. Here I plan to handle all incoming help requests, show them to the IT guys, and provide WCF services for the Client application to consume.

我的困境就在于,我知道如何使程序运行我的本机;但我真的难倒如何使这项工作,为大家谁愿意下载并安装服务器位其Windows服务器上。

My dilemma lies in that, I know how to make the program run on my local machine; but I'm really stumped on how to make this work for everyone who wants to download and install the server bit on their Windows Server.

难道要我做一个SQL脚本,并使其在MS SQL服务器上运行时,用户要安装服务器应用程序?

Would I have to make an SQL Script and have it run on the MS SQL server when a user wants to install the 'server' application?

非常感谢所有为您的宝贵时间和精力来教我。这是真正的真的 AP preciated。 :)

Many thanks to all for your valuable time and effort to teach me. It's really really appreciated. :)

编辑: 为了澄清,每个企业都会有自己的服务器完全由我独立。我将不承担任何访问它们也不会在连接到我的任何方式。 (我不知道为什么我要澄清这一点:P)

To clarify, each business will have their server completely separate from me. I will have no access whatsoever to them nor will they be in any way connected to me. (I don't know why I should clarify this :P )

那么,假设有无绝对没有数据库服务器安装;我该怎么办?

So, assuming the have ABSOLUTELY NO DATABASE SERVER installed; what can I do?

推荐答案

好了,答案的一部分,与SQL Server数据库处理(坦白地说SQL Server的防爆preSS将带你的长办法 - 4GB的数据),并在服务器上安装的元素

Ok, part of the answer, dealing with the SQL Server Database (and frankly SQL Server Express will take you a long way - 4Gb of data) and the server install elements.

首先使安装了SQL的SEP中,使之成为pre-必要可能调整你的安装测试(挑战性的),但基本上以到SQL Server EX preSS链接指向他们,让他们获得它)。

Firstly make installation of the SQL an SEP, make it a pre-requisite possibly tweak your installers to test (challenging) but substantially point them at the links to SQL Server express and let them get on with it).

其次单独的安装程序,如建议,为您的客户端和服务器的元素。

Secondly separate installers, as suggested, for your client and your server elements.

最后,如何建立数据库 - 我建议使用code创建和维护(更新)的模式,即,一旦你要调用DDL,做一台服务器可以运行code的连接什么是必要的(像这里建议:http://stackoverflow.com/questions/1715691/how-to-create-embedded-sql-2008-database-file-if-it-doesnt-exist/1716021#1716021)

Finally, how to build the database - I'd suggest using code to create and maintain (update) the schema i.e. once you have a connection to a server you can run code that calls DDL that does what is necessary (something like suggested here: http://stackoverflow.com/questions/1715691/how-to-create-embedded-sql-2008-database-file-if-it-doesnt-exist/1716021#1716021)

一个问题 - 你从客户打算所有的通信都要经过你WCF服务?

A question - are you intending all communications from the clients to go through you WCF service?