Cannot connect to remote SQL server - sql

A client of mine gave me a server name which is fully qualified [servername].somedomain.net
to try to connect to their SQL Server instance over VPN.
So I tried, using the username and password they gave me. No luck. I can ping it but cannot connect, I get the error that the username and password is incorrect.
So I log onto the actual server, verify that my login is in security and has rights and it appears there. Workgroup\mylogin and it appears that workgroup\ actually is the same as somedomain.net\mylogin. Because when I try to add somedomain.net\mylogin, it resorts to saying that it's already added which is workgroup\mylogin.
Not sure what else to check here. I gave myself sysadmin role in SQL Server. I can ping the server's IP.
I looked at how they are authenticating me and they have my user in SQL Server set up to use Windows Auth. Well, the error I get is that it cannot trust cross domain when trying to use windows auth when I try to connect locally here in my management studio. I'm connected tot their VPN so what could be the problem?
They're not available right now to try to troubleshoot it and I'm just curious what else I might try to try and resolve this on my own if I can.

Basically, when you failed to connect to your SQL Server, the issue could be:
Network issue,
SQL Server configuration issue.
Firewall issue
Client driver issue
Application configuration issue.
Authentication and logon issue.
Step 1: Network issue
You might be able to make local connection without a working network, but that's a special case. For remote connection, a stable network is required. The first thing to trouble shoot SQL connectivity issues is to make sure the network we rely on is workable and stable. Please run the following commands:
ping -a (use -4 and -6 for IPv4 and IPv6 specifically)
ping -a
nslookup (type your local and remote machine name and IP address multiple times)
Be careful to see any mismatch on the returned results. If you are not able to ping your target machine, it has high chance that either the network is broken or the target machine is not running. It's possible the target machine is behind a firewall and the firewall blocks the packets sent by ping, though. Windows firewall does not block ping (ECHO) packet by default. The correctness of DNS configuration on the network is vital to SQL connection. Wrong DNS entry could cause of all sorts of connectivity issue later. See this link for example, "Cannot Generate SSPI Context" error message, Poisoned DNS.
Step 2: SQL Server configuration issue
You need to make sure the target SQL Server is running and is listening on appropriate protocols. You can use SQL Server Configuration Manager (SCM) to enable protocols on the server machine. SQL Server supports Shared Memory, Named Pipes, and TCP protocols (and VIA which needs special hardware and is rarely used). For remote connection, NP and/or TCP protocols must be enabled. Once you enabled protocols in SCM, please make sure restart the SQL Server.
You can open errorlog file to see if the server is successfully listening on any of the protocol. The location of errorlog file is usually under:
%ProgramFile%Microsoft SQL Server/MSSQLxx.xxx/MSSQL/Log
If the target SQL instance is a named instance, you also need to make sure SQL Browser is running on the target machine. If you are not able to access the remote SQL Server, please ask your admin to make sure all these happen.
Step 3: Firewall issue
A firewall on the SQL Server machine (or anywhere between client and server) could block SQL connection request. An easy way to isolate if this is a firewall issue is to turn off firewall for a short time if you can. Long term solution is to put exception for SQL Server and SQL Browser.
For NP protocol, please make sure file sharing is in firewall exception list. Both file sharing and NP use SMB protocol underneath.
For TCP protocol, you need put the TCP port on which the SQL Server listens on into exception.
For SQL Browser, please put UDP port 1434 into exception.
Meanwhile, you can put sqlservr.exe and sqlbrowser.exe into exception as well, but this is not recommended. IPSec between machines that we are not trusted could also block some packets. Note that firewall should never be an issue for local connections.
Step 4: Client driver issue
At this stage, you can test your connection using some tools. The tests need to be done on client machine for sure.
First try:
telnet
You should be able to telnet to the SQL server TCP port if TCP is enabled. Otherwise, go back to check steps 1-3. Then, use OSQL, SQLCMD, and SQL Management Studio to test sql connections. If you don't have those tools, please download SQL Express from Microsoft and you can get those tools for free.
OSQL (the one shipped with SQL Server 2000) uses MDAC.
OSQL (the one shipped with SQL Server 2005 & 2008) uses SNAC ODBC.
SQLCMD (shipped with SQL Server 2005 & 2008) uses SNAC OLEDB.
SQL Management Studio (shipped with SQL Server 2005 & 2008) uses SQLClient.
Possilbe command use be:
osql -E -SYour_target_machine\Your_instance for Windows Auth
osql -Uyour_user -SYour_target_machine\Your_instance for SQL Auth
SQLCMD also applies here. In addition, you can use “-Stcp:Your_target_machine, Tcp_port” for TCP, “-Snp:Your_target_machine\Your_instance” for NP, and “-Slpc:Your_target_machine\Your_instance” for Shared Memory. You would know if it fails for all protocols or just some specific procotols.
At this stage, you should not see general error message such as error 26 and error 40 anymore. If you are using NP and you still see error 40 (Named Pipes Provider: Could not open a connection to SQL Server), please try the following steps:
a) Open a file share on your server machine.
b) Run “net view \your_target_machine” and “net use \your_target_machine\your_share” (You can try Map Network Drive from Windows Explorer as well)
If you get failure in b), it's very likely you have OS/Network configuration issue, which is not SQL Server specific. Please search on internet to resolve this issue first.
You can try connection using both Windows Authentication and SQL Authentication. If the tests with all tools failed, there is a good chance that steps 1-3 were not set correctly, unless the failure is logon-related then you can look at step 6.
If you succeeds with some of the tools, but fails with other tools, it's probably a driver issue. You can post a question on our forum and give us the details.
You can also use “\windows\system32\odbcad32.exe” (which ships with Windows) to test connection by adding new DSN for various drivers, but that's for ODBC only.
Step 5: Application issue
If you succeed with steps 1-4 but still see failure in your application, it's likely a configuration issue in your application. Think about couple of possible issues here.
a) Is your application running under the same account with the account you did tests in step 4? If not, you might want to try testing in step 4 under that account or change to a workable service account for your application if possible.
b) Which SQL driver does your app use?
c) What's your connection string? Is the connection string compatible to your driver? Please check http://www.connectionstrings.com/ for reference.
Step 6: Authentication and logon issue
This is probably the most difficult part for sql connectivity issues. It's often related to the configuration on your network, your OS and your SQL Server database. There is no simple solution for this, and we have to solve it case by case. There are already several blogs in sql_protocols talking about some special cases and you can check them see if any of them applies to your case. Apart from that, things to keep in mind:
a) If you use SQL auth, mixed authentication must be enabled. Check this page for reference http://msdn.microsoft.com/en-us/library/ms188670.aspx
b) Make sure your login account has access permission on the database you used during login ("Initial Catalog" in OLEDB).
c) Check the eventlog on your system see if there is more information
Reference: http://blogs.msdn.com/b/sql_protocols/archive/2008/04/30/steps-to-troubleshoot-connectivity-issues.aspx
Sorry for this wall of text, i hope that something from here can help you solve your issue!
Regards.

