Welcome!

Apache Authors: Kevin Benedict, Jayaram Krishnaswamy, David Smith, RealWire News Distribution, Alfredo Diaz

Blog Feed Post

Azure CLI Day 51 – sql firewallrule delete

bash-azure

In my three previous posts I showed you how to use the Windows Azure cross platform command line tools to:

In this post I’ll show you how to use the Windows Azure cross platform command line tools to delete a SQL database server firewall rule.

Once again, just a reminder that I’m using the command line tools on a MacBook Air with OSX (Mavericks) installed, and I’m using Google Chrome as my default browser. However, the experience should be identical on Windows and Linux as well.

Open an instance of your command line (Terminal, Bash, Command Prompt, etc.) and type the following:

azure sql firewallrule delete -h

Screen Shot 2013-11-09 at 3.16.19 PM

The azure sql firewallrule delete command is the command to use to delete a a firewall rule from a SQL database server. The following two parameters are required:

  • serverName – the name of the SQL server where the firewall rule resides.
  • ruleName – the name of the firewall rule to delete

Optionally, you can also specify the -q, —quiet option to suppress the confirmation prompt during the deletion process.

To delete a firewall rule, enter the following into your CLI, substituting where appropriate:

azure sql firewall rule delete -q ‘[YOUR SQL SERVER NAME]‘ ‘[YOUR FIREWALL RULE NAME]‘

I entered the following:

azure sql firewallrule delete -q ‘thbmcjr7xb’ ‘the internet’

Screen Shot 2013-11-09 at 3.26.11 PM

Once the command completes, you can verify the firewall rule has been deleted by using the azure sql firewallrule list command. Enter the following int your CLI, substituting where appropriate:

azure sql firewallrule list ‘[YOUR SQL SERVER NAME]‘

I used the following:

azure sql firewallrule list ‘thbmcjr7xb’

Screen Shot 2013-11-09 at 3.32.42 PM

That’s it for now. In my next post I’ll start focusing on how to managing SQL databases using the Windows Azure cross platform command line tools.

Did you know you can try Windows Azure for free for 30 days? Just go to http://aka.ms/thecloud and sign up.

Read the original blog entry...

More Stories By Adam Grocholski

Hey there! My name is Adam Grocholski, and I'm a Technical Evangelist at Microsoft where I spend time focusing on Windows, Windows Phone, and Windows Azure. I live in the frozen tundra of Minnesota and run thinkfirstcodelater.com. You can also follow me on twitter at @codel8r.