I have two computers.
One machine runs sqlexpress and the instance is named SQLEXPRESS
The other machine run mssqlserver and the instance is MSSQLSERVER.
Why is it that sqlexpress runs on .\sqlexpress while mssqlserver just runs on .\?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityI have two computers.
One machine runs sqlexpress and the instance is named SQLEXPRESS
The other machine run mssqlserver and the instance is MSSQLSERVER.
Why is it that sqlexpress runs on .\sqlexpress while mssqlserver just runs on .\?
"Why is it that sqlexpress runs on .\sqlexpress while mssqlserver just runs on .\?"
Because SQL Server version 7 only supported one instance per server. And when the ability to run multiple instances was introduced in SQL Server 2000 Microsoft has to figure out some way for clients to distinguish between the instances.
And back at that time connecting to SQL Server using protocols other than TCP/IP was still common, especially Named Pipes, so just using different ports wouldn't have worked.
"MSSQLSERVER" is just the default instance name, so is assumed if one is not specified. The instance name means nothing to SQL Server itself so you could have any edition of running as .\SQLEXPRESS if you really wanted to, or an instance of Express edition running under the default instance name.
What you are seeing is just default behaviour - if you use custom installation options you can change it, and in fact may have to if you want to run multiple instances of the same machine because each instance needs a unique name.
Why is it that sqlexpress runs on .\sqlexpress while mssqlserver just runs on .\?
When you would have installed express edition you would have chosen named instance and by default it takes name sqlexpress
hence when installing, named instance is installed. When you connect to named instance it is always like hostname\instance name
. Now for other installation you would have installed default instance for which you just need to provide hostname to connect.