SQL Bits: Working with AlwaysOn Availability Groups in SQL Server 2012

by Dmitry Kirsanov 24. February 2013 14:23

In SQL Server 2012, we have 4 main options for High Availability: Database Mirroring, Failover Clustering, Availability Groups and Log Shipping. All but Availability Groups (AG) are available in SQL Server 2008 as well. Today we’ll review Availability Groups and how to create and use them.

Before we begin, make sure you understand what is Windows Server Failover Cluster (WSFC). I covered it almost a year ago for Windows Server 2008 R2 and SQL Server 2008 R2, and you’ll need WSFC in order for AG to work.

A few points about Availability Groups to make sure they are what you are looking for:

  • Availability Groups are not share-nothing scalability option. They are using shared storage, such as storage area network (SAN), although it’s not a requirement. We’ll speak about share-nothing scalability later.
  • For AlwaysOn Availability Groups, you need SQL Server 2012 Enterprise edition or higher. Business Intelligence edition or Standard won’t do.
  • AG provide failover with up to 5 readable nodes.
  • AG provide you with something like load balancing option, but AG is not NLB. Also, all nodes can work independently, i.e. you can still connect to them to retrieve information. Only the primary node can change information in the database.
  • AG does not require working in the same IP subnet, but it requires Active Directory domain. This means, that you can have geographically remote nodes participating in one AG, but they must be members of the same AD domain.
    In case of multi-subnet cluster, you’ll have to implement the file replication solution on your file servers to synchronize the data.
  • AG is database-level, as opposed to node-level failover cluster. AG serves group of databases, unlike the simple database mirroring, with 4 replicas instead of one.

Overall, the AlwaysOn Availability Groups are conceptually similar to database mirroring, but provide more advanced functionality and security.

More...

SQL Bits: 8 Most Important New Features In SQL Server 2012

by Dmitry Kirsanov 15. February 2013 23:00

SQL Server 2012

If you are developer, then you work with relational databases as well. And if you work in a Windows world, most likely your system of choice is Microsoft SQL Server.

With every new DBMS release we find something that changes the way we solve common problems in new solutions. SQL Server 2012 is no exception.

In SQL Server 2012, instead of just enhancing the productivity and robustness of the server, Microsoft solved a number of architectural problems we previously had to deal with in our applications when working with SQL Server.

Problems like saving files in databases, load balancing database clusters and simple restoration of data, finally got the minimum viable solution, which should only improve with time.

More...