azure cli
23 TopicsEnabling Zone Redundancy on an Existing Azure SQL Database, Without Surprises
In the portal, zone redundancy is a single Yes/No setting. In production, there's a bit more to plan for. Microsoft describes enabling it as an online operation. That's true, but online still means a short disconnect, and your application has to handle it. This post is the checklist I'd go through before making the change on a database people actually depend on. What you're actually getting With zone redundancy on, your database uses availability zones to replicate data across multiple physical locations within a single Azure region. If one datacenter in the region goes down, your database stays up. It doesn't protect you if the whole region goes down. For that you need geo-replication or failover groups. Step 1: Check that you can enable it Not every combination of tier and region supports it: Service tier Where it's supported Premium All regions with availability zones Business Critical All regions with availability zones General Purpose Selected regions with availability zones Hyperscale All AZ regions, but only at creation time (see below) Check the current regional list right before you plan the change, especially for General Purpose. Regional support changes over time. Hyperscale is different. Zone redundancy support can only be specified during database creation and can't be modified once the resource is provisioned. To move an existing Hyperscale database, you'll need to transfer the data with database copy, point-in-time restore, or geo-replica, and then point your connection strings at the new database. Plan that as a separate migration, not a settings change. Elastic pools: enabling zone redundancy support for elastic pools makes all databases within the pool zone redundant. Make sure everyone who owns a database in that pool knows about the change. Step 2: Test your retry logic before the change You can't configure this part in Azure. For Premium, Business Critical and General Purpose, enabling zone redundancy is an online operation with a brief disconnect. Microsoft's guidance is that if you have implemented retry logic for standard transient errors, you won't notice the failover. The catch is the "if." Before the change, confirm that: Your apps retry transient connection errors with bounded exponential backoff, not endless instant retries Long-running transactions and batch jobs can be restarted safely Connection pools recover on their own, without anyone restarting the app A quick way to test is to run a small client against a disposable database that you scale or update while it's connected: $maxAttempts = 5 for ($i = 1; $i -le $maxAttempts; $i++) { try { Invoke-Sqlcmd -ServerInstance "<server>.database.windows.net" -Database "<db>" ` -Query "SELECT GETUTCDATE()" -AccessToken $token -ErrorAction Stop Write-Host "Attempt $i succeeded"; break } catch { $delay = [math]::Min([math]::Pow(2, $i), 30) Write-Host "Attempt $i failed, retrying in $delay s" Start-Sleep -Seconds $delay } } If your real application wouldn't get through that kind of interruption, fix that first. Step 3: Plan the window Even though it's online: Pick a quieter period. Busy workloads and long-running transactions make the disconnect more noticeable. Don't promise exact timings. How long the operation takes depends on database size and regional conditions. Tell stakeholders to expect a brief disconnect, not "X seconds." Change one thing at a time. If you use geo-replication, plan the primary and the secondary as separate, deliberate steps, and don't combine this change with a tier change or other maintenance. Tell people. Let app owners and on-call staff know the window, even when you expect no visible impact. Step 4: Make the change In the portal, go to Compute + Storage, set Would you like to make this database zone redundant? to Yes, and select Apply. Or script it: Set-AzSqlDatabase -ResourceGroupName "<rg>" -ServerName "<server>" -DatabaseName "<db>" -ZoneRedundant az sql db update --resource-group "<rg>" --server "<server>" --name "<db>" --zone-redundant While it runs, keep watch on the operation status in the portal and on your own application's connection-error logs. Step 5: Verify it worked Don't treat the completion notification as proof. Check the property directly: az sql db show --resource-group "<rg>" --server "<server>" --name "<db>" --query zoneRedundant Then confirm from the application side that error rates are back to normal and that no jobs failed quietly during the change. Step 6: Have a rollback plan You can turn zone redundancy off again with the same setting or --zone-redundant false. Write that down in the change record anyway, along with who decides to roll back and on what criteria. A simple change-record template Item Notes Tier and region supported? Verified on [date] Retry logic tested? Test result / link Change window Date, time, duration estimate Stakeholders notified Who and when Verification steps Property check + app health Rollback trigger and owner Criteria and name The short version Turning on zone redundancy is easy. Being ready for it is the real work: confirm support, test your retries, pick a sensible window and verify the result. Do that, and most of the time nobody will notice the change. Reference: Enable zone redundancy for Azure SQL Database - Azure SQL Database | Microsoft Learn104Views0likes0CommentsProposal: Azure Portable Edge Nodes for Programmable Tool Security
Dear Microsoft Team, I propose an advanced architecture: Portable Edge Micro-Gateways for Third-Party Programmable Tools, extending Zero Trust security to hardware. Key Features: Portable Edge Nodes: Local micro-gateways delivering zero-latency execution and full offline (air-gapped) resilience for lab tools. IP-Safe Encryption: Granular hash-based tracking protecting manufacturers' code privacy. Instant Cloud Recovery: Automated tamper detection and pristine-state rollback synchronized with Azure. This creates a resilient, high-security ecosystem bridging local control with cloud intelligence. Contact: email address removed for privacy reasons Best regards80Views0likes0CommentsSigning in to Microsoft Foundry from OpenClaw using Azure AD: a smoother way to bring your models in
This post is a quick update to walk through the new flow. If you read the previous one, think of this as the easier path I wish I had the first time round. If you have not seen the original, you can find it here: Integrating Microsoft Foundry with OpenClaw: Step by Step Model Configuration | Microsoft Community Hub Pre-requisite: You will need the Azure CLI (azure-cli) installed on your machine. The official install guide for Linux is here: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest I am on Linux so I went the Homebrew route, which keeps things simple. The formula is here: https://formulae.brew.sh/formula/azure-cli Microsoft also has official docs covering the Homebrew/Linuxbrew install: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest#install-with-homebrew Once Homebrew is ready, run this in your terminal: brew install azure-cli Why this matters: Before this update, every Foundry model you wanted to use in OpenClaw needed its own API key and endpoint pasted into the config. It worked, but it was tedious, and keys are easy to leak if you are copying them around. The Azure AD path solves both problems. You authenticate as yourself (or a service principal), OpenClaw asks Azure for the list of Foundry resources you have access to, and it brings the models in automatically. Signing in to Microsoft Foundry from OpenClaw via Azure AD A device-code OAuth handshake replaces the old static-API-key flow. OpenClaw delegates auth to the local Azure CLI; the CLI handles the browser-side sign-in, holds the resulting tokens, and refreshes them silently. OpenClaw then walks the Azure resource graph, subscriptions → Foundry resources → model deployments and registers each model into its own config. No API keys move through OpenClaw at any point. Sequence diagram of the OAuth 2.0 device-authorization flow as orchestrated by OpenClaw. Phases 1–3 establish identity (the developer authenticates once, in a real browser, against Azure AD). Phases 4–5 perform service discovery (OpenClaw walks the ARM resource hierarchy, subscriptions → Foundry accounts → model deployments and persists the result to a local provider config). After registration, every model call OpenClaw makes against Foundry reuses the same Azure-CLI-managed token cache: tokens refresh transparently, and access is gated by the Foundry resource's RBAC assignments rather than a static API key. Dashed lines denote return values; the teal line in step 7 marks the single token-issuance event the rest of the system pivots on. Walking through the new flow: Start with the command to onboard openclaw as if you were setting up OpenClaw for the first time: openclaw onboard Kick things off with the OpenClaw onboard command, the same one you would use when setting up OpenClaw for the first time. When it prompts you, choose update values. Next, you will be asked to configure your models. Scroll down a little and you will see Microsoft Foundry listed as a supported provider. Pick it. From here, you have two options. You can sign in with an API key, which is what I covered in the previous blog post, or you can sign in through Azure AD. The Azure AD path is easier and more secure, so that is the one we will use. OpenClaw will give you a URL and a device code. Copy the URL into your browser and use the code to complete the sign in. (This is where the az CLI from the pre-requisite section earns its keep.) If everything worked, you should see a success prompt similar to this: Once you are signed in, OpenClaw will ask you to pick the Azure subscription that your Microsoft Foundry resource lives in. Pick the subscription, then pick the Foundry resource where your models are deployed. And that is pretty much it. All the models you have deployed to that Foundry resource get pulled into OpenClaw automatically. Compared to the old way of pasting API keys and endpoints one by one, this is a huge time saver, and you do not have to babysit any keys. From here you can start using your Foundry-deployed models inside OpenClaw straight away: Wrapping up The Azure AD sign-in option in OpenClaw is one of those small updates that quietly removes a real pain point. If you have ever juggled multiple Foundry endpoints and rotated keys across them, you already know why. With this flow, you sign in once, your models show up, and you can get back to actually building. If you have not tried OpenClaw with Microsoft Foundry yet, this is a good time to give it a go. And if you were holding off because of the key management overhead, that excuse is gone now. References Previous post on integrating Microsoft Foundry with OpenClaw using API keys: Integrating Microsoft Foundry with OpenClaw: Step by Step Model Configuration | Microsoft Community Hub Install the Azure CLI on Linux: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-linux?view=azure-cli-latest Install the Azure CLI on macOS: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest#install-with-homebrew Homebrew formula for azure-cli: https://formulae.brew.sh/formula/azure-cli495Views0likes0CommentsHow do I use Azure Data Studio with schemas?
I had thought that a database schema was the name of the structure on which tables are interconnected by primary keys and foreign keys. But in the tool, Azure Data Studio, the user is asked to select from a pre-defined set of schemas when creating a table. What is more is that when setting up or createing a database through Azure, we are given the opportuniityh to use a sample database and this is where "SalesLT" comes from and so there must be some place where we can define a schema with Azure Data Studio. Where would that be? It was generated when deciding to use a demo sample database. So there must be some way, using SQL code or otherwise, to generate a schema.908Views0likes1CommentPrevent Accidental Deletion of an Instance in Azure Postgres
Did you know that accidental deletion of database servers is a leading source of support tickets? Read this blog post to learn how you can safeguard your Azure Database for PostgreSQL Flexible Server instances using ARM’s CanNotDelete lock — an easy best-practice that helps prevent accidental deletions while keeping regular operations seamless. 🌐 Prevent Accidental Deletion of an Instance in Azure PostgresPostgreSQL 17 In-Place Upgrade – Now in Public Preview
PostgreSQL 17 in-place upgrade is now available in Public Preview on Azure Database for PostgreSQL flexible server! You can now upgrade from PostgreSQL 14, 15, or 16 to PG17 with no data migration and no changes to connection strings—just a few clicks or a CLI command. Learn what’s new and how to get started: https://aka.ms/pg17-mvu We’d love to hear your thoughts—feel free to share feedback or questions in the comments! #Microsoft #Azure #PostgreSQL #PG17 #Upgrade #OpenSource