Book Image

Microsoft SQL Azure Enterprise Application Development

By : Jayaram Krishnaswamy
Book Image

Microsoft SQL Azure Enterprise Application Development

By: Jayaram Krishnaswamy

Overview of this book

SQL Azure is a database service in the cloud. Based on Microsoft’s Windows Azure platform, SQL Azure is well suited for web facing database applications. Are you interested in moving your business applications and data to the cloud but are not sure how to go about it? Look no further; this book covers all you ever wanted to know about taking your relational enterprise data to the cloud using SQL Azure. This book will show you how to manage SQL Azure using various tools and also guide you in developing enterprise applications and business intelligence solutions. It will take you through migration and synchronization scenarios with a variety of tools, help you in working with Microsoft technology still in incubation, and in leveraging hybrid applications that exist partially in the cloud and partially on the ground.This step-by-step tutorial begins by providing an overview of Cloud Computing, introducing you to the most significant Cloud Computing implementations. You will then learn the mechanics of signing up and obtaining an account on Microsoft Windows Azure and logging into the portal.The book then dives deep into SQL Azure, showing you how to provision a SQL Azure Server, and how to create/delete databases as well as set up Firewall rules so that you can access SQL Azure from tools/Client programs. It is then followed by details of how to access SQL Azure using Client and Server APIs.Other content includes, a comprehensive description of tools required to access SQL Azure and how to use them and how to populate and migrate SQL Azure databases using a variety of tools.Finally, the book will detail with examples, data-centric applications that leverage a mix of on-site data and Cloud based data, how to synchronize data and extend the applicability of SQL Azure data by disconnected applications on mobile media, and synchronize services for globally distributed data. After covering the topics of services which are in production, the book will then cover future developments as well as a complete update to SQL Azure at the time of writing this book.
Table of Contents (17 chapters)
Microsoft SQL Azure: Enterprise Application Development
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface

Preface

The arrival of Cloud Services has been a defining moment for enterprises, small businesses, and the public sector. The landscape is changing from moment to moment. Although Microsoft entered this arena a little late, it made up for lost time by making an immense effort by building its mega data centers around the world. In handling this new business strategy, Microsoft hoisted its entire software powerhouse, honed and built over the years, on to the cloud one after another and is continuing to do so.

When I agreed to write this book, I was thinking that this will be yet another book on SQL Server, and when I finished filling so many pages I was satisfied that there indeed was a need. Writing this book started in the first CTP period and posed many challenges, as the Azure platform components including SQL Azure was undergoing rapid changes. You would not fail to notice the impact of some of these changing scenes in the book.

Microsoft SQL Azure: Enterprise Application Development is an outcome of my many years of familiarity with Microsoft data-related products and my recent passionate monitoring of this emerging platform. This book not only covers the various aspects of SQL Azure and SQL Server 2008 R2, but also covers the web application development.

A software's success depends on the tools available to work with it and in this respect SQL Azure already has a large répertoire of tools including those from third parties. This book provides a comprehensive list of tools with usage examples. Creating and migrating data are aspects that are inherent for any application as the businesses grow, transform, and scale out. This aspect has been described by including the various strategies.

On the application side, businesses may opt to keep their data as well as their applications on any location they are comfortable with, and with the Cloud as yet another location, the choices have increased, although some choices are more restrictive than others. The book deals with applications and data on different locations and how to handle them. The examples use a reduced data set and are simple but the concept is clear and quite straightforward to extend. Business Intelligence has emerged as a must-have feature of businesses. Some of the aspects of business intelligence as related to SQL Azure are treated in this book using Microsoft's business intelligence stack, the SQL Server Integration Services (SSIS), and the SQL Server Reporting Services (SSRS). Also non-Microsoft languages are not left out in the book as languages such as Java and PHP have garnered worldwide interest and usage. The advent of the mobile platform, which is sure to make a shift in the way businesses are handled, and the reality that they may have to work in a disconnected mode, brings new challenges to businesses — the ability to synchronize data becomes extremely important. Microsoft has provided a robust strategy to make this possible by its synchronization software, which synchronizes data across diverse platforms from handheld to cloud spanning the oceans. The book has examples of how this is carried out using the synchronization technology.

The book covers from the CTP period, including references to the developments taking place up to October 2010, and the projects in incubation. During this period, much has happened and as a consequence some of the links in the book might have moved or broken, some of the program versions might have seen an upgrade; but the core of what is treated in this book should be of considerable value to the reader. Our technical editors bring added value by collecting all the links in the book in a central place to assist the reader looking at a hardcopy.

