Welcome!

Think first. Code later.

Adam Grocholski

Subscribe to Adam Grocholski: eMailAlertsEmail Alerts
Get Adam Grocholski via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Related Topics: Ubuntu Linux Journal, SEO Journal, Azure Cloud on Ulitzer

Blog Feed Post

Azure CLI Day 45 – sql server create

bash-azure

In my most recent set of posts in this series I showed you how to use the Windows Azure cross platform command line tools to manage a Windows Azure Mobile Service. I’m now going to change focus and look at how you can use the cross platform command line tools to manage a SQL database. I’ll start by showing you how to create a SQL database server.

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 server create -h

Screen Shot 2013-10-23 at 2.07.12 PM

The azure sql server create command is the command to use to create a SQL database server. There are several parameters/options to specify:

  • —administratorLogin. The administrator’s login for the SQL database server.
  • —administratorPassword. The administrator’s password for the SQL database server.
  • —location. The location where the SQL database server should be created.
  • —defaultFirewallRule. Adds a rule to the SQL database server allowing access from Windows Azure.

To create a server in West US, enter the following into your CLI, substituting where appropriate:

azure sql server create —defaultFirewallRule ‘[YOUR ADMIN NAME]‘ ‘[YOUR ADMIN PASSWORD]‘ ‘West US’

I used the following:

azure sql server create —defaultFirewallRule ‘adam’ ‘MY PASSWORD’ ‘West US’

Screen Shot 2013-10-23 at 2.14.33 PM

Once the command completes and the SQL database server is created, the name of the server will be in the output of the CLI. You can go to the Windows Azure Management Portal to verify the server has been created.

Screen Shot 2013-10-23 at 2.17.48 PM

That’s it for now. In my next post I’ll show you how to use the cross platform command line tools to list your SQL servers.

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.