SQL Server Alias stopped working - sql-server

I have configured a SQL Server 2016 alias following this post and it was working, but suddenly it stopped working.
Error 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: TCP Provider, error: 0 - The wait operation timed out.) (.Net SqlClient Data Provider)
I created the alias using the SQL Server Configuration Manager and created it in the 32 and 64bit:
When I go to the Protocols for SQL Server Express, all of them are enabled, thus TCP/IP is enabled. Also, the SQL Server Browser service is running.
Looking at the system log there is no relevant message about it, so I'm a bit lost about what could be causing it to stop working. My OS is Windows 10 Pro.
Would you have any clues to help me solve it? Thanks for any help

Check that the SQLEXPRESS instance's port number hasn't changed, which is likely after a reboot or service restart.
Regarding the use of instance aliases, this is pretty much useless if you're also using dynamic ports for this very reason. To me it's more cumbersome to maintain this configuration than it is to maintain a connection string in your program IMHO.

Related

HTTP Error 500.30 - ANCM In-Process Start Failure - An error occured during migration

I have read this thread, however unfortunately couldn't find the solution to my problem. I have an ASP.Net Core project (that's called Rent) and it works without any problem on my local machine. However, once I publish the project to the IIS (still in development mode) I get the below error
fail: Rent.Program[0]An error occured during migration
Microsoft.Data.SqlClient.SqlException (0x80131904): 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: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
---> System.ComponentModel.Win32Exception (0x89C50118): Unknown error (0x89c50118)
The connection string is called DefaultConnection and is the environment variable. Can anyone help me please? Can provide any additional information if required.
The first thing you should check is that your SQL Server instance is up and running and that your database is still available. This error means quite literally that it can't establish a connection to SQL Server from the Secret Server application.
And you can also check follow things in your environment:
Is something blocking the connection between your Secret Server server and SQL Server?
The standard SQL port is 1433. Check with your server administrator - is the Windows Firewall in use, blocking this port on your SQL server? Check with your network administrator - is there a firewall at some point in between that has closed off this port? Keep in mind that if you use a custom port for SQL, it need to be specified the Secret Server database connection using a SQLSERVER,port type of format.
On the server hosting your SQL Server database, is the SQL Server
service running?
Open services.msc or SQL Configuration Manager to view the status of your SQL Server service.

ODBC can connect to our SQLServer, but SQL Management Studio cannot

We have an older machine that hosts a bunch of test databases. It was working fine for years. One day a few months ago, we could no longer open SQL Admin on that machine. When you tried, you get the dreaded:
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)
Note that we are running everything on this one machine. We are not trying to connect over the network from another machine. I tried variations on MS's page and on various SO threads on the topic:
the firewall is off
the server is running, as is the name service
it is configured for remote connections
we've rebooted it
Again, this was all working fine, and we changed nothing on that machine. I suppose a Win update may have occurred.
On a lark, today I tried making a new DSN to the same server, using SQL Client 11. It saw the server in the combo (took a while), and the test connection worked fine. But SQLSM still fails!
Does anyone know what connection type the Native Client would use, and what that driver uses to populate the server list?
My suspicion is that something is wrong with the named pipes service. If ODBC uses named pipes, then I'm a bit stumped.

How to resolve issue in getting connected to SQL Azure Database?

I configured the SQLAzure database. I configured the firewall for my IP and when am trying to connect to that database from my local using SQL Server Management studio, getting below error
TITLE: Connect to Server Cannot connect to XXXXX.database.windows.net.
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=53&LinkId=20476
The network path was not found
How to resolve this issue?
Please also check network protocol when you connect to Azure database via SSMS. It seems you are using named pipes and TCP/IP is excepted.
Hi Bravo are you able to browse the instance via Visual Studio if you have it installed?
Can you also confirm that you are not behind a corp firewall that blocks 1433 outbound?
Really minor thing but the title of the error has a trailing "." which if that is the machine name you are trying to connect to won't work - it may just be appended by the error message.
You can try a few things:
Ensure SQLAzure database name is correct (the error that you posted translates to name doesn't even exist)
Try adding port number at end of the connection
XXXXX.database.windows.net,1433
If the issue still persists, try pinging the SQLAzure from your local machine.

Cant connect to the Azure SQL Database

For the past month I have been using Microsoft SQL Server Management Studio tool to connect to my database which created on the Azure portal. Recently I received updates from Microsoft related to Microsoft Visual Studio. After I installed these, I can't connect to my SQL database (previously it was working fine). Update History Screenshot I attached the screenshot of recent updates (which I installed) and the error message for your view.Error Message
Please help to solve this issue.
note: I am an SQL beginner, so I don't know many technical things related to tools, so please keep your answers to my level, Thanks!
Update: Error Message
TITLE: Connect to Server
Cannot connect to abcxyz.database.windows.net.
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 53)
The network path was not found
This error means that you tried to create a connection to an endpoint and you were expecting a acknowledgment from sql server, however, that acknowledgement did not occur. This means that you are either blocked by your own network, a network in route, or the endpoint network (which all three could be your own if, running locally). I would start by pinging that server ip address and seeing what you come up with.
that problem solved automatically, when I tried to keep connecting. really I don't know what was the problem..thanks for ur reply guys.

Cannot connect to local instance of SQL Server Epxress after upgrading from Windows 7 to Windows 10

The title pretty much says it all, however let me tell you what I have researched.
I have verified that the following services ARE running ...
SQL Server (SQLEXPRESS)
SQL Server Browser
SQL Server VSS Writer
(I don't really know what this one does)
This one however will not start ... For some reason it starts then automatically turns off.
SQL Server Agent (SQLEXPRESS)
When I try to connect using my server_name\instance and Windows Authentication I get the 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: SQL
Network Interfaces, error: 26 - Error Locating Server/Instance
Specified) (Microsoft SQL Server)"
The connection specified in the "Connect to Server" box was working perfectly fine before I upgraded. I thought it might have been my Norton 360 Premier but I uninstalled it and it didn't help. I AM having issues with the adapter frequently dropping the internet connection but I just disconnect and reconnect and that resolves itself ... perhaps it's related?
The other technique I tried was to replace the server name with the IP address ... 192.168.0.22\Instance ... This actually seemed to find the SQL Server but rejected the Windows Authentication ...
"Login failed. The login is from an untrusted domain and cannot be used with Windows authentication."
Any help getting this up and running would be greatly appreciated. I have several databases on here and would hate to have to reinstall SQL Server and manually hook them back up .. or worse lose any of them. I have a client waiting so ... the sooner I get help the MORE appreciative I'll be!!
Sincerely,
G
UPDATE
I have access! But I am not sure what I did that made the difference.
Open SQL Server Configuration Manager.
Expand SQL Native Client 11.0 Configuration (32-bit)
Select "Aliases"
Choose alias name ".\SQLEXPRESS"
Change alias name to "192.168.0.2\SQLEXPRESS" (using your IP address)
Change the value of "Server" to 192.168.0.2\SQLEXPRESS (using your IP address)
This allowed me to log on to the server using the ".\SQLEXPRESS" alias.
Some things I do NOT understand however is ...
I changed the "alias name" expecting that to appear in my list of connections drop down in SQL Management Studio. It did not, but the alias "'\SQLEXPRESS" was still there and worked!
For the alias "SERVER\SQLEXPRESS" I changed the "Server" value to use the IP address as well but received the authentication error described earlier, even though the only difference was the Alias Name.

Resources