How to move dataset from Azure Managed Instance to Azure SQL using SSIS with change data capture - azure

How to move data from Azure Managed Instance to Azure SQL Database by using SSIS package with Change data capture feature in it?
Please help me with links or documents.

Good news, CDC was implemented for Managed Instance and Azure SQL Database as per yesterday:
"Change data capture (CDC) records insert, update, and delete activity that applies to tables in SQL Server, Azure SQL Managed Instance or Azure SQL Databases [...]"
You can see some common scenarios in this video.

Related

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

I need to push data from various select statments to Azure SQL Database, best way to do so?

I have some T-sql scripts which generate some data and we manually update them into the excel spreedsheet, we need a way to push this into azure sql database, from a job so that we can access them from there and remove the manual process of uploading the information to the azure sql database every time. What is the best way to do this?
I assume you are trying to move data from an on prem server to Azure. The simplest method may be Azure Data Sync.
You could load your data from your queries into an on prem table which syncs to Azure.
On all your SQL Server instances, you can create a Linked Server to one Azure SQL Database. Once the linked server is created you can directly insert on Azure SQL Database from your on-premises SQL Server instances.
Here is how you create the Linked Server.
Below image shows how you insert data on Azure SQL Database using the linked server.
For detailed steps, you can visit this tutorial.
I think you can think about Azure Data Factory.
Azure Data Factory Copy Active can help you use T-sql scripts to move data to another Azure SQL database.
For more details, please the Azure tutorial:Copy multiple tables in bulk by using Azure Data Factory.
When the pipeline created, you can trigger and monitor the pipeline runs.
Trigger the pipeline on a schedule:
You can create a scheduler trigger to schedule the pipeline to run periodically (hourly, daily, and so on). In this procedure, you create a trigger to run every minute until the end date and time that you specify.
Please see: Trigger the pipeline on a schedule.
This can help you push the data to Azure SQL Database automatically.
Hope this helps.
you can try the SSIS package? which automates the process of data upload data into azure sql database.... i have not used ssis for Azure but to sink data from csv/xls/xlsx into ms sql server database,,I refered this article which can be helpful in anyway

Azure data sync from Azure Db to Azure DWH

I am trying to perform a replication using Azure data sync between an Azure sql database and an Azure SQL Data Warehouse. I have a table with a primary key, identity (1,1). When i try to perform the sync, I receive an error saying something related to a syntax error around "PRIMARY". Is this issue related to how pk's are managed in azure data warehouses or, simply said, this kind of replication is not supported?
SQL Data Sync synchronizes data between SQL Azure Databases and SQL Server instances only. SQL Azure Data Warehouse is not supported.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-sync-data
Hope this helps.
Regards,
Alberto Morillo

How can we handle Update and Delete in Azure data management gateway

Currently, we are mirroring our local SQL server Database with Azure SQL Server Database. For this, we are using Azure Data Management gateway but the problem is we are not able to handle the update or delete scenario. Update and Delete are not reflecting in Azure SQL Server database(Mirror).
Thanks.
What type of activity are you using in your pipeline? I'm assuming a simple copy activity?
My suggestion would be to have a copy activity that lands a clone of the on premises data in the Azure SQL DB first, maybe in a staging schema set of table or something. Then have a second downstream activity that performs a stored procedure execution activity. You can code a MERGE statement or whatever in the procedure to output the data into a separate table.
It sounds like you almost want a secondary node for your SQL Server in Azure. Maybe just use an availability group?! SQL 2014 or higher required on prem though.
You can also take a look at Transactional Replication to Azure SQL database, with transactional replication, Azure SQL database acts as a subscriber, update/delete changes you made in on-premises SQL Server database will be reflected in Azure SQL database.

Upload SQL Database and its Data to Azure

I created an SQL database using ASP.NET Core 1.1 Migrations.
After I created the database I added some data to the database.
What options do I have to upload this database to Azure?
I need to send the Scheme and the initial data.
Is it possible to run Entity Framework migrations on Azure?
This article describes the possibilities to migrate an existing database to SQL Azure.
https://learn.microsoft.com/en-us/azure/sql-database/sql-database-cloud-migrate
However, in your scenario, this might be overkill to go through the steps of realy doing a migration.
If your number of tables and data is rather small, why not create a SQL script to create the tables & insert the data?
Connect to your SQL Azure using SQL Server Management Studio and execute the script.
As for the Entity Framework, yes, you can run those on SQL Azure as well.

Resources