How to choose which instance of SQL Server I am using

  • I'm having a hard time figuring this out, and it's a very basic question, so maybe I'm just having a hard time understanding the basics of this concept. Any help would be greatly appreciated!

    I previously had SQL Server Express 2008 set up on my home computer (windows 7), and I've been using that for a while.

    I wanted to start working through a book on BI, so I installed the evaluation version of SQL Server Enterprise Edition 2008. It wouldn't let me upgrade Express (it was getting an error) so i instead chose to install a second instance of SQL Server (called MSSQLSERVER) on the machine.

    My basic question is, how do I control which instance I am using? As I go through my exercises with this BI book, do I need to make sure I am using the Enterprise version and not the Express? If so, how do i do that?

    In my programs menu, I only see one version of SQL Server 2008. When i open it, I am still able to connect using SSMS and see all the databases I saw before. It connects to this server:

    localhost\sqlexpress

    I know that both instances are installed on my machine, because if I go to Run > services.msc

    I see services for both instances, one called SQLEXPRESS and the other called MSSQLSERVER

    Using SSMS, I have tried to connect to

    localhost\sqlexpress\mssqlserver

    and

    localhost\mssqlserver

    however, neither of these will connect. How do I connect to this second instance?

    Thanks very much.

  • Well, I guess I answered my own question, though I'm still confused as to why it looks the way it does.

    If I connect SSMS to (local), it appears to be connecting to the newest instance. The new instance so far has no databases attached, and also has a ReportServer object in object explorer, so I assume that this is the new Enterprise Edition instance.

    So to connect to the new instance i choose (local), and to connect to the old instance I choose localhost\sqlexpress

    That is the opposite of what I would have thought, given that various things I'd read said that my new instance would be "named" and the old instance would be the general one for the server.

    Anyway, I'm up and running, though a little confused as to why it works the way it does. So if anybody has any explanatory insights to offer, that'd be great. Otherwise, I guess I'm good, thanks...

  • ben111 (4/6/2013)


    So to connect to the new instance i choose (local), and to connect to the old instance I choose localhost\sqlexpress

    Correct.

    It's actually <machine name> and <machine name>\<instance name> for the two. For example, my laptop is named Excalibur and it has 2 instances on it, the default which is SQL 2008 and a named instance called SQL11 that's SQL 2012. To connect to the SQL 2008 instance I choose or type Excalibur and to connect to the 2012 one I choose or type Excalibur\SQL11

    That is the opposite of what I would have thought, given that various things I'd read said that my new instance would be "named" and the old instance would be the general one for the server.

    That would be the case if you had installed the first instance as the default instance (without a name) and the second as a named instance (specifying an instance name during installation). Express however always installs by default as a named instance, so accepting the defaults in the installation got you a named instance as the first one and a default instance (no instance name) as the second

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Aha.. it's all coming together now. Thank you very much for your explanation. 🙂

  • ben111 (4/6/2013)


    I'm having a hard time figuring this out, and it's a very basic question, so maybe I'm just having a hard time understanding the basics of this concept. Any help would be greatly appreciated!

    I previously had SQL Server Express 2008 set up on my home computer (windows 7), and I've been using that for a while.

    I wanted to start working through a book on BI, so I installed the evaluation version of SQL Server Enterprise Edition 2008. It wouldn't let me upgrade Express (it was getting an error) so i instead chose to install a second instance of SQL Server (called MSSQLSERVER) on the machine.

    My basic question is, how do I control which instance I am using? As I go through my exercises with this BI book, do I need to make sure I am using the Enterprise version and not the Express? If so, how do i do that?

    In my programs menu, I only see one version of SQL Server 2008. When i open it, I am still able to connect using SSMS and see all the databases I saw before. It connects to this server:

    localhost\sqlexpress

    I know that both instances are installed on my machine, because if I go to Run > services.msc

    I see services for both instances, one called SQLEXPRESS and the other called MSSQLSERVER

    Using SSMS, I have tried to connect to

    localhost\sqlexpress\mssqlserver

    and

    localhost\mssqlserver

    however, neither of these will connect. How do I connect to this second instance?

    Thanks very much.

    Firstly, you don't "control" which instance you are working with. You simply connect to the instance you want to work with. That can easily be done through the SSMS.

    The next question is: Have you uninstalled SQLEXPRESS? What you are seeing are entries generated by (but not deleted) osql -l as you browse the LAN looking for SQL Servers. The instances you have displayed are default instances and are not necessarily positively refreshed when you browse the network. In order to connect to a default instance, you only have to provide the machine name and not the instance name. Perhaps that is the mistake you are making here.

    As for the BI stuff: Use the Enterprise version. As with any course it will assume you are working with the highest level of database software (in this case, Enterprise) and will present the material appropriately.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply