SQL Server 2008 SP1 Pre-req Install Issues

Got a problem you cannot solve? Try here.
Post Reply
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

SQL Server 2008 SP1 Pre-req Install Issues

Post by JohnGalt »

I have two issues with the way these pre-reqs work right now:

1. IF there is already the same instance on the machine it doesn't upgrade, it simply skips it. It should upgrade. The MS script for the same for the horrible Vs.net installer stuff works correctly with this.

2. It throws errors about requiring x64 when on a 32 bit machine. It should install the 32bit version if the machine is 32 bit and install the x64 bit version if on a 64 bit machine. IT should do this transparently.

#2 should be true for ALL pre-reqs. You shouldn't have to add both, it should automatically add both, and it should install one or the other and handle errors appropriately. The way it currently does it doesn't allow you to create a .NET application that will run in x64 if available but runs fine in x86 and have the pre-reqs install properly in all cases.
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Why not just use the IF statement...

Post by CFConner »

John, there are TWO ways that you can handle this. I personally do not have an issue with this as you do. In your main setup script, where you define your include scripts for checking and installing the pre-reqs, add the if statement to determine if the OS is 64 bit or not. If it is 64 bit, include the 64 bit scripts, otherwise include the 32 bit scripts. Some scripts, such as the MSXML 4.0 SP2 will install whether it is 32 or 64 bit - so I have a common script include just before I have the IF block.

The second option, is of course, to modify the check script - but I wouldn't bother - this way if they have improvements to the runtimes my code will continue to work.

Cheers!

=-Chris
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

Handling x64 is relatively easy as you suggest, but should be done automatically by InstallAware. I shouldn't have to go and fix this every time I add a new pre-req etc.

The bigger issue is that it doesn't handle upgrades of SQL Server properly. It should handle this scenario, see if the instance is installed and instead do an upgrade instead of an install. (according to version # of course)
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

SQL Server upgrade...

Post by CFConner »

I'm not sure how you are calling the setup.exe for the upgrade, but from Microsoft's own KB (FYI, I'm a SQL DBA):

Setup.exe /q /ACTION=upgrade /INSTANCENAME=MSSQLSERVER /RSUPGRADEDATABASEACCOUNT="<Provide>" /RSUPGRADEPASSWORD="<Provide>" /ISSVCAccount="NT Authority\\Network Service"

(If you are upgrading from SQL 2000 or SQL 2005.

Source URL: http://msdn.microsoft.com/en-us/library ... px#Upgrade
=-Chris
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

I understand that's how you do it. The installer should automatically do this and Installaware should handle this properly. It should also give descriptive messages for versions that can't be upgraded to express etc. for better debugging (SQL Server's error messages are useless). I know that the later is really MS's problem, but it would be nice to have this solved.

SQL Server is NOT a normal pre-req. There are lots of cases (smart clients) where you may not want it installed, and it should ALWAYS be uninstalled with your application.

I wish it was possible to get it to chain install. So I could choose a setup option and get it to install it like in the days of the merge modules (or chained msi install which will bork your computer if you try it). Then the uninstaller could remove it, and then uninstall everything including database files....
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

Oh man...

Post by CFConner »

Those were definitely the days!

But back to your issue - Are you talking about SQL Express?

Why not use a purple command to do it?

When you uninstall, it rips it off?

Anyways, there is an undocumented LOGFILE switch for SQL Server installs... do you want it? :)

=-Chris
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

Log file switch would be nice :) Please!

You can't nest installs for sql server without it killing your computer and refusing to uninstall or do a windows installer uninstall from another windows installer uninstall as far as I know.

Any suggestions on how to do this so that I can deterministically install SQL Server 2008 without having to have it as a pre-req would be massively helpful!
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

LOGNAME switch

Post by CFConner »

See this article - Mind you I haven't tried this in 2008 yet - I'll have to wait until tomorrow to do it.

http://www.devx.com/dbzone/Article/31648

In IA 9, you have an optoin to run a setup.exe - you could do that instead of using the plug-in. (I know you know that, but I'm just saying... :) )

=-Chris
CFConner
Posts: 85
Joined: Wed Jan 21, 2009 4:14 pm
Location: Syracuse, NY

By the way...

Post by CFConner »

I have a need to install SQL 2008 myself deterministicly, and from looking at the SQL Express mia code - this should be easy for us. Give me a few days, I'll get back to you.
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

Thanks!
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

any ideas on how to get this to be deterministic and automatically uninstall when your app is uninstalled?
ekoindri
Posts: 14
Joined: Mon Jan 25, 2010 9:31 pm
Contact:

Post by ekoindri »

Do you mean to uninstall MS SQL after you uninstall your app ?

regards,


//ekoindri
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

Since SQL Server is not a real pre-req and there are lots of cases where you sometimes want it installed and sometimes don't based on choices the user makes, I need to install it deterministically and if it was installed, uninstall it before uninstalling the software (so that the database can be removed)

Thanks!
JohnGalt
Posts: 58
Joined: Mon Sep 08, 2008 2:14 pm

Post by JohnGalt »

*bump*
Post Reply