Page 1 of 1
Check for certain instance of SQL Server 2008 Express R2
Posted: Sat Aug 28, 2010 9:14 pm
by Balanced-Plus
Hi,
My installer will check by default if SQL Server is installed. But I want to check for a certain instance of SQL Server 2008 Express R2.
If that instance is not installed then it should install the instance anyway (even when an other instance of SQL Server is available).
How can this be done? I prefer a code sample of some kind, maybe only a few lines need to be added to the current checks???
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 7:57 pm
by mills
You should have already included SQL Server 2008 Express R2 runtimes. In the runtimes view, highlight SQL Server 2008 Express R2. Click on the Options button below the list. You can specify the instance in the Service Name field. In the second prompt, you can edit the To Value to specify the instance:
/q /ACTION=Install /SECURITYMODE=SQL /SAPWD="Sq1S#rv$r" /INSTANCENAME="SQLEXPRESS" /FEATURES=SQLEngine,Replication,SDK /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /SQLSYSADMINACCOUNTS="$SQL_COMPUTER_NAME$\$SQL_USER_NAME$" /IAcceptSQLServerLicenseTerms=TRUE
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 8:23 pm
by Balanced-Plus
But will this be sufficiƫnt if there is already a defult instance of SQL Server 2008 Express R2 on the system.
I want to make sure my own instance will be installed (even if there is another on the system).
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 9:30 pm
by mills
Yes, as long as your instance name differs from the default or any other preexisting instance, yours will install.
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 10:24 pm
by Balanced-Plus
One more:
I set the instancename in the command parameter in the second dialog (like in your example).
But on the first dialog "check service", you can also set some value like: MSSQL$SQLEXPRESS
Do I need to set both or will the one in the commandline parameter be sufficient?
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 10:29 pm
by mills
You should set both.
Re: Check for certain instance of SQL Server 2008 Express R2
Posted: Mon Aug 30, 2010 11:03 pm
by Balanced-Plus
Thank you very much.