How to get SQL Database Status in Azure with Log Analytics - sql-server

I would like to show whether an Azure SQL database is online or not in an Azure Workbook.
Is this information available to resource metric/log analytics workspace so that I can show it in an Azure Workbook.
Could you provide me a hint?

There isn't a feature or function to check the Azure SQL database Status.
Once the Azure SQL database created, it will be alive or online all the time. Unless you manually delete or pause it(Elastic pool).
HTH.

Related

Audit who deployed SQL database to Azure

Through SSMS, connecting to my on prem server, you can right click a database, select tasks and "DEPLOY DATABASE TO MICROSOFT AZURE SQL DATABASE". Is there a way to log/audit who did this from my on prem server?
After doing this, I've checked the SQL Server logs and do not see any entries for this.
Thanks!
You should be able to investigate the logs using power-BI content pack refer below link.
https://powerbi.microsoft.com/fr-be/blog/monitor-azure-audit-logs-with-power-bi/
You can also use Azure Activity Log API to check the resource changes refer API link below for details - https://learn.microsoft.com/en-us/rest/api/monitor/activity-logs/list?tabs=HTTP

How to find who created a SQL Server in Azure Portal?

How to find who created a SQL Server in Azure Portal? I need to know the createdUserId of that particular SQL Server.
You can get the information from the Activity Logs which has information about the created user and so on.

Migrate SQL server to SQL Managed Instance

If I use one of the methods to migrate a SQL server instance with several databases into a Azure Managed Instance, would the procedure also replicate any login accounts with access rights?
Particular interested in knowing how this handles Active Directory accounts
From what I know, it doesn't and you cannot use Windows Authentication but only SQL Server Authentication or Azure AD. I've migrated several times a local database of my local SQL Server instance to Azure and I've done it using Export Data-Tier to .bacpac (this is the extension of the DB in Azure) and then deploying it (both actions from SSMS):
However, please be aware that you have to drop any users that use for authentication Windows Authentication because you'll get an error at the moment of deploying it since it cannot inherit your server's active directory settings. Then, you can define your own AD in Azure and use it.
Managed instance is a new deployment option of Azure SQL Database, providing near 100% compatibility with the latest SQL Server on-premises (Enterprise Edition) Database Engine.
The migration only support replicate the login.
You could get this from this document: Tutorial: Migrate SQL Server to an Azure SQL Database managed instance offline using DMS:
By default, Azure Database Migration Service only supports migrating SQL logins. To enable support for migrating Windows logins, see the Prerequisites section of this tutorial.
That means you must re-create all the users and grant it access right(database roles) manually.
Hope this helps.

Error Migrating SQL Server Database to Azure

So I am completely new to .Net Core development, and was given a codebase that I am trying to host on Microsoft Azure. I have the local database file (.mdf) in SQL Server Management Studio, and am trying to deploy it to an Azure Database, However it keeps failing during migration and giving me this issue
Error SQL71627: The element User: [ISOCENTRIC\Administrator] has property >AuthenticationType set to a value that is not supported in Microsoft Azure SQL >Database v12.
(Microsoft.SqlServer.Dac)
However, when I SELECT * FROM master.sys.database_principals; and it dumps the db users list, the "ISOCENTRIC\Administrator" user does not appear in that list, so I cannot find a way to drop it from the DB. Is there something I am missing regarding the location of this user and how I can drop it from the db so I can migrate to Azure?
p.s. This is my first post on here so please let me know if I should make any changes to adhere to correct formatting on this forum.
Thanks in advance.
I guess the database users can't be migrated to Azure SQL DB because they are Windows users. You'll need to drop those users before you deploy this database to Azure SQL DB.
You can always backup and restore a copy of this database, remove the users, and then deploy that one to Azure SQL Db.
I figured out that my query to dump the database users was incorrect, and was able to find and drop the user causing the issue.

Azure SQL database failover

We are looking at setting up a high availability solution for a web application using Azure.
Azure SQL database has the Geo-Replication options to sync data to secondary copies of the database in a separate region.
If there is a failure in the primary region does the Azure SQL database automatically fail over to the secondary or is this something that has to be
done manually or by a custom monitoring tool not provided by Azure?
Thanks for your help
Gavin
It is provided by Azure automatically
Reference:
https://azure.microsoft.com/en-us/blog/fault-tolerance-in-windows-azure-sql-database/

Resources