If you want to access that server you are going to need a domain account from that domain or use SQL authentication. I would recommend just using SQL authentication - it's a lot more straight forward - if they allow it.

I had the same problem, other machines could connect to sql server but one computer was not connecting and displaying the error "a network related or instance specific error...", the problem was solved when I changed the network protocol in the login window of SSMS, in advanced options from TCP/IP to Named Pipes. Please see the below screenshots.
Please note that you should be on the same domain, and your credentials should be valid on the server.

Related

Can't connect to Azure sql server or even ping

I can't connect to my Azure SQL Database that I have hosted on MS Azure.I have tried with Visual Studio and MSSM with no luck.
I can't seem to work out how I could possibly be going wrong. I allowed access to the server on all IPs.
I am using the correct login info.
I dont seem to be even able to ping the server, despite it showing no issues in the Azure interface.
The server is located at: kkbpeyaf0t.database.windows.net
I tried to connect to the URL you provided using SSMS and it gave me a login failed (which I expected), so that tells me that the database is running and that you did indeed open up the IP ranges to allow anything (which isn't a best practice, but I'm assuming you did this as part of your troubleshooting). IF the Azure SQL DB firewall was still in the way it would block immediately indicating so.
I would think that if you have the correct username and password combination it should connect. Make sure that your outbound port 1433 isn't being blocked by your own firewall (machine, work, ISP, etc.).
Azure SQL Database won't respond to pings.
Docs can be found on MSDN.

