Is it possible to use Azure Analysis Services as the backend to a web app hosted on an Azure App Service - azure

Instead of AzureSQL --to- App Service website
AzureSql --to-> Azure Analysis Service --to--> App Service Website
The only insructions we see online is how to connect AAS to Powerbi, Excel Etc. Is it possible to use it as a backend to a website?

You can't seamlessly connect to analysis services from azure sql. Linked server feature is not available on azure sql, instead we get https://learn.microsoft.com/en-us/azure/sql-database/sql-database-elastic-query-overview which doesn't really help you in this scenario.
Atm your only option is to connect to AAS, get records you want, insert it to database and do normal query.
In MS SQL server you can define analysis services as linked server and query it directly from from tsql with https://learn.microsoft.com/en-us/sql/t-sql/functions/openquery-transact-sql but even in this case it might be a good idea to copy result of open query to sql table first and then use that table in joins. MS SQL doesn't really know how many records will be returned by open query so in many scenarios it will produce sub optimal plans for queries that use open query results.

Related

SQL Server Tables not showing up in Logic Apps Designer using a successful on-premise connection

I am using Logic Apps Designer on Azure to move source data to a storage file and I need to connect to a database on my SQL Server. To do this, I am using an on-premise connection througha gateway. I was able to successfully connect to my SQL Server database, however, when I am using Logic Apps action, not all tables are available on Logic Apps. Is there a security/permissions/connections issue that is preventing all tables from the SQL Server database not to return to Logic Apps?
enter image description here
enter image description here
I tried refreshing/restarting Azure and also tried connecting through with other authentications hoping more tables would return, but no luck.
I would suggest you to create a new api connection to sql and try to access tables again. There might be issue with connecting to db.
One of the alternative approaches to get row from sql db is using execute query action in logic app.
As shown in above picture, Execute a SQL query (V2) action is used to query table and retrieve records based on condition.
Reference link

Cross Database Insert in Azure?

Is it possible for me to insert some data from one database to another in Azure sql?
Let's say I have a trigger in db1 that updates some values in db2.
I read about elastic queries but it seems like they are read-only so they don't solve my problem.
You can't use cross-database in Azure Sql Server because databases can't see eachother physically , you could use elastic pools but they are Read Only.
A solution is to use SQL Managed Instance to upload your instance . This supports cross-database queries but it was expensive.
There was some previous discussion here about doing similar:
C# Azure Function trigger when SQL Database has a new row added without polling
There is also the Azure SQL Bindings for Azure Functions but they are input bindings and not triggers and they're still in preview and limited to C#, JavaScript and Python.
Azure SQL bindings for Azure Functions overview (preview)
There was a new announcement last week after MS Build however for Azure SQL Database External REST Endpoints Integration (hopefully they don't refer to it as ASDEREI) but this is currently in preview under Early Adoption Program (EAP).
Announcing the “Azure SQL Database External REST Endpoints Integration” Early Adoption Program

SSRS on Azure SQL Database Why its not supported?

I came across one issue that I cannot create SSRS databases on Azure SQL Database, netiher I can use the migrated databases of report server in the SSRS Config manager, can anyone explain why is this a limitation and something like Managed Instance or Azure SQL VM is needed in this case?
Is there no other way of configuring Azure SQL Database with SSRS?
Azure SQL database didn't explain why SSRS is not supported in Azure SQL database.
I think the reason the that Azure SQL database is PAAS and different between IAAS: Azure MI and SQL server in VMS:
And for now, there is no way to configure SSRS for Azure SQL database. SQL database product team confirmed this. Ref this feedback:
"Thanks for your feedback here. You can do SSRS today in an Azure VM.
I’m closing this as we have no plans in SQL DB to significantly grow
it’s scope to SSRS."
If you still want to SSRS, you need to choose Azure SQL managed instance or SQL Server in VMs.
HTH.
I think that you can pick a Azure Virtual Machine and then get things done by yourself, from scratch.
Or you can create RDLC and run them inside a web application, using Azure Database as data source.

Find Azure SQL replication problems through an API?

We are using Azure SQL as our database across multiple regions, with one primary and multiple secondaries.
The scenario is, we want to find if there are any active replication problems through some sort of API call / so we can integrate this into our overall environment.
Is there an Azure Management API / or SQL query we can run and build an API on top of - so we can some result like replica DB X is having problems and the data is outdated?
Azure doesn't have an API for this yet. But you should be able to build APIs on top of the views.
There are out of box views 'sys.dm_database_replica_states' and 'sys.dm_db_resource_stats' provided on Azure SQL Database that could be used for your requirement. However, I would recommend you to go through the below link and choose them appropriately:
https://learn.microsoft.com/en-us/azure/azure-sql/database/read-scale-out#monitoring-and-troubleshooting-read-only-replicas
https://learn.microsoft.com/en-us/azure/azure-sql/database/read-scale-out#data-consistency

What extra one gets by selecting Azure SQL Managed Instance vis-a-vis Azure SQL DB PaaS

I would like to know what extra benefits one get by choosing Azure SQL Managed Instance compared to Azure SQL DB PaaS. I know SQL Managed Instance is offered as a vCore based purchasing model only. Apart from this what is the extra add on and benefits that one gets over the other. Any reply would be appreciated.
With Azure SQL Managed Instance, you essentially get a full fledged SQL Server that you can control any way you want, just like you would control a locally configured SQL Server. All the power and access and customization you want.
With, Azure SQL DB PaaS, you are essentially getting a database service, so, you give up a lot of control.
For example, take server collation. With the database service, SQL_Latin1_General_CP1_CI_AS , is all you get. With the Managed Instance, its your server. So, go ahead and select whatever collation you want, just like how you would select the collation at the time of creatoin.
Another issue is with auditing, if that is something that is important to your setup. with SQL Managed Instance, auditing happens at server level, because, you are getting the full database server. With the database service, it only database, because, you are only getting a database.
These are just the main details that I found. more details here at this Azure doc - https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison
Of course, Managed is going to cost you more because you are paying for the license of the SQL server too.
Lastly, for me, this is the almost (not the exact same thing) like you running your own File Server on a Windows VM on Azure (Managed Instance) versus, just using Blob Storage. In both cases, you are just trying to store some files, but its how much control you have.
I would say think about Azure SQL DB vs Azure SQL Managed Instance (MI) as
Azure SQL DB = Resources dedicated to individual DBs like a container. They are grouped under a Azure SQL Server but that SQL Server is just for grouping.
Azure SQL MI = Almost same as on-prem SQL Server except you don't have to worry about OS, backups, high availability.
Here is a good comparison.
https://learn.microsoft.com/en-us/azure/azure-sql/database/features-comparison
Hopefully this will help
Azure SQL Database - The usual PaaS way. You have vCore, DTU, and Serverless billing mode. And Elastic pool support.
Azure SQL Managed Instance - Similar as below. When you want to use instance-scoped features of Azure SQL Managed Instance like Service Broker, CLR, SQL Server Agent, and Linked servers. As if you have an SQL Server on premise, Azure is responsible for patching, upgrading version etc.
SQL Server on Azure Virtual Machines - Similar as above. But you are responsible for OS and SQL server upgrade.

Resources