Installing SqlServer 2005 Express using InstallShield and creating a unique named instance - sql-server-2005

I'm using Installshield 2008 express to create an installation package. My application relies on Sql Server 2005 express edition. I know I am able to check the "microsoft sql server 2005 express" prerequisite under the redistributables tab. However, this leaves the installation entirely in the hands of the end user, and if he/she chooses the defaults all the way through, we end up with a installation with the named instance SqlExpress. At the very least, I'd like to have the installation proceed with a MyCompany named instance as the default.
How do I accomplish this?
Do I have to upgrade to a more powerful version of installshield?

If the express addition supports install script you can use the following bit of code. You need to include the Sql Express redist in your install somewhere
LaunchAppAndWait(SRCDIR+"\SQLEXPR32.EXE",
"INSTANCENAME="+ instName +
" SECURITYMODE=SQL " +
"DISABLENETWORKPROTOCOLS=0 SQLAUTOSTART=1 ADDLOCAL=SQL_Data_Files SAPWD=" +
sapass /qb" ,
LAAW_OPTION_WAIT);
In the above code instName is the name of the instance. If you are using Windows Authentication only you can ommit the secuirty and password options.
Check the MSDN docs for other command line options
I sure this could be ported to VB or could even use one of the built in MSI action types

I have not used InstallShield Express. InstallShield Professional allows you to define the command line that is passed to the SQL Server installation. This allows you to define an instance name along with other parameters such as 'quiet' mode.

Related

Run SSIS programmatically, remotely, and without a Windows or Web Service... maybe with Powershell

I'm working on a project where the client Company has one Enterprise SQL Server license and its box is highly exclusive. I need the Enterprise version because the package uses fuzzy lookups.
So I want to trigger the launch of the package remotely from some VB.Net code. I can't use the DTS Runtime library because they require the calling box to be running the Enterprise version too; besides Enterpise is version 2012 while everywhere else is SQL 2008 R2. I can't install either a web service or a Windows Service on the Enterprise machine to call an SSIS package because the client won't let me. I could create a job but I don't know how to trigger it on-demand.
I've read that Powershell is the answer but the script I've written generates an invoke command that runs DTExec which doesn't work as again I don't have the Enterprise version installed locally. Can anybody point me to the solution? I've looked and looked and all I find is variations on what I've already tried and know won't work.
Cheers

How do I make sure SQL Server 2005 Express or later is installed on the target machine? And how do I run an SQL query at the end of an install?

I'm updating a program for my company that requires the user to have SQL Server 2005 Express or later installed on to their computer. We already ship it with a copy of the SQL Server 2008 Express installer, but how do I get the launch conditions to check for any SQL Server of 2005 or later?
The reason I need to be sure that SQL is installed is that I'm trying to automate a process where we had the user create a database and give that database permissions for certain users. I have someone who can help me with creating the automation process, but he has never had to do the installation package for such a process.
I'm guessing that I would need to put a custom action to call the SQL file in the Commit phase of the Installer. Is that correct?
To reiterate my questions: How do I make sure SQL Server 2005 Express or later is installed on the target machine with Visual Studio Installer Deloyment? And how do I run an SQL query at the end of an install?
Thank you for any help you can give me.
You didn't mention what setup authoring tool you are using.
The general approach for checking SQL Server 2005 as a launch condition is this:
create a registry search for this entry:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\ClientSetup\CurrentVersion
use the search property as a custom launch condition
the search property value should be greater than or equal to "9.0" for the condition to be true
For example, if the search property is SQL_SERVER_2005_SEARCH, you can use this launch condition:
SQL_SERVER_2005_SEARCH >= "9.0"
Windows Installer doesn't support SQL scripts, so they are usually executed through custom actions. There is no predefined support for this, so you will most likely need to write the custom action code yourself.
Most commercial setup authoring tools have built-in support for both launch conditions and SQL scripts. Some free tools may also offer something for them.
May these help:
http://msdn.microsoft.com/en-us/library/bb264562(v=sql.90).aspx
http://community.flexerasoftware.com/showthread.php?t=155357

Is it possible to rename a SQL Server 2008 Express installation?

I am attempting to install (and un-install and re-install numerously) SQL Server 2008 Express. I selected install as a default instance but the setup insists that my installation be a named instance localhost\sqlexpress.
Has anyone else had this issue?
You cannot rename it after it is installed. Additionally, if you are using WPI you must install with default options. Are you using WPI or did you get your installer from the Download Center?
From MSDN:
Specifying an Instance Name other than SQLEXPRESS
SQL Server 2008 Express uses the default instance name of “SQLEXPRESS”. Changing the instance name or installing additional instances requires a custom installation. You cannot change instance names once the installation is complete

Unable to find the profiler in SQL Server 2005

I am facing the problem of finding SQL Server Profiler in SQL Server 2005. Is there are any options to enable it or to reinstall it?
Two possibilities.
First, you're running Sql Server Express. That doesn't come with Profiler. In that case, you can use this tool, which is an open source version that is pretty good. I've used it a few times myself (not associated with the project, spamflaggers).
Else, you need to rerun the installer and add Profiler. If it didn't get installed, it has to be installed. That's the general state of things in the software world.
You can select SQL Server Profiler from the Tools menu in SQL Server Management Studio.
The file is located on my computer under:
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\PROFILER90.EXE"
If its not there you may have to select the client tools from the SQL Server installer.
Simply navigate to add/remove programs, and click 'change' on the SQL Server 2005.
I had the same problem and it was because I had installed Management Studio Express before I installed the full version. You can't have more than one instance of Management Studio, therefore, it won't install the full version over the express version. I found that I had to remove the express SSMS and then install the full SSMS:-
Go to Control Panel/Programs and Features (in Windows 7)
At "Select an instance", choose "Remove Shared Features Only"
Choose "Management Tools - Basic"
You can then run the installer again and install the FULL SSMS. Dunno if this was the problem you were having, but hopefully someone finds it useful.

How can I determine if SQL Server Management Studio Express (2005) is installed?

I need a way to determine from Wise Install Script if SQL Server Management Studio Express 2005 is installed on computer. Does someone know a Registry entry or something that will be present when SSMSE is installed?
Most reliable way to detect it would be to use the MSI database to detect the state of SQL Server Management Studio.
There is a COM object you can use to query the MSI database:
http://msdn.microsoft.com/en-us/library/aa369432.aspx
the Installer.Products property can tell you what products/packages are installed. Installer.ProductState can tell you the state of the product/package.
Most installer systems can also do the same checks - either use the API, Orca or similar MSI tool to find the product SQL Mgmt Studio Package/Product ID.
You could try this:
HKEY_LOCAL_MACHINE\Software\MSSQLServer\MSSQLServer\CurrentVersion
Get the value of CurrentVersion key and compare it with the version of SQL Server Management Studio Express 2005.