Microsoft OLE DB Provider for SQL Server error '80004005'

I have migrated a classic ASP site to a new server and am getting the following error, message.
I have tried different connection strings but none of them work.
I am not even sure if the connection string is the problem
The new server is a Windows 2012 Server, SQL Server 2008 R2 Express machine.
Microsoft OLE DB Provider for SQL Server error '80004005'
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
/scripts/dbcode.asp, line 31
Application("C2M_ConnectionString") = "Provider=SQLNCLI10;Server=(local);Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"
If it is an Express instance, it is most likely not a default instance, but rather a named instance. So you probably meant:
... "Provider=SQLNCLI10;Server=.\SQLEXPRESS; ...
--- instead of just (local) ---^^^^^^^^^^^^
Otherwise you'll need to show us the server properties in SQL Server Configuration Manager on that machine in order for us to be able to tell you how to correct your connection string.
As Aaron Bertrand mentioned it would be interesting to have a look at your connection properties (In Sql Server configuration check if the following are enabled Name Pipes and TCP/Ip).
Since you're able to connect from SSMS i would ask to check if the Remote connection is allowed on that server Also can you tell is the Sql browser service is running?
here is a link that i keep close to me as a reminder or check list on probable connection issues on SQL Server.
Sql Connection Issues
And lastly can you try as provider "SQLNCLI" instead of "SQLNCLI10"
Step-1: Enabling TCP/IP Protocol
Start >> All Programs >> Microsoft SQL Server >> Configuration Tools >> SQL Server Configuration Manager >> SQL Server Network Configuration >> Protocols for MSSQLSERVER >> right click “TCP/IP” and select “Enable”.
Step-2: change specific machine name in Data Source attributes'value to (local) will resovle the problem ni SQL SERVER 2012.
Try pinging the server in your connection string. The server your application resides on should be able to communicate on the port you specify by credentials. If you are developing locally try specifying "localhost". If the server is clustered or you installed as an instance then you need to specify that instance. Also make sure the server is configured for mixed-mode authentication if using sql credentials.
OR Try
Data Source=localhost;Initial Catalog=DBNAME;Persist Security Info=True;User ID=MyUserName; Password=MyPassword;
It can be a permission issue , Please check is that server is connecting with same configuration detail from SQL management.
other is username / password is wrong.
Here is what I would do:
EDIT: Note that this SO post, a few down, has an interesting method for creating the correct connection string to use.
Open SSMS (Sql Server Management Studio) and copy/paste the
username/password. Don't type them, copy/paste. Verify there isn't
an issue.
Fire up the code (this is next for me b/c this would be the next
easiest thing to do in my case) and step to line 31 to verify that
everything is setup properly. Here is some info on how to do
this. I understand that this may be impossible for you with this
being on production so you might skip this step. If at all possible
though, I'd set this up on my local machine and verify that there is
no issue connecting locally. If I get this error locally, then I
have a better chance at fixing it.
Verify that Provider=SQLNCLI10 is installed on the production
server. I would follow this SO post, probably the answer posted
by gbn.
You have other working websites? Are any of them classic asp? Even
if not, I'd compare the connection string in another site to the one
that you are using here. Make sure there are no obvious differences.
Fire up SQL Server Profiler and start tracing. Connect to the site
and cause the error then go to profiler and see if it gives you an
additional error information.
If all of that fails, I would start going through this.
Sorry I can't just point to something and say, there's the problem!
Good luck!
Have you ever tried SQL Server OLE DB driver connection string:
"Provider=sqloledb;Data Source=(local);Initial Catalog=mysite_live;User Id=mysitec_Live;Password=mypass;"
or ODBC driver:
"Driver={SQL Server};Server=SERVERNAME;Trusted_Connection=no;Database=mysite_live;Uid=mysitec_Live;Pwd=mypass;"
At least this is what I would do if nothing helps. Maybe you will be able to get more useful error information.
Could this be a x86/x64 thing?
The following thread seems to indicate that the (local) alias is a 32-bit alias which fails on 64-bit server:
http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/c701d510-90e5-4dd0-b14f-ca1d694d6615
(note that the error is exacly what you had)
When you were testing the .udl on the server did you test both x86 and x64?
Following the advice from this blogpost (http://blogs.msdn.com/b/farukcelik/archive/2007/12/31/udl-test-on-a-64-bit-machine.aspx) you could test your
local udl :
in 64-bit by just double clicking it (acts the same as running "C:\Program Files\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\\test.udl
in 32-bit by double running C:\Windows\syswow64\rundll32.exe "C:\Program Files (x86)\Common Files\System\Ole DB\oledb32.dll",OpenDSLFile C:\\test.udl
If you can confirm it's a problem with the alias I'd suggest you create a new one by following the guidelines found here:
http://msdn.microsoft.com/en-us/library/ms190445(v=sql.105).aspx
Have you tried to use the server IP address instead of the "(local)"?
Something like "Server=192.168.1.1;" (clearly you need to use the real IP address of your server)
In case you try to use the server IP address, check in the "SQL-Server configurator" that SQL Server is listening on the IP address you use in your connection. (SQL Server Configurator screenshot)
Other useful thing to check / try:
And check also if the DB is in the default SQL Server instance, or if it is in a named instance.
Do you have checked if the firewall have the TCP/IP rule for opening the port of you SQL Server?
Have you tried to connect to SQL Server using other software that use the TCP/IP connection?
The SQL Server Browser service is disabled by default on installation. I'd recommend that you enable and start it. For more information, see this link and the section titled "Using SQL Server Browser" for an explanation of why this might be your problem.
If you don't wish to enable the service, you can enable TCP/IP protocol (it's disabled by default), specify a static port number, and use 127.0.01,<port number> to identify the server.
In line 31:
cmd.ActiveConnection = Application("C2M_ConnectionString")
How are you instantiating cmd?
Rather than the ConnectionString being wrong, maybe cmd is acting differently in the new environment.
Edited to add:
I see that you've gone from IIS 7 to IIS 8. To run Classic ASP sites on IIS 7 required manual changes to server defaults, such as "allow parent paths." Is it possible that some of the needed tweaks didn't get migrated over?
If you're not running with Option Strict On, you should try that - it often reveals the source of subtle problems like this. (Of course, first you'll be forced to declare all your variables, which is very tedious with finished code.)

