1

I want to access my database over network. It gives error:

Error: Cannot Connect to 192.168.0.2\SQLEXPRESS

I enabled the TCP/IP from SQL Configuration.

I turn off the firewall.

I allow SQL Server Authentication and Windows mode.

and I can ping to the ip-address.

Why I am not able to connect to database?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Farhad paikan
  • 89
  • 2
  • 10

3 Answers3

1

Try to connect by specifying 192.168.0.2,1433 , here 1433 is port.

Manish Kumar
  • 509
  • 5
  • 15
1

Probably is a server configuration problem. Try as follow.

On the server, open SQL Server Configuration Manager

Open SQL Server Network Configuration on the left panel and select Protocols for YOURSERVERNAME.

On the right panel double click on TCP/IP and be sure that Enabled is set to Yes.

Open the tab IP Addresses and set as Yes the Active and Enabled selection boxes where the IP Address is 192.168.0.2.

Lucbert
  • 74
  • 4
0

You're probably using a wrong instance name. If you want to connect to a default one i.e. MSSQLSERVER use either dot (.) or a machine name or an IP address as a sever name.

If you are not sure what is the name of your instance just run SQL Server Configuration Manager. You can find it in Start menu. Then select SQL Server Services and there you should find something like SQL Server (NAME_OF_YOUR_INSTANCE).

It is also worth reading this article and this question.

Community
  • 1
  • 1
Michał Komorowski
  • 6,198
  • 1
  • 20
  • 24