Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the connection string for a SQL Server 2012 default instance?

I have recently installed Windows 8 and VS 2012, now I want to connect to the SQL Server 2012 default instance, but I can't figure out what the connection string is to it.

I have tried:

.\sqlexpress
.\sqlexpress,1433

and the same connections with pcname instead of .

like image 400
taffarel Avatar asked Jun 18 '26 06:06

taffarel


1 Answers

First are you using SSMS ? Or you are trying to connect using VS 2012 ? Second are you connecting to default instance of Express edition or non-express edition ? (if you are using Express edition please modify your question header and question itself to reflect that) Express edition have default name SQLEXPRESS and non-express edition has default name MSSQLServer

If you need to know instance of SQL Server that you are trying to connect, it can be found by looking at SQL Server Configuration Manager (SSCM). Also make sure that SQL Server service is running.

If instance name is correct, then I would look at SQL Native Client Configuration -> Client Protocol in SSCM and check if TCP/IP is enabled or not.

If that is enabled then I would check if firewall is blocking the connection or not.

As a side note, if you are using default port then you don't have to explicitly define port when trying to make connection.

like image 116
JackLock Avatar answered Jun 20 '26 22:06

JackLock