Connecting to my remote SqlServer database

Im currently making a wpf Windows Application, and it withdraws data from a database, so it is needed that I setup a connection to my remote servers SQL Server Database. Now i am getting a couple errors. When I first of all try to connect to my remote servers Sql Server using management studio, just to test if I could actually make a connection, I get the following error.
A connection was successfully established with the server, but then an error occured during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)
And ovcourse, I did try my best to do my research, and I found out a few things talking about allowing the SqlBrowser in firewall properties, done that...
allowing a connection to port 1433 and port 1434 through windows firewall, done that both.
Is there something Im missing or not doing?
Also it says "a connection was succcessfully established with the server" which means that It is able to connect, but something is going wrong somewhere. Also where it says "error occured during login process" could it simply mean I entered the wrong credentials?
I mean, when installing the SQLExpress I chose Windows Authentication so I never really got a username and password, So i just used the username and password for the Administrator account I use to connect to my server itself. Dont know It could have something to maybe just do with my login.
Could anyone please point me in the right direction as to why Im getting that error, even though I have enabled the TCP Connections and allowed SqlBrowser.
Any help would be greatly appreciated.
Thanks.
This is a bad certificate-related error, probably caused by different operating systems/environmental differences. If this is for testing purposes I'd disable the certificate, or you can configure it here (which is probably a good idea if you're creating a real application and not just playing around with it).
Please run the sql service and agent service by creating new id and start the service with that like ea admin or any other.
The port error will continue to show even if you fix the port ,check telnet configuration and enabled/open port via it.
I had similar problems so i created a virtual server installed sql server2008 r2 and then started it worked fine.
There are possibilities of error and authentication problems since we reuse the server by formatting it .

