Edwards
Edwards

Reputation: 105

How to use Microsoft SQL Server locally?

I'm new to using SQL Server, and I have been using it at my university by connecting to the university's network. I want to be able to use SQL Server locally and have installed it on my computer.

When I am faced with the "Connect to Server" box I'm not sure what to do. I'm not sure what I should have as my server name etc. I think I have two instances installed on my computer already but I just don't know how to connect.

Even if it requires starting from scratch, creating a new instance, whatever, I would really appreciate it if someone could guide me through the steps so that I can get practising on SQL Server. I've spent hours trying to sort this out and I'm just not sure what to do. Thanks :)

Upvotes: 1

Views: 4763

Answers (3)

marc_s
marc_s

Reputation: 755531

You need to go to Start > All Programs > Microsoft SQL Server xxx > Configuration Tools > SQL Server xxxx Configuration Manager (replace xxxx with your SQL Server version number).

You should see a screen something like this:

enter image description here

Look for the SQL Server services - I have two on my machine here.

The name in the brackets after the SQL Server tells you the instance name:

  • if it's MSSQLSERVER (like my second line there) - it's the default, unnamed instance - you connect to it using ., (local), or machine-name as your server / instance name

  • if it's something else, that is your instance name - you connect to it using .\instance-name, (local)\instance-name, or machine-name\instance-name as your server / instance name

So in my case, to connect to the first instance, I'd use

.\SQLEXPRESS  
(local)\SQLEXPRESS
MyPC\SQLEXPRESS

as server/instance name, while the second instance can be reached by using

.
(local)
MyPC

and that's all there really is to this!

Upvotes: 1

Andy
Andy

Reputation: 8562

It depends on if you installed a named instance or not. If you haven't . or your machine name will work. If you have setup a named instance, .\<instance_name> should work.

In your comment you said the instance name is SQLEXPRESS, so .\SQLEXPRESS should work for you.

Upvotes: 0

Colin Mackay
Colin Mackay

Reputation: 19185

If you have SQL Server set up to take requests over the network (even although it is only your own machine) you can use localhost, or the name of your machine. If not then you can use a dot .

If you have named the instance you'd use the format

.\name

or

localhost\name

Upvotes: 0

Related Questions