Posts Tagged 'SQL Azure'

Cloud Computing Services and Alternatives

It’s common to categorize cloud computing as either Software as a Service (SaaS), Platform as a Service (PaaS) or Infrastructure as a Service (IaaS).  When we were moving to the cloud, it seemed more helpful to think in terms of the individual services and applications that we needed to provide our users.  Below is a list of the services we moved, or considered moving, to the cloud and the choices we evaluated.

Email Services
Managing an Exchange or other mail server is expensive, considering Google will do it for next to nothing. Google Apps for Business provides 50 mail accounts using your domain name for free; beyond 50 accounts, Google will charge $50 per user per year.  At a similar cost, Microsoft offers Exchange Online.

Document Sharing and Collaboration
SharePoint is a fantastic program and a huge success for Microsoft.  You might not have to install your own instance though.  Microsoft will host SharePoint for you for around $5 per user per month. Check out SharePoint Online to see how it works.  Google offers services similar to SharePoint using Google Calendars, Google Groups, and Google Sites.

Office Applications
If you choose Google for document sharing and collaboration, you might also like Google Docs for documents, spreadsheets, and presentations.  If you prefer Microsoft Office, check out Microsoft Office Live, which offers online storage and online versions of Word, Excel and PowerPoint similar to Google Docs.

Customer Relationship Management (CRM)
Salesforce.com began as CRM in the cloud and has expanded from there.  There are also hosted versions of Microsoft Dynamics CRM and SugarCRMIn the end, we chose to host SugarCRM Community Edition on our own virtual server using Amazon EC2.  See my prior post, Saving Money Using the Cloud and Open Source Software.

Database Services
If you need a relational database and like SQL Server, check out SQL Azure.  You can have a database up and running in seconds.  It will cost you about $10 per gigabyte per month.  Amazon Relational Database Service is an alternative based on MySQL, and costs as little as $500 per year.

Storage
If you need massive amounts of disk space, Microsoft, Google and Amazon all have cloud offerings.  Check out, Windows Azure Storage, Amazon Elastic Block Store, Amazon Simple Storage Service, and Google App Engine.

Application Hosting
If you’re a .NET, PHP or Java developer, Microsoft Windows Azure provides a complete infrastructure for deploying your applications.  Azure is a massively scalable, zero-administration platform based on Windows Server 2008.  It provides Web hosting and much more, including storage, load-balancing, elastic scalability, authentication services and integration with you local network.  Google App Engine offers services similar to Azure and includes APIs for Python and Java developers.  It’s even free up to a certain number of requests per month.

Servers
Sometimes it’s more cost-effective to deploy an application on your own server.  That doesn’t mean you have to buy a physical machine though.  Amazon EC2 allows you to spin up Linux or Windows virtual machines in minutes.  The cost of a Windows server is as little as $109 per year and you don’t need any hardware.

If you want to learn more about cloud computing, come to one of Learning Tree’s cloud-computing courses.

Doug

Why Are So Many Microsoft Developers In the Dark about Azure ?

I recently taught the Learning Tree ASP.NET MVC course. This framework is really elegant and was enthusiastically received by a group of 15 .NET developers. When we came to discuss deploying MVC applications I mentioned that Cloud Computing could provide a cost effective environment for testing and deployment of not just MVC applications but all .NET Web applications. As the discussion progressed and I mentioned Microsoft Azure I was really surprised to discover that not one of the 15 attendees had heard of or knew anything about Microsoft Azure. This got me thinking – was it the experience level of attendee that contributed to this lack of awareness(i.e. new to .NET development) or is it that Microsoft are failing to get the message across to their development community about Azure ?

On closer analysis only 2 of the 15 attendees were relatively new to .NET development, the rest had a least 2 years .NET programming experience. So why had they not heard of Azure ? Whilst Microsoft have made a strong marketing push on Azure it is clear it is not reaching a large section of their development community. There could be many reasons for this – and I am purely speculating here, because of things such as

  • Is their hardware infrastructure currently large enough to support a large number of deployments ?
  • Is their Azure software and toolset currently robust enough to support a large number of deployments ?
  • Does the cloud computing revenue model leave Microsoft disadvantaged compared to selling software server licenses ?

