Mar 112014
 

Did you know that Oracle and Java were available on the Windows Azure?  Well, it’s true and the images have been available for some time now as previews in the Azure Virtual Machine gallery.

If you’ve invested into Oracle/Java on Azure, you’ll need to be prepared for increased usage charges as they go into “general availability” around the time of publishing this article.  Here is the official advice from Microsoft:

Oracle software on Windows Azure becomes generally available on March 12, 2014.

Your usage price may change as a result. Oracle software on Windows Azure becomes generally available on March 12, 2014.

Your usage price may change as a result. Oracle Database, Oracle WebLogic Server, and the Java development environment have been available, preinstalled on Windows Server images, since our announcement on September 24, 2013. These images, which include licenses for the Oracle software that they contain, are currently in preview in the Windows Azure Virtual Machines Image Gallery.

During the preview period, there has been no charge for the included Oracle licenses. If you have been running virtual machines based on these “license included” images, you have been charged only for the Windows Azure compute and storage resources that your virtual machines consumed.

This is a reminder that starting March 12, 2014, these images will enter general availability. At that time, the price will change to reflect the included Oracle software licenses. If you are running a Windows Server–based virtual machine on which Oracle software was preinstalled when you started it, you will be billed at the new higher rate beginning March 12, 2014, in accordance with your subscription agreement.

Continuing to run any “license included” Oracle virtual machines after March 11, 2014 will constitute your agreement to pay the new rates in accordance with your subscription agreement. If you desire to avoid Oracle software license charges, you will need to shut down all “license included” Oracle virtual machines prior to March 12, 2014.

To learn what the pricing will be for virtual machines that include Oracle software licenses, visit the Virtual Machines Pricing Details webpage on the Windows Azure website.

If you are on the free trial or on one of our member offers (e.g., MSDN, BizSpark, or Microsoft Partner Network), you cannot utilize your member benefits for the Oracle “license included” images. The Oracle license charges will be billed separately. Also, if you have your spending limit turned on, your subscription’s services will be stopped when we start charging for the included Oracle licenses on March 12, 2014. You can either turn off the spending limit or shut down your “license included” Oracle virtual machines within your subscription to prevent your service from being disabled.

On March 12, 2014, the preview agreement that governed “license included” Oracle images during the preview period will expire and will be replaced by a new general availability license agreement with Microsoft Open Technologies, Inc. as the new licensor of the Oracle software. Continuing to run any “license included” Oracle virtual machines after March 11, 2014 will constitute your acceptance of the terms of the new license agreement. If you do not agree to the new license agreement, you will need to shut down all “license included” Oracle virtual machines prior to March 12, 2014.

If you are running a virtual machine based on Oracle Linux that you started from the Windows Azure Virtual Machines Image Gallery, that virtual machine does not include a license for the preinstalled Oracle software and its price will not change on March 12, 2014. It is your responsibility to use the software installed on that virtual machine in compliance with Oracle licensing policies.

If you are running a virtual machine on which you installed your own copy of Oracle software, that virtual machine does not include a license for the Oracle software and its price will not change on March 12, 2014. It is your responsibility to use the software that you installed on that virtual machine in compliance with Oracle licensing policies.
For more information, visit the Oracle Software on Windows Azure webpage on the Windows Azure website.

Thank you,

Windows Azure Team

Jan 282014
 

So late last year I was having trouble trying to figure out why a web site I’d been writing wasn’t working once published to Windows Azure.  I can’t remember which library it was (JQuery.UI perhaps), but once published I was getting a lot of broken JS calls (“can’t load library”, etc).

After a call with a friend today, he enlightened me about a problem which has been documented over on Stack Overflow – when using bundling with ASP.net (MVC or WebForms).  A release build (or production publish) publishes minified versions (“release mode”), but if a library doesn’t have a minified version, the script is ignored altogether!

The solution would seem to be to create a second copy of the non-minified script and rename it to .min.js.  Let me know if this works (or doesn’t work) for you..

Original source:  (Stack Overflow) http://stackoverflow.com/questions/11980458/bundler-not-including-min-files

Nov 192013
 

Intro

If you have used or are deciding on using an Azure hosted SQL Server database, you might also want the ability to govern the identities and credentials used to access your data.

When you create a SQL Database in SQL Azure, initially credentials are created for you, but they allow you to access and govern the entire SQL Azure instance.  If you’d prefer to partition access to specific databases, how do you create and manage accounts?  I’ll walk you through it.

Tools

There’s two ways you can manage credentials with SQL Azure, you can connect using SQL Management Studio or you can use the Windows Azure management console (browser based). 

