Is it possible to query the Active Directory from Azure SQL - sql-server

I am migrating from an older version of Microsoft SQL to Azure SQL. The existing SQL Server stored procedures use OPENQUERY and a linked ADSI server to retrieve user information directly from the Active Directory.
Is this possible in Azure SQL?

Azure SQL Database only allows to query another Azure SQL Database (remote) or Azure Synapse Analytics databases using elastic queries. All other SQL and non-SQL sources are not allowed.
Azure Managed Instance uses a private VNET and supports linked servers to a limited number of targets. Supported targets: SQL Server and SQL Database. Not supported targets: Active Directory, files, Excel, Oracle, MySQL, Analysis Services, and other RDBMS.
Azure SQL Database would have no way to communicate with your on-premises servers since it does not uses private VNETs as Managed Instance does.
If you rely heavily on this you should discard all Azure SQL (PaaS) options and go for a SQL Server Azure VM.

Related

How to query on-premises SQL Server database from Azure SQL database?

I'm trying to query an on-premises SQL Server database from an Azure SQL database. I understand that the elastic query feature allows you to query across multiple databases in Azure SQL Database. But, it doesn't work with querying an on-premises database. Is there any way to do this?
Elastic database queries work between Azure SQL Databases and to query Azure SQL Data Warehouse only. From an architecture point of view on the scenario you describe, Azure would be relying on a server outside of its infrastructure to satisfy a query, if elastic queries were allowing creating external data sources to on-premises SQL Server instances. A better architecture may be replicating the on-premises database to a hub database on Azure SQL using SQL Data Sync and then create elastic queries using that hub database. Even from a performance point of view makes more sense, since queries won't be executing against your on-premises databases and latency will be less a factor.
Another option you have is to consider using Azure Managed Instance with allows you to create Linked Servers that can connect to on-premises databases as you can read here. Azure Managed Instance supports running on a private VNet, from which it's reasonable to connect to on-premises SQL Server instances. Azure SQL Database would have no way to communicate with your on-premises servers.

Read Oracle database from Azure Elastic Database Job

In onprem SQL Server you could add a remote database server such as Oracle as a Linked Server, and use in a SQL Server Job Agent job.
Is this possible in Azure SQL Database using Elastic Database Jobs? How?
On Azure SQL Database (PaaS) a concept like a linked server does not exist, however on Azure Managed Instance (PaaS) you can have linked servers but they support limited number of targets. Supported targets: SQL Server and Azure SQL Database. Not supported targets: files, Analysis Services, and other RDBMS (including Oracle).
You may want to consider creating a SQL Server VM on Azure (IaaS) or using Azure Data Factory.

Any options to connect from Azure SQL Server database to an Azure Data Warehouse instance

We want to be able to query the Data Warehouse database from the SQL Server database both with the same server name in Azure. Select statements including the database name (e.g. select * from server.dbo.product) returns with error that a reference to the database and/or server name isn't supported in this version of SQL Server. There are articles on creating an external data source in the SQL Server database but we get error that the credentials don't have permission to perform this action.
Azure SQL (as of Azure SQL V12 in late-2016) does not support cross-database queries the same way that they do with a normal on-premises SQL Server (e.g. using the DatabaseName.schemaName.TableName syntax).
Given that Azure SQL and Azure Data Warehouse databases each reside in different physical servers it wouldn't work anyway, as the above syntax is intended for databases that all reside in the same server.
Azure SQL does support cross-database calls via the EXTERNAL DATA SOURCE feature, which we have in normal on-premises SQL Server already. This is documented here: https://azure.microsoft.com/en-us/blog/querying-remote-databases-in-azure-sql-db/
Note that performance won't be that great and you might be better-off doing the querying in your application code. For example complex JOINs which reduce data will run suboptimally.

Need to select best Azure service to access on-premises sql database

I have a business scenario where web site and SQL database will be on cloud and after some operations want to save the cloud SQL data to the SQL database which is on-premises and not exposed to the internet.
What would be the best architecture for this scenario?
Need suggestions.
you can either setup a VNET to connect your Website to your on-premises SQL Server or you can configure Azure Hybrid Connect. (see this link)
If the website does not use local resources you can always go for azure websites. Choose the tier based on the requirement.
As far as the database is concerned you choose azure sql database. ( tier based on requirement-size and performance) . You can set up azure sql sync (in preview) to sync between sql azure and local sql server. Or you can take a back up of sql azure db - bacpac. and then restore it local sql server using sql management studio.

Do you need to migrate SQL server 2008 to Azure SQL?

I am currently learning Azure. In terms of data store, I see Azure SQL and the migration tool. If you have SQL server 2008 or Oracle, would you be required to migrate in order to use Azure?
I know you can access/query the Azure datastore via web browser or azure tools. Is there anything equivalent to working locally (or setting up local azure sql db)?
Azure is a platform with various components. you can opt to migrate your database to Azure SQL Database, run a Azure VM with either Oracle or SQL Server, or retain your current databases on-premise and make use of VPNs to connect your on-premise databases and your Azure-based application.
There is no emulator for Azure SQL Database. for local development, you can point it to as SQL Express, LocalDB or SQL Server.

Resources