What is left out was a reference to the recent PDC and readers are encouraged to hear the near future developments in SQL Azure by listening to David Robinson's video on 'What's New in Microsoft SQL Azure?' here: http://europe.msteched.com/Topic/List. In closing, the author takes the entire responsibility for errors and omissions and he may be contacted at .

What this book covers

Chapter 1, Cloud Computing and Microsoft Azure Services Platform answers important questions such as: Why a business would like to move its business applications and data to the cloud?, What is meant by cloud computing?, and so on. Some significant cloud computing implementations are described including Microsoft Azure.

Chapter 2, SQL Azure Services explains the differences between SQL Server 2008 and SQL Azure. Accessing the SQL Azure Portal, administering a relational database, and creating and modifying objects are described with screenshots and step-by-step guidance to work with many of the tasks, in detail.

Chapter 3, Working with SQL Azure Databases from Visual Studio 2008 describes the architectural details of SQL Azure. It explains the Microsoft data access strategy. You can follow the examples of accessing SQL Azure using Client APIs such as ADO.NET, ODBC, and OLEDB, as well as Server APIs. The secure methods of accessing SQL Azure using these APIs are described in detail.

Chapter 4, SQL Azure Tools provides a comprehensive description of most of the SQL Azure tools. This includes Microsoft Tools, third-party tools, as well as the open source tool, OpenOffice.

Chapter 5, Populating SQL Azure Databases covers transferring data in and out of SQL Azure, to in and out of on-site SQL Servers. This chapter and Chapter 4 describes about a dozen methods of populating SQL Azure databases using Bulk Copy Program (BCP) to scripting; from migration wizard to data-tier components, and so on.

Chapter 6, SSIS and SSRS Applications using SQL Azure describes how SSIS and SSRS can be used together with SQL Azure, even though these programs are not ported to the cloud as yet. However, in the near future SSRS will be hosted on Windows Azure Platform.

Merging SQL Azure data with on-site data, moving a MySQL database to SQL Azure, creating a report using the SQL Azure database, and ad hoc reporting on SQL Azure data with Report Builder 3, are some of the topics described in this chapter.

Chapter 7, Working with Windows Azure Hosting describes how to host a data-centric application on Windows Azure. This chapter also describes how the SQL Azure database may be used to authenticate users using forms authentication.

Chapter 8, Database Applications on Windows Azure Platform Accessing SQL Server Databases describes with examples, different kinds of data-centric projects that can be hosted on Windows Azure. Ground to Cloud, Cloud to Cloud, and Cloud to ground applications are described with complete examples.

Chapter 9, Synchronizing SQL Azure describes Synchronizing SQL Azure with the SQL Server using the Microsoft SQL Azure Data Sync Tool. Also described are practical examples of synchronizing with SQL Server Compact 3.5 and using SQL Server Data Sync Services.

Chapter 10, Recent Developments describes all the 2010 updates, some with examples. Some of the recent developments include OData services, PowerPivot, Sql Azure security, WebMatrix, accessing SQL Azure with non-Microsoft languages, and many more.

What you need for this book

  • Visual Studio 2008 SP1

  • Visual Studio 2010 Express

  • SQL Server 2008 R2

  • SQL Server Express

  • Windows Azure Tools

  • Windows Azure AppFabric

  • Account for using Windows Azure Services

  • IIS 7

Who this book is for

If you are a .NET developer, an architect, or a DBA who wants to develop enterprise applications and projects and extend your on-site skills with SQL Azure, then this book is for you.

This book does not assume any experience in Windows Azure or SQL Azure, nor is a high level of competency in SQL Server or the .NET Framework and associated technology required. However, a basic understanding of Visual Studio, C#, VB, SQL Servers, XML, web, and WCF is required. If you decide to work with SQL Azure, then this book will provide you with the most up-to-date and practical information.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "The server-related views: sys.sql_logins and sys.databases can be used to review logins and databases."

A block of code is set as follows:

Initial Catalog=Bluesky
Data Source=tcp:Your Server Name.database.windows.net
User ID=Your Project Name @Your Server Name
Password=Your Password;
Trusted_Connection=False
Encrypt=True

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

Provider = SQLNCLI10.1;
Server = tcp:Your Server Name.database.windows.net;
Database = Bluesky;
 UID= Your Project Name @ Your Server Name;
Password = Your Password;

Any command-line input or output is written as follows:

 C:\Windows\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql /?

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Next button".

Note

Warnings or important notes appear in a box like this.

Note

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book — what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or e-mail .

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Note

Downloading the example code for this book

You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books — maybe a mistake in the text or the code — we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.