Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL 2005 Express Edition - Install new instance

Looking for a way to programatically, or otherwise, add a new instance of SQL 2005 Express Edition to a system that already has an instance installed. Traditionally, you run Micrsoft's installer like I am in the command line below and it does the trick. Executing the command in my installer is not the issue, it's more a matter of dragging around the 40 MBs of MS-SQL installer that I don't need if they have SQL Express already installed. This is what my installer currently executes:

SQLEXPR32.EXE /qb ADDLOCAL=ALL INSTANCENAME=<instancename> SECURITYMODE=SQL SAPWD=<password> SQLAUTOSTART=1 DISABLENETWORKPROTOCOLS=0

I don't need assistance with launching this command, rather the appropriate way to add a new instance of SQL 2005 Express without actually running the full installer again.

I'd go into great detail about why I want to do this but I'd simply bore everyone. Suffice to say, having this ability to create a new instance without the time it takes to reinstall SQL Express etc. would greatly assist me for the deployment of my application and it's installer. If makes any difference to anyone, I'm using a combination of NSIS and Advanced Installer for this installation project.

like image 952
Douglas Anderson Avatar asked Sep 29 '08 19:09

Douglas Anderson


People also ask

Can I install multiple instances of SQL Express?

The answer to your question is yes. All instances will have their own independent limitations.

How do I download SQL Server 2005 Express Edition?

Download Microsoft SQL Server 2005 Express Edition from the Microsoft Web site http://go.microsoft.com/fwlink/?LinkId=64064 and save it to a location on your computer. Double-click SQLEXPR.exe file to begin the installation. Click I accept the licensing terms and conditions, and then click Next.


1 Answers

It sounds like a user instance might help you. If you have the MDF and LDF files, you can connect to the files by instructing SQL Server Express to launch a user instance and attach the specified file to that instance.

This artile http://msdn.microsoft.com/en-us/library/bb264564.aspx has a good description of how you can lean on the existing SQL Server Express installation to instantiate a user-specific instance for the duration of your connection.

Hope it helps.

like image 52
Bernhard Hofmann Avatar answered Oct 01 '22 07:10

Bernhard Hofmann