How to Manage Windows Azure SQL Databases with REST APIs

The Windows Azure SQL Database Management library comes equipped with features that enable you to manage your Azure SQL databases with optimum ease. Just like the remaining management libraries, this library grants you access to almost all the functionality that was available using Windows Azure Portal. Therefore, you can do as much automation against the SQL database and severs as required by writing the .NET code.
Crucial features that the new SQL library supports include creating, updating, deleting and listing your –

Windows Azure SQL servers
Windows Azure SQL databases
Windows Azure SQL servers Firewalls protocols

Windows Azure SQL Databases

It would not be wrong to say that almost all Windows Azure Cloud service providers have a good know-how of this new SQL library. As far as management is concerned, Windows Azure SQL Database can be managed using SQL commands, PowerShell and Windows Azure Management Portal. Besides using any or all of these for Windows Azure SQL Database management, you can also use REST API for that purpose. For this, you need to connect, authorize as well as execute REST API commands from your apps. Let’s take a look at how this is made possible.

Step 1 : Initially, this would require creating a management certificate and then uploading it to Windows Azure Management portal. As an administrator, initiate your Visual Studio 012 Developer Command Prompt. You can also start your Visual Studio 2010 Command Prompt for the same. Update <CertificateName> and run suitable command to get your X.509 v3 certificate.

Step 2 : Next step would be to login into the Windows Azure Management portal. Having logged in, you need to go to settings and then upload the certificate to Management Certificates section. Now export the certificate in PFX format and run certmgr.msc

Step 3 : Go to the Microsoft Management Console under the console tree. Next you need to expand Certificates and then Personal Click the certificate you need to manage in the details pane.

Step 4 : Point to All Tasks in the Action menu and click “Export”. Click “Next” as soon as The Certificate Export Wizard is visible. Now, click “Yes, export the private key” on the Export Private Key page. Click “Next”. Select “Personal Information Exchange – PKCS #12” visible on the Export File Format page and click Next.

Step 5 : Type the password used for encrypting the private key on the Password page and confirm the same. Click Next. Now, follow the wizard pages to facilitate certificate export in PFX format. This will allow you to add REST API calls in your app.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s