Or it may be none of these and that I have such a small sample size that it is has no meaning although I believe it does have meaning. It may also be that Microsoft is building its Azure user base in a controlled manner whilst it verifies its infrastructure.

From my experience of Azure I can state with certainty that

  • It works
  • A lot of the features are really neat and incredibly useful e.g. provisioning a SQL server instance in less than 60 seconds
  • There is room for improvement – e.g. application deployment time, deploying plain ASP.NET and MVC applications

The recent announcements by Microsoft of the deal to work with eBay and also the private cloud offering show Microsoft have a strong commitment to Azure. It will be interesting to see how their marketing strategy gains momentum over the coming months to reach a wider audience in parallel with the increase in functionality of their cloud computing offering. If you are interested in learning about Azure and how it compares to other cloud computing offerings such as Amazon EC2 it is worth considering the Learning Tree Cloud Computing course. Alternatively, for an in depth knowledge of what Azure has to offer and how to exploit this for your organisation take a look at the excellent Azure course.

Chris

Amazon’s Relational Database Service (RDS)

Okay, I admit it. I come primarily from a Microsoft background. I have been using Microsoft tools and technologies for most of my professional career. While they are certainly not perfect they are pretty darn good. I have come to have a certain level of comfort and familiarity using them. Indeed there are many organizations in the world that have real, working, business-critical solutions deployed on Microsoft platforms.

The cloud certainly does make different technologies and platforms accessible. For a minimal investment a developer can provision machines with platforms and software that may be unfamiliar. This allows for real, hands-on experience and in depth looks at many different platforms and approaches.

We have, in past posts, looked at Microsoft’s SQL Azure. Today we will look at Amazon’s Relational Database Service (RDS). This will allow us to compare and contrast the two offerings.

Amazon RDS is MySQL running on a machine provisioned in the Amazon cloud. The RDS can be accessed from an EC2 instance or from other machines not running on EC2. It is also possible to run MySQL on your own EC2 instance. Many AMIs come pre-bundled with MySQL or you could install it yourself. We are going to just consider here the RDS service, though, which offers several advantages over running MySQL on your own instance.

For one, the server software is managed for you. That means that the software is patched and kept up to date by Amazon. It is also very easy to schedule backups on RDS. In short the RDS approach reduces the administration and overhead. It is also possible with RDS to modify the settings on a live deployment. This allows you to scale both your instance and your database size on the fly in response to your application’s requirements.

We can compare Amazon RDS and SQL Azure on price and features:

 

Amazon RDS

SQL Azure

Minimum Database Size

5 GB

1 GB

Maximum Database Size

1 TB

50 GB

Minimum Cost per Month (5 GB database)

$80

$50

Replication?

extra cost

yes, 3x

Change size of live database?

yes

yes

Change machine size on live instance?

yes

no

Table 1 Amazon RDS to SQL Azure Comparison

This screencast walks through the process of provisioning an RDS instance. We then connect to that instance using MySQL Workbench which is freely available from the MySQL website.

In summary, Amazon RDS is a compelling offering for applications that require a relational data store in the cloud. It offers many of the same features as SQL Azure and can support larger databases. By architecting your application with a clear separation of the presentation, business and data tiers you will be in a position to choose the right storage solution for your application and to minimize vendor lock-in.

In Learning Tree’s Cloud Computing Technologies: A Comprehensive Hands-On Introduction (course 1200) we take a look at both SQL Azure and Amazon RDS. We also consider other storage options available in the cloud.

Kevin

Migrating a SQL Server Database to SQL Azure

As a follow on to my colleague’s recent excellent post I thought that this week I would present a practical, hands-on example of moving a real-world on-premise SQL Server database to SQL Azure.

There are at least three ways to migrate data into SQL Azure:

  1. SQL Script
  2. Bulkcopy (bcp)
  3. SQL Server Integration Services (SSIS)

Each has benefits and limitations. Don’t use the script option to move very large data volumes, for example.

