Azure Elastic DB - Modify schema in each shard

1.2k views Asked by At

I'm new to the Elastic DB Feature from Azure and it looks really awesome. But what i could not find is how you can update the schema of all shards. So if i have multiple Shards and i want to add/remove a Column, Table or just add/remove a Stored Procedure.

Well all Shards are Databases which i could access and modify one by one but is there no way to publish schema changes to multiple shards at once?

2

There are 2 answers

0
JuneT On BEST ANSWER

if you don't mind playing with a preview, have a look at SQL Database Elastic Jobs which would allow you to execute scripts across SQL Databases.

0
Debra Dove On

it would be great if you can try Elastic Database jobs. I have just posted a PowerShell example which provides the e2e experience of managing large numbers of Azure SQL Database databases at once.

The Elastic Database jobs feature (preview) enables you to reliably execute a Transact-SQL (T-SQL) script or apply a DACPAC across a group of databases including a custom-defined collection of databases, all databases in an Elastic Database pool (preview) or a shard set (created using Elastic Database client library.

For more information and documentation, see Elastic Database jobs.