How to replicate Azure sql db in cross subscription - azure

Is there any way we want to replicate sql db in other subscription
To copy data from one subscription
to another subscription
The job should do incremental copy daily.

I do have bigger questions around why you'd want to do it across subscriptions. That aside, you could automate things via Azure Automation and Runbooks:
Export SQL DB to BACPAC from subscription 1 and save it to storage account in subscription 2 (https://learn.microsoft.com/en-us/azure/sql-database/sql-database-export)
Import BACPAC file in to sql server in subscription 2 (https://learn.microsoft.com/en-us/azure/sql-database/sql-database-import)
Another option to look in to would be Azure Data Factory (https://learn.microsoft.com/en-us/azure/data-factory/introduction). I'm especially fond of the Azure-SSIS integration in Azure Data Factory (https://learn.microsoft.com/en-us/azure/data-factory/tutorial-deploy-ssis-packages-azure).

SQL Data sync might be a good solution:
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-sync-data
I've only used to to sync between azure and on premise SQL:
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-get-started-sql-data-sync
But here is a PowerShell example configures Data Sync (Preview) to sync between multiple Azure SQL databases:
https://learn.microsoft.com/en-us/azure/sql-database/scripts/sql-database-sync-data-between-sql-databases

Related

Azure Serverless SQL server database backup/restore

I've created an azure **serverless ** sql database. It seems there is no way to backup/restore this type of databases. I know there is restore to a point in time feature, But I what to download and save database backups my self.
Is there a way to backup serverless azure sql databases?
1-) There is no Backup/restore option on the database right click
2-) I've tried to use BACKUP T-SQL with azure storage account and storage url from SSMS but this is not supported.
You can use the "export" functionality by accessing the specific database in your Azure Portal to get a copy of your DB.
You can rely on Azure SQL's integrated Backup funcionality by setting up your requirements by accessing your DB Server in you Azure Portal and selecting the "Backup" uption.
You can use SSMS (SQL Management Studio), right click on the DB in question, and select "Tasks" --> "Export Data-tier Application", which will return a .bacpac file with your database. NOTE: bacpac files are not quite the same as full .bak files. bacpac files are not aware of any transactions that may be being executed whilst the data is being dumped, which means that you could end up with some data corruption.
Export your database as bacpac to an Storage Account. We are using weekly exports of the database on Saturdays, with a retention of one year for long-term backups.
The export will trigger an auto-resume of the database if the database was auto-paused.
We use an Azure Automation account and a PowerShell script to schedule the export of the database. Here you will find the script and the steps needed to schedule the script using Azure Automation.

Database link for Azure SQL to Azure Synapse Anayltics Serverless SQL Pool

A client of mine needs to join tables from his Azure SQL financial data mart with external tables built upon a Data Lakehouse (Parquet files) in Azure Synapse Analytics.
I was wondering if it's possible to create a database link within a Azure SQL database accessing a Azure Synapse Analytics Serverless (on-demand) SQL Pool.
Yes, it’s possible open the Integrate hub, and select and add a link connection.
Select test connection and make sure to check whether SQL firewall rules are properly configured or not.
Reference:
Get started with Azure Synapse Link for Azure SQL Database (Preview) - Azure Synapse Analytics | Microsoft Docs

How to take a backup & Restore of Azure SQL table in Azure Blob storage and vice versa

I want to take an Archival(Backup) of Azure SQL Table to the Azure Blob Storage, I have done the backup in Azure Blob storage using via the Pipeline in CSV file format. And From the Azure Blob Storage, I have restored the data into the Azure SQL Table successfully using the Bulk Insert process.
But now I want to retrieve the data from this CSV file using some kind of filter criteria. Is there any way that I can apply a filter query on Azure Blob storage to retrieve the data?
Is there any other way to take a backup differently and then retrieve the data from Azure Storage?
My end goal is to take a backup of the Azure SQL table in Azure Storage and retrieve the data directly from Azure Storage with a filter.
Note
I know that I can take a backup using the SSMS, but that is not a requirement, I want this process through some kind of Pipeline or using the SQL command.
AFAIK, there is no such filtering option available when restoring the database. But, as you are asking for another way to backup and restoring, SQL Server Management Studio (SSMS) is one the most conveniently used platform for almost all SQL Server related activities.
You can use SSMS to access Azure SQL database using server name and Login Password.
Find this official tutorial from Microsoft about how to take backup of your Azure SQL Database and store it in Storage account and then restore it.

Azure SQL Deleted Database cannot restore because of region restriction

Is there any way to change the region for a Azure SQL server/database from one geographical region to another region?
I have a deleted database which I cannot restore as I get "MSDN subscriptions are restricted from provisioning in this region. Please choose a different region. For exceptions to this rule please contact Microsoft Support."
The Server was originally setup in US-West region with a VS MSDN Subscription.
To answer the ways to change region from Azure SQL database, there are mutiple options -
Configure active geo-replication for Azure SQL Database in the Azure portal and initiate failover
Copy an Azure SQL database
Export an Azure SQL database to a BACPAC file
Set up SQL Data Sync (Preview)
However, based on the error if there is limitation on specific region and you have strict requirement to have database in same region you may need to work with Azure support on it.

How to migrate from Azure Table storage to SQL Azure?

We use Azure Table storage in our project and we want to migrate to SQL Azure. Is there any simpler way to migrate ?
The simple way to move data from Azure Table Storage to SQL Azure is using Azure Data Factory. You can refer to the tutorials Build your first Azure data factory using Azure Portal/Data Factory Editor &
Move data to and from Azure Table using Azure Data Factory to know how to do it.

Resources