Unable to connect to SQL Express "Error: 26-Error Locating Server/Instance Specified)

I am at an loose end with one particular box that is running SQL Server 2008 R2 Express.
Windows Firewall is configured to allow inbound TCP & UDP 1433, 1434.
Windows Firewall is configured to allow outbound TCP & UDP on any port.
No other software AV/FW is currently running.
When I try to connect to xxx.xxx.xxx.xxx\sqlexpress, it times out with the following error:
TITLE: Connect to Server
Cannot connect to xxx.xxx.xxx.xxx\SQLEXPRESS.
ADDITIONAL INFORMATION:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (Microsoft SQL Server, Error: -1)
I have checked that remote connections are allowed on the server.
I have confirmed TCP/IP is enabled and configured in SQL Server Configuration to allow connections on the external IP to 1433.
I have also used Wireshark from my local machine and I can see requests for 1433 UDP going to the remote server.
But using Wireshark on the remote server shows no inbound connection requests for 1433 UDP or anything from my external IP (with filtering to remote RDP from results).
This makes me think it is a firewall issue.
The server is hosted by an external company who have control over the PIX in front of our server.
I need to troubleshoot this as much as possible myself as the hosting company have no clue what they are doing.
I had a similar problem which was solved by going to the "SQL Server Configuration Manager" and making sure that the "SQL Server Browser" was configured to start automatically and was started.
I came across this solution in the answer of this forum post:
http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/8cdc71eb-6929-4ae8-a5a8-c1f461bd61b4/
I hope this helps somebody out there.
press windows+R open RUN Window
services.msc
find SQL Server(SQLEXPRESS) right click on that and start the service
then check
Go to SQL Server Configuration Manager > SQL Server Services > In Right Side window show all the servers which may stop. If you are using "SQLEXPRESS" then ,
Right click on SQL Server(SQLEXPRESS) and start. After try to connect server... I had same problem but I resolved by these steps.
Here is a simple method to troubleshoot connection issues:
Create an empty file called test.udl using a text editor
Double click the file test.udl, then specify your connection properties
Hit the "Test Connection" button.
I recently encountered the same issue however I am using Windows 10 Technical Preview Build 10041 and SQL Server 2014 (Advanced).
Follow the same advice from above:
In particular, my problem was that I did not enable the TCP/IP in Sql
Server Configuration Manager->SQL Server Network
Configuration->Protocols for SQLEXPRESS.
Once you open it, you have to go to the IP Addresses tab and for me,
changing IPAll to TCP port 1433 and deleting the TCP Dynamic Ports
value worked.
Follow the other steps to make sure 1433 is listening (Use netstat -an
to make sure 0.0.0.0:1433 is LISTENING.), and that you can telnet to
the port from the client machine.
Finally, I second the suggestion to remove the \SQLEXPRESS from the
connection.
AND ----> That last line is important! It looks like to be Windows 10 specific; remove \SQLEXPRESS from your connection string. What was frusting was that SQL Management Studio connects just fine using either connection string (full or short), however Visual Studio only accepted the connection string without the \SQLEXPRESS.
The active firewall on the server might be causing this. You can try to (temporarily) turn it off and see if it resolves the issue.
If it is indeed caused by the firewall, you should allegedly be able to resolve it by adding an inbound rule for TCP port 1433 set to allowed, but I personally haven't been able to connect this way.
I had a Same Problem but i solved by Restarting the browser service in SQL CONFIGURATION MANAGER and removing \SQLEXPRESS from the instance name in the connection window.
It's security all about. Make sure you have double check your firewall (windows and anti virus) in some cases when you disabled av firewall and restart your computer, automatically windows firewall is active and it's still block your application. Hope this is helpful ..
Could you post the connection string you're using that's giving you trouble?
You might need to add the port number to the Data Source value, as omitting it can also produce SQL Error 26.
E.g.: Data Source=ServerHostName\SQLServerInstanceName,1433
If you have done anything but in spite of all couldn't connecting?!!
In my case i have changed connection part splitting port "," instead of this ":"
The corresponding TCP port or pipe name is not specified in the connection string (such as Srv1\SQL2008, 1433).
This issue also confused me a few days, after the IT guy changed some security settings on the SQL Server.
I have an EntityFramework for the Web application and for a desktop application.
After I changed some settings on the SQL Server, the Web application comeback to work, but the desktop still facing issue. But I used the same connection string for both applications, it make no sense one is working but the other doesn't.
Then I searched a lot until I found someone saying here it is needed to add port number 1433 after the $ServerName\$DatabaseInstanceName,1433.
After I added it, the exception became:
System.Data.SqlClient.SqlException: Login failed for user
'domain\name-PC$'
Then I found this link. It says to add Trusted_Connection=False;.
The whole connection string should be like:
data source=XXXXX\SQLSERVER,1433;initial catalog=XXXDB;user id=UserID;password=PWD;Trusted_Connection=False;MultipleActiveResultSets=True;
Hope this answer will help the ones out off Generic exception:
Error: 26-Error Locating Server/Instance Specified
Have you Disabled the VIA setting in the SQL configuration manager? If not, do disable it first (if VIA is enabled, you cannot get connected) and yes TCP must be enabled. Give it a try and it should be working fine.
Make the changes only for that's particular instance name.
Cheers!
I found this url to be very useful:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/2cdcab2e-ea49-4fd5-b2b8-13824ab4619b/help-server-not-listening-on-1433
In particular, my problem was that I did not enable the TCP/IP in Sql Server Configuration Manager->SQL Server Network Configuration->Protocols for SQLEXPRESS.
Once you open it, you have to go to the IP Addresses tab and for me, changing IPAll to TCP port 1433 and deleting the TCP Dynamic Ports value worked.
Follow the other steps to make sure 1433 is listening (Use netstat -an to make sure 0.0.0.0:1433 is LISTENING.), and that you can telnet to the port from the client machine.
Finally, I second the suggestion to remove the \SQLEXPRESS from the connection.
EDIT: I should note I am using SQL Server 2014 Express.
This really Works .. i had verified lot of sites and finally got the answer
This may occurs when the master.mdf or the mastlog.ldf gets corrupt . In order to solve the issue goto the following path
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL , there you will find a folder ” Template Data ” , copy the master.mdf and mastlog.ldf and replace it in
C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA folder .
Thats it . Now start the MS SQL service and you are done .
While there can be many reasons for this error - In my case it was pretty simple which I overlooked for a while. I was using server IP address along with instance name for Server as -
<add name="MyDBConnection"
connectionString="Persist Security Info=False;User ID=sa;Password=xxx;Database=MyDB;Server=nn.nn.n.nn\SQLInstance01; Connection Timeout=180" providerName="System.Data.SqlClient"/>
Correct connection string will look something like this (note this one doesn't have SQL Server instance name)
<add name="MyDBConnection"
connectionString="Persist Security Info=False;User ID=sa;Password=xxx;Database=MyDB;Server=nn.nn.n.nn; Connection Timeout=180" providerName="System.Data.SqlClient"/>
HTH.
In my case, I Installed SQL Express 2012 and the problem raise after I reboot my PC. I solved so:
I go to Services -> SQL Server (SQLEXPRESS) and I see that was stopped. I started and It's say an login error.
In properties, Tab Log On, I change it to Local System account , then I can start the SQL service.
Then to test it, I go to SQL Server Management Studio and I connect to .\SQLEXPRESS and it works!
I had a similar problem which was solved by going to the "SQL Server Configuration Manager" and making sure that the "SQL Server Browser" was configured to start automatically and was started.
it works for me
I got a similar problem with sql server , I have tried every thing but does not connect to database engine & it shows error:26.
First check if the database engine is running or not. by going into
configuration manager. start > sql server >sql server configuration
manager. On the right pane you should see the sql server (mss .. )
should be running state with a green indication.
IF the database engine is not running, simply uninstall sql
server / format your system if possible and then download sql
server 2012 and management studio. from
https://www.microsoft.com/en-ca/download/details.aspx?id=29062
Install server first, make sure to add server on installation phase
by clicking add server and then install management studio.
All you need to do is to go to the control panel > Computer Management > Services
and manually start the SQL express or SQL server.
It worked for me.
Good luck.

One machine on network cannot connect to SQL 2005

I've got a small Windows network with 3 machines. One of them has SQL 2005 installed. As of last week, the other two machines have had no problems connecting to the SQL instance.
Today, one machine - running Vista, if that matters - all of a sudden cannot connect. I get the generic message saying "A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections."
I'm pretty sure everything is set up correctly on the SQL 2005 box, because the third computer on the network still connects with no problem.
Vista computer has no firewalls set up, nothing has changed with the exception that I created a connection to a VPN a few days ago. When connected to the VPN, local network connectivity is hosed, but I've double checked many times that I am NOT connected to the VPN when trying to access SQL Server. I mention this only because it's the only thing I can think of that's changed.
I've rebooted all computers many times. No change.
I'm connecting via SQL Integrated Security. The login works fine from the third machine.
One other weird thing on the Vista box. Occasionally - maybe 5% of the time - it'll connect, but then when trying to access a table (like, just right clicking and choosing "open") it pauses then gives an "unspecified error."
Any ideas? I'm totally perplexed. This has been working for about 18 months without any errors, and I can't think of anything that's changed other than the VPN connection mentioned above. And just to reiterate - I am definitely NOT connected to the VPN when I'm getting this error.
Check the protocols used to connect ot SQL Server; I'm wondering whether it's trying to communicate over Named Pipes rather than TCP/IP (speaking from recent experience -- I had an issue with Named Pipes that went away when I disabled Named Pipes and enabled TCP/IP).
You can check this on the server with the SQL Server Configuration Tool, and see which protocols are enabled (under the Network Configuration branch in the navigation tree) for the SQL Server instance.
First off, we know that there is no client server communication here. So, based on the error, it isn't permissions or authentication (you have to connect before you can be denied access).
Try the following:
1) Ping - can you get to the server? Run this command in command prompt:
ping servername
If this works, then at least the name is resolving and the client can communicate.
If this fails, try the same thing with the server's IP.
2) Telnet - Assuming you don't have a non-standard port (explicitly changed or named instance of SQL Server), run this in command prompt:
telnet servername 1433
If this opens an empty screen, then the client can get to the port.
If this fails, try the same command with the IP. If that still fails, you don't have a path to the SQL Server from that machine. You will either need to verify an external firewall or other network connectivity issues.