Here we are going to take an approach based on kind of a combination of 1 and 3. We will script our database schema and then use SSIS to replicate the data to the cloud. Since there are some features in SQL Server 2008 that are not supported in SQL Azure we will have to do a little hand work to modify the code that is generated for us. We can minimize that hand work if we make some changes in the default options the wizard gives us before we generate the script.

Here is what I had to do:

  1. In SQL Server Management Studio, right click the on-premise database  
  2. Choose Tasks | Generate Scripts  
  3. Change the default options so that
    1. ANSI Padding = False
    2. Convert UDDT to Base Types = True
    3. Set Extended Properties = False
    4. USE DATABASE = False
  4. Delete all the stuff having to do with creating the database, etc. I have already created the database in the SQL Azure Developer Portal. 
  5. Delete the unwanted or unsupported features. In my case these included:
    1. SET ANSI_NULLS ON
    2. SET ANSI_NULLS OFF
    3. ON [PRIMARY]
    4. NOT FOR REPLICATION
    5. PAD_INDEX = OFF, (
    6. WITH ( …
    7. TEXTIMAGE
    8. NONCLUSTERED
  6. I moved some things around in the code so that tables were created before views, etc. Stuff like that just seemed to make sense to me. You also have to move the creation of things that other things depend on higher up in the code.  
  7. I went through an iterative process of running the code, examining the errors, making changes, and running the code again. Yeah, it is a lot of code. It took me about 30 minutes to get it right. Your time may vary.

Once the schema exists on SQL Azure it is straightforward to replicate the data with SSIS. The wizard pretty much takes care of everything!

Click here to view the screencast:

http://www.youtube.com/watch?v=SW3TcF4W1Ws

Okay, so perhaps it is a little more tedious than one would like. Somebody has to actually look at the code. That, I think, is part of the developer’s job. Yes, maybe it should be easier and maybe someday it will be but for now it is what it is. There is an interesting project on CodePlex that attempts to further automate this process. I recommend that you check it out.

If you get a chance, try this out yourself! Then consider attending Learning Tree’s Windows Azure Course!

Happy migrating,

Kevin

 

The Problem with Moving to the Cloud is Everything Works

I’ve had this customer for about 15 years and they are the perfect candidate to move to Windows Azure.

They are a small business.  Most of the employees are either on the road or working remotely.  Other than the few office workers, everyone is already accessing the data online. 

There’s no dedicated IT staff managing servers.  I’m pretty sure the backups would… well pretty sure.  Security is OK… I think.  I don’t think I’d call anything we do “patch management”, but somehow things are kept up to date.  Nothing we do is really “managed” (there’s a positive).

Our servers are old. When I look at all the dust I think, “Wow, those servers are old”.  So we have to spend some money soon.

We use a SQL Server for all of the data, and I know moving to SQL Azure will not be a big deal.  Compared to the cost of a new server, it’s a bargain.  Heck, the data would even be replicated.

A lot of our development is done in .NET, so for those programs migration would be easy. 

Of course, there is this thousand pound gorilla in the room – that’s the program the office staff uses.  It uses the SQL Server for the data, but the UI was originally written in Access version 2 back when I was a young programmer (let me pause to reminisce………..).  It has been migrated to every version of Access since.  Amazingly, it still works.  We know it has to be rewritten. It’s just one of those things. I’m sure you know what I mean.  The incredible thing is, even if we move to SQL Azure that old program will still work.  It’s just a different connection string. 

Once the data is in SQL Azure, the changes to the .NET applications will be trivial.

I know in the long run moving to SQL Azure for the database and Windows Azure for application deployment is the right thing to do.

Which brings me to our biggest barrier to moving to the cloud.  Everything works now.  We could spend a few thousand dollars on new servers and software and installation.  Keep backing up the data like we’re doing (it might work you never know).  And we’re done.  The cloud would be better, but what we have is familiar. 

We’re going to move to the cloud over time because the advantages vastly outweigh the costs.  But like most things that are worthwhile, it’s not a trivial process.  I’ll keep you posted on our progress.

If you’re also trying to figure out how to move to the cloud, come to Learning Tree course 2602: Windows® Azure™ Platform Introduction.  In the long run moving to the cloud offers simplified administration and cost savings.  But first you need a plan and you can’t create the plan if you don’t know how it works.

Doug Rehnstrom

Creating SQL Azure Applications Quickly and Easily

I like tools. Tools are cool. Tools help you accomplish more in less time and with less effort. Tools help make hard topics like “cloud computing” accessible to mere mortals like myself.

Of course, to the purist, tools may be considered a bad thing. After all there is kind of a joy, a feeling of accomplishment, pride, or whatever, to be had after hacking out a particularly cool piece of code using only the command line. The same sorts of macho discussions have been the subject of water-cooler conversations for years. Remember when C programmers were considered “high level” by the machine language wonks?

Well, times have changed, and yet strangely remain somehow the same. That, however, is not the subject of this weeks’ post!

Today we are going to build a Windows Azure application from scratch. This application will use relational data stored in a SQL Azure database. We are going to build, test and deploy this application to the cloud in under 10 minutes. To accomplish this we will be using Microsoft Visual Studio 2010.

http://www.youtube.com/watch?v=r69ZxFgx9EI

So, what does this mean? Is the application a finished, polished deliverable product? Obviously not! However what we do have is a very good starting point from which we can go on to develop our application using the skills and tools that we are already familiar with. Did we need to learn some new things? Yes! But are they things that already fit into our understanding of how .NET applications are developed? Certainly!

In Learning Tree’s Window’s Azure Programming course we endeavor to hone your .NET programming skills to enable you to build and deploy applications to the cloud quickly and easily. You will learn how to take the skills you already know and apply them in this new paradigm called cloud computing. And you can do the same things, if you please!

Kevin

SQL Azure

The final storage option we will discuss is SQL Azure. As the name suggests, SQL Azure is a fully functional relational database in the cloud. It is part of the Windows Azure Platform. By design, SQL Azure will seem very familiar to anyone who has used SQL Server.

There are, however, some important differences between SQL Azure and SQL Server. For example, in the current implementation, a SQL Azure database can have a maximum size of 10 GB. Not all of the features of SQL Server are supported (including Spatial and CLR data types and backup/restore).

These limitations have prompted some criticism of the viability of SQL Azure. These criticisms may or may not be valid. It is always important to consider everything in the context of your requirements and the various trade-offs that exist.

I believe that two things are true:

  1. SQL Azure in its current implementation is pretty impressive.
  2. The capabilities of SQL Azure are only going to improve over time.

So, limitations notwithstanding, SQL Azure is a compelling offering that may make sense in a variety of use cases. For one, SQL Azure can become a low maintenance alternative to a small on-premise departmental database. If the database does not make use of unsupported features then it is often a simple matter of changing a connection string in applications which use it. Applications which access SQL Azure can themselves be Windows Azure applications, plain old Windows applications, Web applications not running on Azure or indeed almost anything which might use a SQL Server back end.

Administration, reporting and migration is made relatively easy through the use of SQL Server tools such as Management Studio and Integration Services. Developers can leverage their knowledge of SQL Server and ADO.NET to (almost) painlessly transition to the cloud.

Figure 1. Using SQL Azure and SSMS 2008 R2

In our Cloud Computing Comprehensive Introduction course, Chris Czarnecki gives us an introduction to SQL Azure and shows attendees how to create and connect to databases hosted there. In our Windows Azure course, Doug Rehnstrom takes it deeper with more complex examples and coverage of synchronization.

Hope to see you there at a Learning Tree event soon – it is going to be a fun ride!

Kevin Kell


Learning Tree Logo

Cloud Computing Training

Learning Tree offers over 210 IT training and Management courses, including Cloud Computing training.

Enter your e-mail address to follow this blog and receive notifications of new posts by e-mail.

Join 53 other followers

Follow Learning Tree on Twitter

Archives

Do you need a customized Cloud training solution delivered at your facility?

Last year Learning Tree held nearly 2,500 on-site training events worldwide. To find out more about hosting one at your location, click here for a free consultation.
Live, online training
.NET Blog

%d bloggers like this: