开发者

SQL Server named instance

开发者 https://www.devze.com 2023-01-16 07:03 出处:网络
Is it possible to mimic the way SQL Server installation works? With SQL Server you could have multiple \"named instances\" installed on the same machine. I believe it is one single executable but they

Is it possible to mimic the way SQL Server installation works? With SQL Server you could have multiple "named instances" installed on the same machine. I believe it is one single executable but they do something in the registry to make it multiple instance. Anyone knows how SQL Server achieves this?

We have a window service develop with .net c# and would like to do the same. Having multiple instance running on the same 开发者_StackOverflow中文版machine...

It's a WCF service.

What I'd like to achieve is the user can run the MSI multiple times, and every time the user must provide an instance name. the instance name is the name that will appear in the services.msc So running the msi multiple time will end up have multiple instances in the services.msc

Can this be done with only one exe? Or I have to install each instance in different directory .. ?


If you want many instances of the program you can always launch it many times (e.g. with different parameters). If you need all the instances to be different windows services, I recommend you this approach.

Please clarify what kind of service does your apps provides, because if e.g. you are hosting some kind of web service, you may have issues with all the instances trying to open the same TCP Port.


Yes of course this is possible with the same exe even. You simply need to create several services by different names in your installer.

There are other ways to do this too but you can p/invoke CreateService


Yes, Windows Installer supports the concept of "multiple instance installs". You can read about how it works in InstallShield 2009(+) at:

Multiple Instance Installs

0

精彩评论

暂无评论...
验证码 换一张
取 消