Cannot connect to server in SQL Server Management Studio 2008

When I open the management studio and try to connect using [PCNAME] / SQLEXPRESS, it shows this error:

"Unable to connect to [PCNAME] \ SQLEXPRESS"


ADDITIONAL INFORMATION:

Error message:

An error occurred with the network or a specific instance while establishing a connection to SQL Server. The server was not found or was not available. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (Supplier: SQL Network Interfaces, Error: 26 - Server / Instance Localization Error Specified) (Microsoft SQL Server, Error: -1)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=-1&LinkId=20476 "

I also tried "localhost", "local" and ".". in place for [PCNAME] but to no avail.

+7
source share
2 answers

Verify that the SQL Server service (SQL Express) is running.

at the command line prompt:

Get-Service -Name 'MSSQL$SQLEXPRESS' 

the property "status" of the service should be indicated as "Execution"

If this is not the case, enter (you should be in the mode of elevated prompts, i.e., "Run as administrator"):

Start-Service -Name 'MSSQL $ SQLEXPRESS'

OR

click start> type cmd and type

 sc query MSSQL$SQLEXPRESS 

The status should be indicated as "Launch"

If this is not the case, enter (you should be in the mode of elevated prompts, i.e., "Run as administrator"):

 sc start MSSQL$SQLEXPRESS 

If you receive an error message that the service could not be found: Open SQL Server Configuration Manager and make sure that you have SQL Server installed: enter image description here

+11
source

open sqlserver configuration manager, enable your tcpip both sqlserver and express, as well as under the client protocol and try to disable your firewall, this will allow a remote connection

+1
source

All Articles