I'm trying to connect from my azure SQL DB to link to the local SQL DB and create some linked tables that i can run some reports on within the Azure environment.
I've tested that i can follow the steps and successfully connect to another SQL Db within my Azure environment and this is working fine, so the steps i am following are correct.
However when i try to run the same steps connecting against my local DB i receive the following error:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
Steps i'm following are
Create Database scoped creds (using my same details that can log on via Management Studio)
create external data source
Create external table using the details created above.
This creates a external table within my azure database but when i try to select from this table i get the following message
A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.)
So two questions really as i've googled for some time and a lot of the posts I've found seemed to be old.
Does Azure support connecting to a local DB?
And if so any ideas what this message means?
I've read up about this and the only comments i could see mentioned TrustServerCertificate=True to false. However i'm not sure where this is set and where the change is required? to me this looks more like a change within a connectionstring for coding rather than a db to db?
Elastic queries allow a query to span multiple Azure SQL Databases but on-premises SQL Server instances can not be part of elastic queries.
My suggestion is to perform replication of on-premises databases to Azure SQL Database or use SQL Data Sync so you can have an always updated copy of on-premises databases on Azure SQL Database and you can then query them as local tables or with elastic queries on Azure SQL Database.
Related
I have a SQL database created and I am trying to deploy/move that database to the Azure Cloud by using the Deploy Database to SQL Azure Wizard in SQL Server Management Studio. But I have ran into an error after trying to deploy it. I am using the SQL Authentication to log in with my credentials. I also tried installing the Data Migration Application.
The error is:
TITLE: Microsoft SQL Server Management Studio
One or more unsupported elements were found in the schema used as part of a data package.
Error SQL71624: The permission 'CONNECT' is not valid for the target object 'guest' in Microsoft Azure SQL Database v12.
(Microsoft.SqlServer.Dac)
BUTTONS:
OK
I don't understand what this error means and also I don't understand why this error is happening. I looked on the internet for possible solutions but could not find any information. Please help me.
SQL Azure and regular SQL Server aren't entirely compatible.
One of the things that is enabled on regular SQL Server is the guest login. This login allows connection to instance, with a default database of master. Once connected, the user can switch to a different database (use [thedatabase]) if they have the authority to do so.
But in SQL Azure, you connect directly to a single database, and can't switch databases on the connection. So the guest account has no function.
On your source instance (the one you want to migrate), you can revoke this ability so that the wizard won't try to migrate it. Execute revoke connect from guest on your on premise instance.
I'm trying to build a webservice that talks to a SQL database hosted on a server in our internal network. The service is hosted by Azure as a Web App. Is there a good way of doing this? Do I have to use Azure Sql databases, and if I do, is there a way to have the Azure database act as a proxy for our internal database?
There are already rules permitting connections to the ports on our database server, so I don't think that's the problem. I see a lot of questions regarding connecting to Azure hosted sql databases, but nothing about connecting Azure web apps to other kinds of databases.
The error occurs when I try to call a stored procedure (via generated entity framework code) and is as follows:
Error occurred: System.Data.Entity.Core.EntityException: The underlying provider failed on Open. ---> 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.
Our database is configured to allow remote connections, so what I'm guessing the Web App is having difficulty connecting to our vpn.
Please let me know if you need any additional information.
Thanks,
Josh
You can leverage Azure Hybrid Connections which is a feature of App service. Within App Service, Hybrid Connections can be used to access application resources in other networks. It provides access from your app to an application endpoint and uses Azure Relay service to connect to on-premise.
Check out the below link for more details :
https://learn.microsoft.com/en-us/azure/app-service/app-service-hybrid-connections
First option is to look on azure app service hybrid connection but for you to do that you should have Windows server 2012 or above.
Azure App Service Hybrid
Azure App Service hybrid connection is good if you are pulling small amount of data.
If you are pulling large amount of data or your SQL server version is below server 2012 you have two options:
Azure Site to Site VPN
Azure SQL Data Sync
Azure SQL DB Sync is a feature that available on Azure SQL database. You can create a Azure SQL database on azure and sync your on-premise SQL database or SQL database table to Azure SQL database and you can connect your application to Azure SQL database instead of connecting to on-premise database server. This will increase your performance of your application.
We ended up adding the application to an Azure Virtual network that allowed connections to our on-prem servers. The remaining difficulties were due the wrong port numbers being open.
What was very helpful in debugging this was the Kudu console in Azure, under Advanced tools -> console. There you can run commands from the machine hosting your application like ping, or the below:
sqlcmd -S tcp:servername,1433 -U Username -d databasename -P password -q "SELECT * FROM tablename"
I am stuck with the same situation mentioned here in this URL.See SO question Here
. I am having a Azure VM and Sql Azure db. From Sql Azure Db i am using external table to query Azure VM Sql but with error:
The underlying error message received was: 'A connection was
successfully established with the server, but then an error occurred
during the login process. (provider: SSL Provider, error: 0 - The
certificate chain was issued by an authority that is not trusted.)'.
I knew its a CA certificate error. But I cant purchase certificate as of now. So I wanted to if i can use self signed certificate for the same.
I am having a certificate in my Azure VM. See below in screenshot. Will it work? Do I need to install that in my Sql Azure Db too?
If you are talking about Azure SQL Database elastic queries they can only be created between Azure SQL databases. You will find more information here.
Linked servers to SQL Azure databases are now supported as demonstrated here.
Hope this helps.
Regards,
Alberto Morillo
I published my website using Azure and when I go to the sie I'm getting a SQL error:
SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server.
I am assuming:
That Azure cannot find/process the connection to the external MS SQL server that is in the web.config file. I know that the settings are correct because when I launch the site locally, it connects to the database and retrieve the data.
It could also be that I'm using the free (one month) subscription and I'm not sure if that feature is supported.
I found an article (http://blog.davidebbo.com/2012/09/managing-database-connections-in-azure.html) that spoke about "Managing database connections in Azure Web Sites", but I cannot seem to be able to replicate the steps necessary to achieve this external connection.
I think it is nothing to do with your webapp or Azure Subscription. I understand that you are trying to connect your on premise database from your Azure app. It wont work directly and you need to establish a hybrid connection for the same. You can find the guidance here.
I have a virtual machine in the cloud that runs SQL Server and a database that is publishing for merge replication. I have followed all the steps as outlined in Microsoft documentation but my subscriber client is getting stuck with the following error...
The remote server 'xxxx.cloudapp.net' does not exist, or has not been designated as a valid Publisher, or you may not have permission to see available Publishers.
The client has created the subscription and is able to connect to the server in order to get this far and so the server definitely does exist and can be communicated with. I have given full permission to access the ReplData directory for all users so I cannot see how permission would be a problem.
Any ideas?