By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,474 Members | 3,141 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,474 IT Pros & Developers. It's quick & easy.

Deployment Architecture/Attach SQL MDF

P: n/a

I have 2 installers for my VB.NET app, one for the client app (exe, dlls,
config etc.), one for server components (shared data files, sql express db).
I have a few questions relating to the architecture of the deployment:

1. For the server install, I will be providing the mdf/ldf files. These
either need to be attached to an existing SQL 2005 installation (any version)
or SQL Express will need to be installed and the files attached to that. So
how do I best accomplish this? I thought of creating my own
bootstrapper-style app that asks what the user wants to do / have also been
reading a lot on bootstrapper SDK, however am a bit confused now!
Additionally, if SQL Express is to be installed, I will need to allow
remote connections, so will need to specify the options detailed on this page.
2. For the client install, I need to be able to modify the application's
config file to set the appropriate sql connection string. As far as I can
tell the best way to do this is via a custom action which launches an exe to
prompt for this information. Is this correct?
3. In many cases, the client install will be run remotely, via Microsoft
SMS or similar. How can I specify the info in (2) in this case?

I am using Installshield Express 12 to create my MSIs but it looks like I
need a Bootstrapper or something similar to link everything together.

thanks in advance for your replies - I hope this was the right place to post
these questions!

Apr 25 '07 #1
Share this Question
Share on Google+
3 Replies

P: n/a
Hi Richard,

For the setup requirement you mentioned, I think most of them may need to
be done through custom action of windows installer package. Also, as you
mentioned that you're using installsheild, would you consider using windows
setup project(provided in visual studio) or use platform sdk to build the
MSI package? Here are some of my understanding and suggestion for the
three questions you mentioned:

1. SQL 2005 provide the SMO(.net based) programming interface for you to
manage SQL Server instance in code(like what management studio does). Here
are some examples:

Backup and Restore with User Instances

you can use such code in your custom action program or class. Also, SQL
2005 expression edition provide a "User instance" feature which allow you
to connect a database file(mdf) without attaching it to the server
instance. See the following BOL for detail on "user instance"

#SQL Server 2005 Express Edition User Instances

#User Instances for Non-Administrators

For enable remote connection, I'm afraid you may need to configure it
after SQL Server has been installed since the setup options(commandline
prompt options) only contains setting for enable/disable network protocols:

#How to: Install SQL Server 2005 from the Command Prompt

The following MSDN blog entry has mentioned some MSDN blog articles
introducing on using WMI to manage SQL Express:

#How to allow remote connections to SQL Server 2005 Express database

2. Yes, you're right. This is a typical scenario of using custom action and
here is a MSDN walkthrough example demonstrate on this:

3. I'm not very familar with the SMS configuration settings, however, for
SQL Server installation, it has provide many command line
options/parameters you can configure.

#How to: Install SQL Server 2005 from the Command Prompt

Also, if you're using the VS 2005's built-in bootstrapper package(under the
following location):

C:\Program Files\Microsoft Visual Studio

You can customize it to change its commandline syntax. Here is a good
article introducing developing custom bootstrapper package that can be used
in VS 2005 setup project.

#Authoring a Custom Bootstrapper Package for Visual Studio 2005

Hope this helps.


Steven Cheng

Microsoft MSDN Online Support Lead


Get notification to my posts through email? Please refer to

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at


This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 25 '07 #2

P: n/a
Hi Steven

Thanks for your suggestions.

I'm afraid I can't use User Instances as:
a) My end-users may use any version of SQL Server 2005, not necessarily
b) User Instances don't allow remote connections (I assume that's right??!)

I'm currently looking at other ways to deploy my app with minimum
development effort. I might post back on here again if I have any further
Apr 30 '07 #3

P: n/a
Thanks for your reply Richard,

Sure. Please feel free to post here if you need any further help on this.


Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Apr 30 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.