1

I try many ways, but still doesn't work.

  • MSSQLSERVER is running.
  • SQL Agent is running.
  • SQL Browser is running.

  • TCP/IP is enabled (something else inside it must I change?)

  • Named Pipes is enabled

  • Allow remote connections to this server - checked.

I try connect in VS2010 by Test connection with NAME-NOTEBOOK/MSSQLSERVER or ip_sql_server_machine/MSSQLSERVER

Now I get error

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accesible. Verify that the instance name is correct and sql server allow remote connection. (provider: Named Pipes Provider, error 40 - Could not open a connection to SQL Server)

EDIT

When I try to connect by SQL Management Studio get new error:

login failed. the login is from an untrusted domain and cannot be used with windows authentication. Error: 18452

Saint
  • 111
  • 2
  • Have you checked firewall configuration on the SQL server? – Corbin Dec 05 '11 at 09:44
  • How can I check it? –  Dec 05 '11 at 09:48
  • You can try to do a raw telnet and just see if a connection is made. From your comments on marc_s' post though, sounds like it's not a firewall issue. – Corbin Dec 05 '11 at 10:02
  • @Corbin Can you say, how can I do this? –  Dec 05 '11 at 10:17
  • Go into Control Panel and find the firewall stuff. I don't remember exactly what it's called, but should be somewhere in the network settings. You might just be able to type "firewall" in the search box (if Win Serv 08). You'll need to open whatever port MSSQL is using (and you'll likely want to limit the scope to only LAN addresses, or maybe only the LAN address you want accessing it -- the less access the better). – Corbin Dec 05 '11 at 10:18
  • I opened on sql machine 1433, I try now telnet ip_address 1433, and it connect. But when I try to connect in VS still the same error –  Dec 05 '11 at 10:34
  • @Corbin When I try to connect by SQL Management Studio get error: "login failed. the login is from an untrusted domain and cannot be used with windows authentication. Error: 18452". SHould I set up some access on SQL server or...? –  Dec 05 '11 at 11:31
  • Hmmm as an easy fix, you could enable username/password authentication (don't remember what it's called, and don't have access to a MSSQL server at the moment, but it should be the option that's not Windows Auth). Otherwise, you'll either have to try to disable that check, or make sure both boxes are members of the same domain. Or, you could try to login with a user from the domain, or on the box. Example: BoxName\Administrator or DomainName\SomeUser. – Corbin Dec 05 '11 at 22:50
  • Yes, that's right. I did it yesterday and it works fine. SQL Authentication - this you did probably mean – Saint Dec 06 '11 at 07:15

1 Answers1

0

You have to make sure that you have a Windows user account on the server that runs SQL Server, or have a user in the Active Directory domain that the SQL Server runs in.

Then you have to add your user to the SQL Server, right click Security and add your user. Hit search and type in your username.

This will work even if your server is not in a domain, you just have to make sure your local user name and password is the same as on the server.

Good luck.

// Marius

MariusE
  • 1
  • 1