Azure Powershell - SQL Query

Hello there!

I'm new to Cloud Azure and am doing a unit on it at university.

My inquiry is very basic. Mostly I would just like to know where I can find some good resources on scripting to manipulate a SQL database on a Cloud service using Azure Powershell.

Searching online seems to bring me in a loop back to the basic commands like Get-AzureSubscription and etc., but to push myself in this module I need to manipulate variables.

Does anyone know of any good resources to get started with this? For the moment I want to find a way to check if a SQL database is running in my Azure platform using Powershell.

A pointer in the right direction would be very much appreciated!


New Edit 13/02/15:

Maybe something like the following would work?

Get-AzureSqlDatabase | Where-Object {$_.status -eq "running"}
#or
Get-AzureSqlDatabase | Where-Object {$_.status -like "running"}
#or
Get-Service | Where-Object {$_.status -like "running"}
February 13th, 2015 1:16am

Hi Angelo,

Please see the following for a Hello World PowerShell example for Azure SQL Database.  If you're interested in the C# version, please see the following Hello World C# example.

Free Windows Admin Tool Kit Click here and download it now
February 13th, 2015 8:59am

If you use the approach above (i.e., "Get-AzureSqlDatabase"), any database name that is returned is running, thus no need for the Where-Object clause.  Within Azure SQL Database, there is no concept of an inactive or "off" database.
February 14th, 2015 5:42pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics