User master database from Azure Data Warehouse

241 Views Asked by At

I have procedures in my Azure Data Warehouse that need to create other Azure Databases, then populate them with data from the DW. Is there way for a stored procedure in an Azure Data Warehouse to create a separate Azure DB? Then possibly create tables and populate them in that newly created Azure DB?

2

There are 2 best solutions below

3
On BEST ANSWER

You can't create sqldatabase from storedprocedures ..even if they are in same server..Here we are dealing with two different logical servers(DW and SQLdatabase)

2.For the insertion part,you can try cross database queries ,but cross database queries from azureDW to SQLAzure database is not supported..

Few options,i could think off..

Create a windows application,which does the below
1.create a sqlazure database ,if not exist
2.create tables in SQLdatabase,if they don't exist
3.finally read the data from SQLDW and insert it into SQLdatabase

0
On

For efficient data transfer between the two databases, you could use SqlBulkCopy. The same code could create the database and tables.

For scheduling this you could use something like Elastic Database Jobs.