Each tool offers a slightly different value proposition – the browser based experience is a little slower and less intuitive, but can be accessed from anywhere without requiring SSMS to be installed.  SSMS gives you integration with SSMS projects and also provides for more advanced tools, like query parsing.

No matter which tool you use, you’ll need to use TransactSQL to manage server logins and database user accounts.  Let’s take a look at the T-SQL syntax you’ll need.

Managing Users – with T-SQL

SQL Azure unfortunately does not offer a graphical user interface for the management of logins and users.  This means you’ll have to revert to running T-SQL queries if you wish to manipulate credentials.

Create a Login

Logins are server wide accounts which use a simple username + password combination.

CREATE LOGIN testlogin WITH password='<APassword>’;

To create logins, you need to connect to the SQL Azure Database’s master database the administrative account(which is created when you create the initial SQL Azure database).  There are some restrictions on names you can use when creating logins, these are listed here: Login Name Restrictions.

Note that passwords are subject to certain complexity requirements.

Create a User

Users are created within the context of a single database and are linked to logins. You must connect to the database you want to create the user in, before running the following T-SQL:

CREATE USER testuser FROM LOGIN testlogin;

Managing Permissions

A user identity alone doesn’t grant any access or permissions, you’ll need to assign some permissions manually, once the user has ben successfully created.  We do this as we do with standard SQL Server, by assigning database roles, e.g the following grants read/write access to the named user account for the database in context.

EXEC sp_addrolemember 'db_datareader', 'testuser';

EXEC sp_addrolemember 'db_datawriter', 'testuser';

..and conversely, to revoke a permission:

EXEC sp_droprolemember 'db_datareader', 'testuser';

EXEC sp_droprolemember 'db_datawriter', 'testuser';

Remove a User or Login

To remove a user or a login requires the execution of a T-SQL drop statement.  To remove an unwanted login, use the following syntax on the master database:

drop user testuser;

drop login testlogin;

Note that if you are using SSMS to administer, the GUI gives you the usual options to remove/delete users via the Object Explorer, as you would with standard SQL Server.

Examples from Windows Azure’s Database Management Console

The easiest way to access SQL Azure is from the Azure Portal.  Authenticate using your Microsoft Account and then locate the SQL Database tab:

image

You want the Server (top, right option) and click on the server name.

image

From here, click on the dashboard option, and make note of points #1-#4, as illustrated above.  You can launch the management console by clicking on the link located at point #3.

image

Once it loads (can take a while) you need to enter the administrative login details (#2) and the correct password.  If you can’t remember the password, you can reset it from the portal (#4), but bear in mind anything using the current password will presumably break, since the login and password are used in conjunction for access via ODBC/SSMS etc.

Once you’ve authenticated successfully, click the “Select a Database” option on the top left hand side, and pick “master” (to administer logins) or select a database to manage users/permissions.

image

You’ll usually get an error, but this is OK, you just want to be in the master database context (see top left).

image

Click on ‘New Query’ and you can then execute T-SQL to create/drop logins.

image

Create Login

image
Drop Login

image

Create user (not in master database)

Examples from SQL Management Studio (SSMS)

Fire up SQL Management Studio (2008 R2, 2012, 2014) and with the Database Engine connect window, use the following:

Connect to SQL Azure

image

Note that you’ll need access via port 1433.  Don’t forget to authorise your origin IP address too!  Otherwise you’ll get this sort of error message:

image

You can grant access by IP address via the Azure portal, go to the server (as above) but click on the “Configure” option.  You can grant your current IP address easily enough.  Don’t forget to click on the Save option before leaving!

image

Managing SQL Azure

Once you have successfully authenticated/connected, you can manage both the SQL Azure master database and any custom databases fairly easily.  Note that you still need to execute T-SQL, but the SSMS option can generate the T-SQL for you:

image

You can also walk the Object Explorer to get to the Security branch, and manipulate the objects contained within.  Reminder: there’s no GUI support as there is with standard SQL Server.

Summary

Hopefully this is all the info you need to successfully manage logins and users in SQL Azure. 

Please bear in mind that Azure can change rapidly, these screenshots may not be valid at any point in the future.  this article was published in November 2013, and the instructions were valid at this time.

Further Reading

Adding Users to Your SQL Azure Database – http://blogs.msdn.com/b/sqlazure/archive/2010/06/21/10028038.aspx

Managing Databases and Logins in Windows Azure SQL Database – http://msdn.microsoft.com/en-us/library/ee336235.aspx