Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing SQL Server Express 2005 - but it already exists on the machine

Tags:

sql

I built an application for a client that requires SQL Server 2005 Express. Everything worked fine on all the machines except for one. On this one they already had an application that uses SQL Server Express, so it was already installed on the machine, but nobody knows which application uses it or any usernames/passwords.

Can I simply install another copy into a different folder? This just doesn't seem right to me, and I know this has to be a common scenario. Can someone point me in the right direction on how I should proceed?

Thanks! Darvis

like image 813
DarLom Avatar asked Dec 30 '22 18:12

DarLom


1 Answers

Yes you can just install into a different directory, as a new "named instance" of SQL Server Express.

To install, follow Step 8 on Microsoft's Install How-To:

On the Instance Name page, select a Default instance or a Named instance for your installation. If you select Default instance, an existing default instance will be upgraded. If you select Named Instance, specify an instance name

So what you need to do is specify the Named Instance and specify your own instance name, and connect to it using the URL format as above.

As the Microsoft How-To mentions, the default installation is a named instance as well, with the name "SQLExpress", which is why if you want to stop or start the service with net start or `net stop' you need to write something like:

net start mssql$sqlexpress

and the hostname part of the connection string for a default SQL named instance is:

.\SQLEXPRESS (or localhost\SQLEXPRESS)
like image 126
glennkentwell Avatar answered Jan 13 '23 17:01

glennkentwell