I've deployed my version in windows azure.
After that I've added sql database. When I trying to connect, it doesn't allow from local. So I've clicked on "Set up Windows Azure firewall rules for this IP address" and added ip address. Now working fine when I run from local.
But When I tried to access from the iis8, I got an isssue is,
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 - No such host is known.)
.Net SqlClient Data Provider.
In local, the same functionality is working fine.
Your server running IIS8 needs to be added to the firewall just like you did with your local machine, you can do this either using the Management Portal or you can connect to your SQL Azure instance from your local machine and run:
exec sp_set_firewall_rule N'IIS8 Webserver','X.Y.Z.0','X.Y.Z.0';
Where the first arguments is name of this firewall rule and X.Y.Z.0 is the public ip of your IIS8 Webserver.
The reason its specified two times is that you can specify a range of IP's.
More info here
Related
I am trying to retrieve data from a table located in a postgresql database hosted on azure VM. I would like to inject this data into an Azure SQL Database. I set up the self hosted integration runtime. Since the Vm hosting my DB is a linux VM, i have setup self-hosted IR on windows VM and using that I am able to connect to DB and copy the data to ABS location without any problem but when I try to copy the same data to SQL database, I am getting following error:
ErrorCode=SqlFailedToConnect,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot connect to SQL Database: 'XXX', Database: 'XXX', User: 'XXX'. Check the linked service configuration is correct, and make sure the SQL Database firewall allows the integration runtime to access.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,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 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.),
Source=.Net SqlClient Data Provider,SqlErrorNumber=10060,Class=20,ErrorCode=-2146232060,State=0,Errors=[{Class=20,Number=10060,State=0,Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. ...
After searching about I opened the inbound and outbound traffic for port 1433 on machine which is hosting IR and and outbound traffic for port 1433 on machine which is hosting the database but I am still getting the same error.
Any idea what am I missing here?
I managed to solve the problem. As per azure documentation here, if we are trying to connect to SQL database from within Azure cloud then we need to open communication to port range 11000-11999. We need to put this port range in network security list for outbound connections.
Is it possible to connect an Azure Web App to a SQL Managed Instance via the private endpoint for the MI?
Following the documentation here https://learn.microsoft.com/en-us/azure/sql-database/sql-database-managed-instance-connect-app it seems to be that as long as the web app service is in the same VNET as the managed instance, then the connection should be OK via the private endpoint.
I have enabled VNET integration on the app service so that it is integrated into the same VNET as the managed instance. I have also whitelisted all of the outbound IP addresses for the webapp (including the additional ones) on port 1433 for the MI.
Using the private connection string for the MI, the webapp fails to connect when loading the front end and also when checking the connection string via the diagnostic tools.
Enabling the public endpoint on the MI and whitelisting all outbound IPs on port 3342, the webapp is able to connect straight away with no issues. Switching back to the private endpoint fails again.
The error message received is:
System.Data.SqlClient.SqlException: 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)
Came across this issue as well, a simple restart after the vnet-integration activated the connection for me
I have created a sql server instance on an Azure VM and uploaded my sql server backup and the various reports that were previously running on a local box. This has all gone well and I can connect to the database via management studio from my remote client.
I can also run all my reports locally on the Azure VM using RDP. They all work fine.
The problem comes when I try to connect to my report server using Internet Explorer from my remote client. All I get is Page is not found messages.
I have opened Port 80 on the Azure firewall and added an inbound rule in my Azure Portal to allow connection on Port 80.
I have tried using the Public DNS name I have created something like AFDSQL.NorthEurope.cloudapp.azure.com/Reports_MSSQLSERVER/Pages/Folder.aspx and also tried the IP address directly but neither work.
What am I missing?
Roy
Just got mine working!
Yes, you have to open port 80 on the windows firewall in your azure vm.
You also have to open the port in the network security section of your azure portal.
Finally the address to use is http://servername/reports/browse not reports/folder.aspx like you are used.
I'm trying to connect Azure's SQL database via SQL Server 2008 R2 SP2. I'm using Azure with free trial subscription. I already search everywhere and tried these things:
Allow inbounds and outbounds rule in windows firewall for port 1433
Check that TCP connections in SQL Server Configuration Manager is available and running on port 1433
Create server and database on azure portal and configure its ip allowance
I connect with these settings
Server Type: Database Engine
Server Name: tcp:aaa.database.windows.net,1433 / aaa.database.windows.net
Login: bbb#aaa
Password: xxx
And the error is
"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 - A connection attempt failed
because the connected party did not properly respond after a period of
time, or established connection failed because connected host has
failed to respond) (Microsoft SQL Server, Error: 10060)"
P.S. I also can't ping xxx.database.windows.net and can't telnet xxx.database.windows.net 1433
Your question is confusing, as you're talking about both SQL Server and SQL Database. But, given the connection strings you mentioned (xxx.database.windows.net) you are definitely talking about SQL Database service, not SQL Server in a VM.
That said: You must allow certain IP addresses to connect to it (this is a built-in part of the service itself). Look at the SQL Database server's Firewall setting:
You'll need to add the IP address of your computer (or IP range), to access SQL Database through your local tools.
Hello I am facing one issue during snapshot replication between SQl servers reside in Windows Azure Virtual Machine.
I had 2 VM with below configuration
1) Windows server 2012 (Installed sql server 2012 with msdn licence)
2) SQL server 2008 R2 (Databases reside on this server, on this i had created publisher for replication)
Now when i creating subscriber over target sql server (1st server) then while selecting publisher connection it shows me error in connecting as shown below image.
Is there any need to create virtual network? in future target server would be on premises server instead of Azure VM.
Note : For both VM i had opened 1433 port and enabled Mixed Mode Authentication.
Create an alias in SQL Server Configuration Manager and give it the name the replication component expects. The alias contains the cloupapp url and port.
Now reconnect using the simple alias. Just did this for my cloudapp.net VM.
I got solution by adding alias entry in host file on VM (C:\Windows\System32\drivers\etc)
[IP Here instead of cloudapp.net URL] [SQL server instance name]
So for clarification, using the example above, the solution as I've experienced it, is to create a SQL Server alias for the server name shown in the error message. In this case, the alias name should be SQL-AZURE and the server should be the server name as shown at the top of the error message dialog:
catalysttg.cloudapp.net, port no 1433, protocol tcp/ip