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's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Even though I have direct access to the physical database machine, I have to specify dbmachine\sql in the connection field, rather than just the instance name. Why is that?

share|improve this question

Quite simply, client tools need to know explicitly which machine you're trying to connect to. This is like trying to access http://localhost/test_site by typing test_site into your browser.

For SQL Server you can indicate the local machine in a variety of ways:

  • machine_name\instance
  • (local)\instance
  • 127.0.0.1\instance
  • .\instance
share|improve this answer

This is possibly because you have named instance installed instead or apart from Default instance.

So the default instance looks like SERVERNAME

While the named instance in you're case is SERVERNAME\SQL2012

From MS-LINK

Client applications connect to an instance of Microsoft SQL Server 2005 to work with a SQL Server database. Each SQL Server instance is made up of a distinct set of services that can have unique settings. The directory structure, registry structure, and service name all reflect the specific instance name you identify during setup.

An instance is either the default, unnamed instance, or it is a named instance. When SQL Server 2005 is in installed in the default instance, it does not require a client to specify the name of the instance to make a connection. The client only has to know the server name.

A named instance is identified by the network name of the computer plus the instance name that you specify during installation. The client must specify both the server name and the instance name when connecting.

By default, SQL Server installs in the default instance unless you specify an instance name. SQL Server Express, however, always installs in a named instance unless you force a default installation during setup.

Just to add in case you want to understand more of difference between two :

What's the difference between installing a "Default Instance" vs a "Named Instance"?

share|improve this answer
    
,If OP make mention dbmachine\sqlinstance , I am be sure he will get error. As per name instance naming convention. – Md Haidar Ali Khan Feb 16 at 12:09
    
@MdHaidarAliKhan, that may be correct as per naming standards, but i believe OP's concern here seems not that he is getting error, it seems more when he is on the same machine why cant he access the instance with that server name. However i will rename instances in example just to clarify what i meant was for OP's example. – KASQLDBA Feb 16 at 12:16

@noxetrox, I would like to say that if you will mention dbmachine\sql instance.

Definitely you shall get error as per MSDN BOL naming convention rule Here

Embedded spaces of other special characters are not allowed in instance names, nor are the backslash (), comma (,), colon (:), semi-colon (;), single quotation mark ('), ampersand (&), number sign (#), or at sign (@).

As your question like Why do we need this instance access?

Because an instance of the Database Engine is a copy of the sqlservr.exe executable that runs as an operating system service. Each instance manages several system databases and one or more user databases

For ref Here and Using Named Instances

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.