Database Reference
In-Depth Information
connection can, and probably will, be closed automatically if your connection meets any of the following
criteria:
Long running queries and Long running single transactions - If your query takes a
long time to execute (right now the time is set at 30 seconds) then Azure will kill
your connection. Equally, if you have a single transaction
Idle Connections - Play nice with others and close your connections. Don't leave
them hanging open.
Excessive resource usage - This should go without saying. Because you share the
resources with others, don't hog all the resources. Again, play nice.
Failover because of server failures - This one is obvious. If the server fails, so will
your connection. But when your application reconnects, you'll automatically
connect to one of the failover databases.
You have control over the first three items, you don't have control over the last item. Items one and three
you referenced at the beginning of the chapter. The bottom line is to test locally before deploying
remotely. This is a must, an absolute must. Spend some time looking at your queries and their execution
plans to ensure they will execute efficiently and timely. Don't deploy to the cloud until you're satisfied
that your database will play nice with the others.
Conclusion
We began the chapter with a discussion surrounding the different factors for deploying your application,
such as keeping your application on-premise or hosting your application in Azure. We also covered
application deployment from the database side, providing some ideas and concepts around things to
consider when moving your database to the cloud, such as considering how much of your data to move.
We then discussed the different methods different programming approaches for connecting to and
querying a SQL Azure database, providing examples for each method including ADO.NET and ODBC.
Lastly, we discussed accessing your SQL Azure database through WCF Data Services. With the
strong emphasis on SOA architecture not only from Microsoft, the discussion on WCF Data Services
provided a solid foundation for providing a services layer for your SQL Azure database. This information
provides a great introduction into the next chapter, which discusses OData, a standardized method for
querying and updating data over the web.
Search WWH ::




Custom Search