Troubleshoot Connecting to the SQL Server Database Engine - sql

I'm trying to connect to SQL Server from my .NET application.
I tried it on my pc and one other pc with already installed sql server.
I needed to test my app and I started virtual machines (windows 7 and 8.1).
I am constantly getting error:
"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: Named
Pipes Provider, error: 40 - Could not open a connection to SQL
Server)"
I tried everything that i found on internet that might help.
Nothing works for me.
Im using VirtualBox for virtual machines.
Is there might problem with that or even problem is because I'm trying to do it on VM. How can I resolve this?

Check this is this helps go to run -> sql server configuration manager then check sql server service are running and then client protocol enabled

Related

Cannot connect to ANY remote SQL Servers from my system

I cannot connect to any remote SQL Server instances from my system. I used to connect them from SQL Server Management Studio. Moreover, I can still connect to the same SQL Servers remotely from another systems (my colleagues' system).
I am getting following error:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)
Error Number: 53
Severity: 20
State: 0
I have checked:
Named pipes/TCP is enabled.
Remote connections are allowed.
Windows Firewall is off.
Enabled everything in SQL Server Configuration Manager.
Also, I have tried everything mentioned in this post-
How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?
But still could not solve my problem. Please suggest any method which allows me to fix this error and connect to the remote servers again.
instead of check whether that server system is working or not, because sometimes if the server system is not working means we are unable to connect to that system

Connect ot SQL Server Express 2012 over the internet

I've been trying to configure my sql server express 2012 to recieve connections over the internet without any luck for hours (I'm using Team Foundation Service for nightly builds but it fails when it tries to run unit tests that interact with the sql server).
All I keep getting is this message :
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I have tried the following in order to solve this:
Install and run SQL Server Browser
Enable TCP/IP for the sql server instance (using the default SQLEXPRESS)
Enable Port forwarding in my router
Added SQL Server and SQL Server browser apps to the firewall allowed apps list.
Banged my head against the wall.
My sql server is mixed mode, and the username and password are correct (it works when using the local ip address)
I've read every post here regarding this problem but nothing so far..
I'm pretty desperate so any advice will be greatly appreciated!
thanks
Solved it.
Only had to enter my public IP adress without the isntance name.
For example xxx.xxx.xxx.xxx instead of xxx.xxx.xxx.xxx\SQLEXPRESS
I can't believe it's such a stupid mistake ...

Unable to connect SSMS, Microsoft SQL Server, Error: 53

SQL Server Management Studio is not connecting on my database server machine at production server.
Whereas production sites accessing database. When I tried to connect database from SSMS, I get this error:
Cannot connect to 111.11.11.11.
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: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
(Microsoft SQL Server, Error: 53)
I was using this SSMS last couple of years,n this SSMS is running fine since more then year on production database server n i didn't closed ever, now when i connecting this SSMS but facing this issue, whereas my sites which accessing this database is working fine.
I also tried to access database from sqlcmd but no luck n facing facing this error:
HResult 0x35, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [53].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server.
Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
I thinks we resolved the issues.
1. Active Directory server was not behaving, so
2. SQL server couldn't run without credentials and
3. they found another SQL server issue and fixed it.
We started looking into the SQL connections that my team had found and it lead us to find that the Active Directory server had basically crashed. It was allowing us to log in however it wasn't able to access the majority of the AD functionality. We ended up rebooting the AD server which corrected the issue however we were still seeing issues with the SQL cluster manager and SQL itself was rejecting connections on a somewhat regular basis.
After the AD server was rebooted we were able to log into the SQL cluster manager but with limited capabilities, since it had been erroring due to the AD issue we restarted the cluster service to see if this would correct the issue. This caused the SQL service to fail over to the passive server and caused SQL to start rejecting even more connections than it had been. The cluster service started working with this restart however the SQL connections were getting worse. We found that the IPv6 protocol was enabled for the SQL service which causes problems, like the ones we were seeing, in SQL clusters, to disable this we had to reboot the 2 SQL servers. We rebooted them one at a time and once they were back up everything was working properly.

Cannot connect to SQL server - client side issue

I might be the million'th person posting about this, but others' solutions haven't helped me. I have a database on Microsoft SQL Azure. I an trying to connect to it using the Visual Studio 2010's "Connect to Database" Tool.
From my Windows 7 machine, I can connect to it very easily. But from my Windows Server 2008R2 machine i am getting the classic error -
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
All the posts around the web seem to be focussing on the problems on the server side, no one cares if the client goes rogue. :(
Thanks for the replies.
I have seen similar problems with VS2010 DB Tool and Windows Server so I would not suggest try using SSMS 2008 R2 (must be R2). Once you have download SSMS 2008 R2 and configured properly to work on Windows Server it sure will work. In most of the case you really need to open SSMS settings to get it workon on Windows Server.
Next a few points to check:
Verify that the telnet is working from your Windows Server Machine:
c:>telnet _your_sqlazure_database_name.database.windows.net 1433
Disable your real time security and the try again
Finally following the link to keep applying settings in your Windows Server and SSMS which are applicable and I am sure it will work:
http://www.mssqltips.com/sqlservertip/2340/resolving-could-not-open-a-connection-to-sql-server-errors/
One issue is that you need to connect via tcp, not named pipes (per your error message).
Are both servers behind the same firewall (e.g. the same external IP address)? The SQL Azure firewall needs to be configured to allow access from remote IP addresses.

eCommerce desktop dry-run issue

So the situation is that I've d/l nopCommerce and a slew of other web development programs in order to save some cash on my business.
I've created a local server/database with sql anywhere 12, and then run nopCommerce with VS2010 to begin the install, but receive this error message when attempting to connect with the server:
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
I've also ran the same db in VS and tried running it that way, while nopCommerce asks for a server name, I've tried many to no avail.
Checked spelling, I'm running everything local, so none of this makes sense.
All help is appreciated.
Have you enabled Named Pipes protocol for your SQL server?