Thursday, 31 May 2012

How to Give your .NET application HA

By David Postlethwaite

I was at a meeting the other week when someone mentioned that you could specify two SQL Servers in a .NET connection string. I hadn’t heard of this before and did some investigation and found out a bit more.
In your SQL connection string you can specify a second SQL Server – a failover partner. What happens is if the primary server stops responding then your .NET application will automatically start trying to connect to the alternate SQL server.
This is ideal when you are using SQL mirroring, not only will the SQL server failover but your .NET application will failover as well
The syntax is shown below

ConnectionString=”ProviderName= System.Data.SqlClient; Data Source=Server1; Failover Partner= Server2; Initial Catalog=NorthWind ; Integrated Security=True;”

Wednesday, 30 May 2012

Learning Tree: SQL Server DBA Skills Upgrade

I’m very lucky in my work as freelance consultant and trainer I get to travel the world, and last week I was delivering Learning Tree course 2105 SQL Server 2012: DBA Skills Upgrade in Ottawa Canada. I’m not only a Learning Tree instructor for this course but I’m also the course author which means I get to deliver the course for the first several events worldwide. This is pretty cool, at least I think it is and last week was the fourth time I have delivered this course in a different country in the last nine months.

imageThese four events have run across Europe and North America and have taken me from Washington DC to Vienna to London and now Ottawa. I think its a pretty cool course,  covering several of the new features in SQL Server 2012 including AlwaysOn Availability Groups, New features in Performance (Column Store indexes), File Table and Semantic Search, User defined server roles, enhancements to SQL Server Auditing and much more besides.

What I enjoy most from teaching SQL Server courses for Learning Tree is the questions that students ask during the course, I like to see how people are thinking about using SQL Server 2012  and its new features in their environments. Some of the questions that I have been asked are deserving a blog post in their own right, a few of the most interesting questions are listed below:

  • Can you use a SQL Server 2008 R2 trace and the Distributed Replay controller?
  • Can you combine SQL Server Clustering and AlwaysOn Availability Groups?
  • How has Licensing changed in SQL Server 2012?

We answered these questions in class but I thought the answers would make good reading and worth sharing with others to so I’ll be writing up the answers in blog posts in the coming weeks.

If you’d like to attend the 2105 SQL Server 2012 DBA Skills Upgrade course then depending on your location follow the links below

UK and Europe: 2105 SQL Server 2012: DBA Skills Upgrade

United States:  2105 SQL Server 2012: DBA Skills Upgrade

Canada : 2105 SQL Server 2012: DBA Skills Upgrade

It is worth noting that even if Learning Tree does not have a location near you, you can attend 2105 SQL Server 2012: DBA Skills Upgrade via Learning Tree Anywhere which brings the instructor led classroom into your office or home via the internet. Or if you have several people who would benefit from the training, it may be easier for Learning Tree to come to you and deliver the course onsite

As part of the fun I got to spend the weekend following the course in Ottawa, I took in some of the sites, there will be more about that in another post later this week.

Tuesday, 29 May 2012

Books for Learning Transact SQL

I got asked a question recently about what books I would recommend for learning T-SQL. I posted a couple months back about me book list for SQL Server 2012. You can find that post here. In terms of T-SQL I have a couple of books that I Like

1. Microsoft SQL Server 2008 T-SQL Fundamentals (PRO-Developer)

2. Inside Microsoft SQL Server 2008: T-SQL Querying

3. Inside Microsoft SQL Server 2008: T-SQL Programming (Pro-Developer)

If you have any book recommendations for learning TSQL that are not listed here please leave a comment and let me know

Monday, 28 May 2012

The Importance of Regular Blogging

Between my old website, which I started back in 2007 (which has since disappeared) and my blog, which I switched to in 2009 I have been writing and publishing content regularly for a at least 5 years.

I enjoy writing on my blog I use my blog to document what I have learned about SQL Server and other technology. Its a great way to document what you do, it can act as a great future reference when you can’t remember how do something you can just go to your blog and look it up. You can even send co-workers to your blog if they need to know how to do something and you have written a post on that subject.

It can also serve as great tool to supplement your CV/Resume when looking for a new job. If you have a CV that lists a bunch of skills that you say you have and you also include a link  to your blog that demonstrates your SQL Server skills it can help you secure a job over the next candidate.

If you really get to grips with blogging it can actually help you start your own consultancy business. You can end with your own clients and you own business. This is pretty cool thing to do.

But you have to blog regularly, How often is regularly I hear you cry? Well I know some people that blog every day some that blog every week and others maybe every month. I think it should probably be at least monthly. If you are going to maintain a readership you have to give them something read. I compare it to newspaper publishing. Some newspapers get published daily, some get published weekly. Some of the weekly Sunday papers are are just as successful as the daily papers. What you don’t see in the newspaper business is an ad-hoc approach to publication. They pick their days and they stick to it.

I don’t think blogging needs to be as rigid in terms of a publishing schedule like a newspaper but I do think you need to publish regularly. Most importantly to give your readers some fresh content for them to consume. If you don’t publish anything your readers will soon forget about you and remove you from their RSS reader. Regular content is also good for search rankings. You will more likely get a decent search engine rank if you produce fresh content regularly. And finally a blog with nothing but old posts even you do get found in a search engine search just look as good as those site with new fresh content. Even if its the older posts that you want to use.

I write this post today because I realised that for the first time in my 5 years of writing, I have gone through a whole month, April  2012 and the majority of May without a single post. This can now serve as a reminder to me that I need to publish regularly or my blog will look stale…

Featured post

Creating a Linked Server to an Azure SQL Database

Why would you create a Linked Server to an Azure SQL Database? If you work in a hybrid environment with some databases stored on your on ...