Tag Archives: Introduction

Replication – the sprouts of my DBA world.

14 Aug

Actually, that isn’t entirely fair. I don’t have to eat sprouts, which is just as well. However, I do have to deal with Replication – certainly in my current job. Whereas my refusal to eat the Little Green Balls of Death won’t result in a divorce (because my wife, as wonderful as she is, does for some strange reason really like sprouts) I can’t imagine a job that specified it uses Replication will suffer my presence for long if I flatly refuse to touch it.

SQL Server has a broad range of tools and features, so understanding all of them beyond a basic level is probably beyond most of us. However, within your role you will be expected to have a detailed understanding of some aspects of SQL Server and here, Replication is amongst those required skills.

Like many people, I have created Replication tasks in the past by using the Wizards, so I can at least have a basic understanding of the subject. However, the Wizard does everything for you, makes assumptions and on a simple test system it does work quite well.

On an industrial scale though, and processed via SQL Scripts it is another story. Some of the error messages it can give are less than useful and let’s face it – Replication Monitor isn’t the most helpful tool.

The following series of articles on Replication are to act as an aide-memoire for myself, which is the real reason I have this blog series. Like most people I find that if I don’t use an aspect of SQL Server for an extended period of time I forget the finer details. Having got to grip with a portion of Replication I need to document it. If it helps anybody else then that’s a bonus.


First – the interesting bits. No DDL changes replicated (generally), because in some cases we don’t require replication of all of the columns and the subscriber table may have additional columns (its own partition scheme – so another partition id and a date time showing when it was written to the subscriber).

No snapshots, because of the size of some of the publisher’s tables. A lock is taken while a snapshot is generated, which isn’t desirable on a database that is required 24/7.

And of course – no Wizards. If you have to rebuild a server then it is so much easier to have the scripts to hand, rather than answer a plethora of questions from a Wizard and hope you gave the answers that the DBA who first set up Replication gave. Easier to see what is going to happen and also removes some of the more interesting defaults that the Wizards can specify.

I have three SQL Server 2012 instances on my Development machine and I’ll be using these as Publisher, Distributor and Subscriber.

The articles that follow will include the initial creation of the Distributor, creating a Pull Subscription and changing an Article. As my experience with sprouts Replication continues I’ll add more articles, because there’s no way this mess can stay fresh in my mind for long.

Why Now?

18 Sep

I take notes all day long as I work with SQL Server. Short scribbles, brief explanations, small novels – all committed to paper or some electronic format as I go through my professional career. The theory is sound and generally quite useful.

Then I find I have so many notes that I have trouble actually finding the stuff. Or I move jobs and leave various documents behind, or buried in the corner of a spare room as evidence of a previous life. It gets to the point that I know I have a note somewhere that may be useful but can’t find it; Google doesn’t work with the pile of A4 binders festering in the corner.

So, what to do about it? One of the most useful tools I find are the blogs of those people that not only can understand a subject but are able to describe it in a way that mere mortals can understand – a talent indeed. This gave me the idea of creating my own blog. Not necessarily to pass on the knowledge (although if it does that then I’ll consider it a bonus) but more to force me to make sensible, presentable notes that I myself can turn to when required.

Sometimes (probably quite a lot of the time, actually) my posts will consist of links for various subjects of interest to myself, generally based on whatever I’m working on at the time. Credit will be given to any pieces that I’ve used for my own articles. Half of the skill in learning something is knowing where to look and I’ll endeavour to show how I’ve pieced something together, because that can be quite useful too and any other material I’ve used also deserves credit.

Anyway, enough waffle. Articles may be sporadic but hopefully will also be of use to others. Time will tell.

Image Credit : http://www.flickr.com/photos/18053102@N00/1474738120/