My azure application successfully running with azure sql database,but now i want to run Cloud application with my own database servers because of their data security. for this, we can establish the local database connection from our own systems with cloud application and connect to my database perfectly with following steps using below link,
http://www.codeproject.com/Articles/261063/Azure-Virtual-Network-Connecting-Local-Database
After this i deployed my application in to azure and it deployed without any error.but when i try to run my cloud application using cloud url like xxx.cloudapp.net getting an error like
"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 requested name is valid, but no data of the requested type was found.)".
Please give some suggestions why am getting this error.
Thanks,
PCSSCP.
Try connecting using SQL Management from another machine outside of your network. I believe that there is no problem with publication in Azure Cloud Service, but a connectivity problem with your SQL server.
Arthur Oliveira
You have to remote to VM and check SQL Server port is opened or not, the same with SQL Server machine. I used to connect local DB with cloud based application.
This is an intermittent issue with the SQL Server.
Check this link if it helps,
IntermittentSQLServerIssue
Related
I have a setup where the connection string of my .NET application is configured at the app service level and the database used in it is present in an Azure SQL VM
I see the following error, while accessing my Web APIs in the app service
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 - Access is denied.
However, I’m able to connect to the database directly on my local system using SSMS with my organisation’s VPN
I’m struggling to find the right resource, appreciate if you someone can help me with steps to fix it
i just have the beginner level knowledge on Azure platform
I tried to reproduce the same in my environment I got the same error like below.
To resolve this issue i have removed private access and tried and then added new private access its work successfully.
Check the public access in selected network with firewall rule and allow exception as below.
And, when I remove this private endpoint and try to add new private access i can able to connect with my sql server.
Check this connectivity as below.
My azuresql,database server connected successfully.
Note: This error may occur in multiple ways if are not enable sql services and in tcp/Ip If any of the protocols are disabled or if Remote Connection Permission is disable error may occur for this please refer the below documents.
Reference:
Microsoft SQL Server Error 2 Cannot Connect to Local: How to Solve? (systoolsgroup.com)
Resolving could not open a connection to SQL Server errors (mssqltips.com)
I'm having trouble connecting to my SQL Server in an Azure Logic App.
I've just created a fresh SQL Server and database and am now attempting to connect to it in my logic app. However, it doesn't appear to be showing when I enter my credentials. I've been following this tutorial.
Does anyone know why this might be the case? Is it perhaps a permission thing that I may have missed?
I've also found that if i do an AD connection, I get this:
Try this for connecting to your DB:
first of all, try to connect with Azure AD Integrated here, and if you don't see your SQL Server and DB in the list try the next step
go to Resource Group where you created LogicApp and find the connection name that you used when trying to connect with Azure AD Integrated. You need to open it and click on Edit API Connection. In Authentication Type use SQL Server Authentication and other data to connect to your DB here.
Make sure you are allowing azure services to access your database server at
SQL Server > Firewalls and virtual networks > Allow Azure services and resources to access this server = Yes
I have developed a simple Web API and deployed it on an Azure server along with a SQL Server database. The database and the Web API are hosted on the same server. I can connect to the database from my development machine. If I run the Web API in Visual Studio 2017, everything works fine, I can call all Web methods and I get the proper expected response.
Now, that I deployed the Web API on the server and run it under IIS, if I make a Web API call using Postman I get this error message after about 30 seconds of wait time:
"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 know this error has been discussed here many times, but none of the suggestions made help solve my problem. The hosting Azure VM is a 64-bit Windows Server 2016.
In the connection string used by my Web API I had the data source set to the computer's name, its internal Ip address, the "localhost" keyword or the "127.0.0.1" back-loop IP address, but I get the same error listed above in each of those situations. SQL Server Management Studio (running locally on the same server that hosts the database and my Web API) is able to connect to the database if I use either of the three data sources: localhost, internal IP address or computer name.
In the situation in which it works, when I run the Web API in Visual Studio, the data source in the connection string is set to the external Ip address of the Azure Server. That would be the only difference, as far as the data source is concerned.
I need to mention that I have a couple of web methods that do not require database access. These work fine and return the expected result.
Are there other specific settings that I would need to do in IIS to allow this to happen?
TIA,
Eddie
I figured what the problem was. My Web API was developed in ASP.Net Core and as such, it produces its own executable. That is looking for a config file that is named TheNameOfTheApplication.exe.config.
Due to a temporary lapse of reason, I was modifying the connection string in the "app.config" file and left the one in the "TheNameOfTheApplication.exe.config" file with the external IP address that was not correct.
We have configured the Azure Hybrid Connection in the App Service which we want to access the SQL Server Analysis Services from On-Prem server. The port configured in Hybrid Connection is 2383. The connection status is showing connected on both the Azure and in the Hybrid Connection Manager of the On-Prem server. But when we run the application it is throwing A connection cannot be made. Ensure that the server is running.
Most probably you might be having issue with TLS version that is currently enabled on your on-premises server. A detailed article on how to tackle each and every problem that you might be facing with the HCM can be found here.
Hope this might be sufficient to solve all your problems.
I am hosting a bunch of micro-services and bot apps using Docker, and Azure virtual machines. There´s also a dockerized SQL Server 2017 instance in the stack, which I would like to migrate to Azure SQL. I am out of luck when trying to configure the source database in an Azure Database Migration project...
I tried to specify the service endpoint including the exposed port (since the dockerized SQL Server container´s public port is not 1433). I can connect to the SQL Server instance using SSMS from my workstation with no error, so connectivity is not the problem at all; does the Azure Database Migration require port 1433, or if not, how can I correctly specify a different port?
These are the error details I got from source details configuration in the Azure portal:
Error Type
Failed to connect, please check error details
Error Detail
Collector 'Microsoft.SqlServer.Advisor.SqlQueries.Contracts.Models.IQueryServerProperties' failed to collect data. 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: 25 - Connection string is not valid)
The parameter is incorrect
The source database configuration wizard is not very clear about the format of the remote server´s DNS name. Just specifying the fully qualified DNS name and port is not enough; it must contain the server´s instance name as well.
Wrong:
<DNS-name>,<port>
Correct:
<DNS-name>\<INSTANCENAME>,<port>