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
Hi

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!

Richard
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
http://blogs.msdn.com/sqlexpress/rss_tag_Samples.xml

http://www.codeproject.com/useritems/SMODemo.asp

http://www.sqlteam.com/item.asp?ItemID=23185

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
http://msdn2.microsoft.com/en-us/library/bb264564.aspx

#User Instances for Non-Administrators
http://msdn2.microsoft.com/en-us/library/ms143684.aspx

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
http://msdn2.microsoft.com/en-us/lib...networkprotoco
ls

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
http://forums.microsoft.com/msdn/sho...iteid=1&sb=0&d
=1&at=7&ft=11&tf=0&pageid=1

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

http://msdn2.microsoft.com/en-us/lib...63(VS.80).aspx

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
http://msdn2.microsoft.com/en-us/lib...networkprotoco
ls

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

C:\Program Files\Microsoft Visual Studio
8\SDK\v2.0\BootStrapper\Packages\SqlExpress

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
http://msdn2.microsoft.com/en-us/lib...39(VS.80).aspx

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

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
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

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
Express
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
questions.
Richard
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.

Sincerely,

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.