|
|
Simple-Talk Editor
News, views and good brews
-
Posted Thursday, June 25, 2009 1:10 PM |
When Database Mirroring was introduced in SQL Server 2005, it seemed reasonable to assume that log shipping would gradually go out of fashion. Mirroring is a way of introducing high-availability to SQL Server by allowing the secondary server to become the main server instantly, in a way that is invisible to the applications using the database. This, in theory, is the dream solution for the .NET application developer: the application needs to do no work at all to take advantage of this resilience against hardware failure. Log Shipping has been around for a lot longer, first as a sort of "home-brew" solution that the intrepid DBA could make work with version 6.5 and 7.0, before an official version was built into the enterprise edition of SQL Server 2000. It is a method, based on SQL Server Agent jobs, by which the transaction log backups from a primary server are applied to secondary servers. In this way, one can keep one or more spare 'warm standby' servers in a state of readiness to take over in the event of failure of the primary. It works well, and requires just a few mouse-clicks to set up, but it requires some nimble footwork from the DBA to switch the standby into becoming the primary server, and generally entails 15-30 minutes of downtime. In addition, application client redirection requires some manual changes. Curiously, despite its many stated advantages and heavy support from Microsoft, Mirroring hasn't replaced Log shipping, as predicted. Aside from the obvious fact that many shops still have SQL 2000 machines and so have no choice but to use log shipping, there are a number of other subtle and not-so-subtle reasons for its continued prevalence. Many HA setups require more than one standby server, which mirroring cannot provide. Other DBAs require that delay time that is intrinsic in Log Shipping to protect against logical errors that, with mirroring, would have instantly been carried across to the standby. In a sense, Log Shipping also provides "free standbys", since it makes use of backups would need to be made anyway and, to the delight of many DBAs, checks the integrity of the backup for free. This final point hints at perhaps the biggest reason why log shipping still prevails. Many DBAs regard the High Availability aspect of log shipping as a "happy by-product" of their need to offload reporting functions to a secondary server. In a mirrored setup, the target database is never online, or accessible to the end user, until failure occurs on the source. The only way to get around this is to set up database snapshots on the target, which of course incurs the expense of Enterprise Edition. With log shipping, all you need is Backups, and a few cheap standby servers running SQL Server Express, and you have an effective reporting solution, with "poor man's High Availability" thrown in! However, although rumours of log shipping's demise have been exaggerated, it may still be only a stay of execution. Microsoft may finally relent on the Enterprise requirement for snapshots. With the advent of server virtualization technologies, it will surely become easier to maintain 'standby' virtual servers which can be deployed even more quickly in the event of either physical or logical failure. DBAs have stuck with log shipping for good reasons that were un-guessed at by the pundits, but does it have a long-term future as a high-availability strategy? As always, we'd love to hear your opinion. Add your comments below (you'll need to be signed in), and the best contribution will receive a $50 Amazon voucher. Cheers, Tony.
|
-
Posted Thursday, June 11, 2009 2:11 PM |
DBAs, like many other IT professionals, often take instruction in how to do their job from people who have no recent experience in their profession. How has this come about? Such is the huge task of assimilating and ordering facts about any new technology that the people who publish books and articles, or who give advice on best-practices, are predominantly trainers, professional communicators and technical authors by trade.
Does this matter? Should we worry? Yes, because it means we are missing out on advice honed in the imperfect, real world of work. The real initiation for the job of DBA, developer or SysAdmin comes from studying stories of heroic failure as much as stunning success, of imperfect solutions wrought from the tools at hand, and with minimal budget. They aren't always pretty. In the real world, best practices are abused, unfashionable technologies are used, and SQL Server features are bent alarmingly out of shape to fit the need. But these are all working solutions, tested and accepted by demanding users.
The vast bulk of the training materials currently provided for IT professionals give exaggerated weight to life-changing new product-features, intimate knowledge about the bowels of the server software and unrealistic best practices. It is an intimidating tsunami of information and opinion; so daunting that the average DBA and developer often feels reticent about contributing to the pool of community knowledge. Are their more mundane, workaday tales of SQL Server survival actually what people need to hear more about?
For me, the recent SQL Saturday event in Pensacola, was a breath of fresh air. Here were presentations that rang true, and which seemed immediately relevant. This was the voice of the hardened practitioner, not the slick presenter. Shawn McGehee, Ryan Duclos, Rodney Landrum, Don Demsak, Nathan Heaivilin and all of the other day-to-day DBAs and developers were prepared to put their head above the parapet in the hope that what they had learned the hard way could help others. It did.
Is it possible to redress the balance, and to give a greater weight to the sage advice of the graduates of the school of hard knocks and the University of Life? Can we give the real practitioners a greater confidence to make their voices heard? Events such as SQL Saturday certainly help and we hope that we can do our bit too. As an example, Red Gate is running the Exceptional DBA event again this year. An exceptional DBA doesn't necessarily mean one who always follows database best practices or can tell you more about the internals of SQL Server than you ever cared to know; it just needs to be someone who will go to exceptional lengths to provide their users and developers with what they need to do their jobs. If you're an end user, developer or manager who works with this sort of DBA, we encourage you to nominate them for their well-earned 15 minutes of fame.
Cheers,
Tony.
|
-
Posted Friday, May 29, 2009 11:49 AM |
Microsoft's recent policy of Glasnost has meant that we now enjoy direct, technical communications about their products from the people responsible for building them. In the bad old days, when all communication was filtered through the obfuscating glass of the marketing department, one would read through the gobbledygook of the marketing press releases, glean what little sense one could, shrug, and move on. Nowadays, one wades through hundred of blogs, tens of videos and countless twitters, before reaching roughly the same conclusion.
This thought hit me as I tried to make sense of the information regarding the CTP of SQL Server 2008 release 2 (previously codenamed 'Kilimanjaro'). It is due for release in July, to coincide with the Office 2010 CTP, and promises to be the most substantial "point release" ever. Is there a central, consistent theme to the release? Or is it easier to understand R2 as representing a wonderful opportunity to slip all those things into SQL Server 2008 that were 'time-boxed out' by the original deadlines? In amongst the technical buzz from Microsoft, are we just hearing the voice of SQL Server catching up with changes to Windows Server, Visual Studio, and SharePoint/Office 2010?
I started by trying to seek out the reality behind the concept of 'self-service business intelligence', provided via a new Excel add-in (Gemini). These new BI capabilities have been whetting appetites since October 2008, when Donald Farmer first demonstrated how the in-memory, column-oriented processing model allowed users to slice, dice, pivot and sort two million rows of data, right for within Excel. However, relatively little new detail has emerged since about the underlying changes to Analysis Services, or about Gemini's new "DAX expressions", for multidimensional calculations, and what they mean, if anything, for the future of MDX.
What strategies underpinned the move to make IT administration easier? Dashboard viewpoints are a new feature, allowing administrator to manage policies on their servers and "identify consolidation opportunities". However, the central pin in the "manageability" drive seems to be Master Data Services (MDS), a tool by which to centrally manage all critical business data in financial and ERP applications. It's potentially an interesting tool for some people, but seems to have been rather haphazardly shovelled into SQL Server, having originally been announced as part of SharePoint 2010. We'll also have 'Low Latency Complex Event Processing' for capturing and analysing usage patterns in the database and making it easier to detect, for example, fraudulent activity. Again, however, details are sketchy.
Elsewhere, smooth integration with SharePoint 2010 is promised often, as well as better integration with Visual Studio. There will also be improvements to the way that virtualization is done, and an increase in the number of logical processors supported from 64 up to 256, exploiting improvement in the new 64-bit Windows Server 2008 r2. There will be self-service reporting (with Virtual Earth integration), a few minor additions to the TSQL Language, and we'll also get compression of Unicode strings.
No. We're not going to find a unifying theme behind the new release. It is a Muesli release, a disparate mix, with a number of tasty nuts and raisins thrown in. Perhaps Microsoft’s new way of announcing releases acknowledges the huge complexities of the server products. No sound bite will do justice to what will be delivered, but like Muesli, there will be plenty to chew on when SQL Server 2008 R2 arrives.
Cheers,
Tony.
|
-
Posted Thursday, May 14, 2009 12:06 PM |
It has been obvious for a while that Powershell 2 was going to be strongly supported as the natural scripting language for Windows Server 2008 R2 and Windows 7. It comes with interesting new features, such as the ability to execute scripts on remote systems and write native "ScriptCmdlets". What's more it now has a very nice IDE, and the various administrative GUIs in Windows Server will now generate Powershell scripts that can be saved for reuse. It seems certain that Powershell will be on all the servers in your organisation and that all administrative scripting is going to be in Powershell. If you are a system or database administrator, you are just going to have to grit your teeth and get started on one of the 400-page books that introduce the tool.
Were it not for the fact that Powershell is as intuitive as Linear B, it would be game over. As it is, IronPython and IronRuby remain interesting alternatives. They make the scripting process far simpler, and the syntax is much closer to the type of programming language that DBAs are used to. They become even more attractive when one considers the versatility of the .NET Dynamic Language Runtime (DLR), which allows you to plug IronPython or IronRuby into your .NET applications, call C# methods and so on. Maybe, with these DLR-based languages, we really are moving closer to achieving the dream of all DBAs: one scripting language to do everything. However, your Sysamin will loathe them as he will be engrossed in the extended culture-shock of having to redo all his favourite scripts in Powershell.
Sadly, there have been losers as well as winners in the scripting wars. Jscript.net, which briefly appeared in Silverlight, seems to have quit this mortal coil, doomed by the emergence of the DLR, which was more likely to deliver a fast-performing script. Perl too doesn't seem to have made the leap into the .NET environment.
Does any of this matter? Does a DBA even need scripting languages? Many DBAs out there still perform maintenance tasks by hand, server-by-server, database-by-database, occasionally reaching for SQLCMD and SQL Agent. Or perhaps, at most, using a few VBScript /DMO solutions that they haven't quite got round to updating for SMO.
Is this an unfair representation of DBAs attitude to scripting? Is it time to redo all those old scripts in Powershell, or are there viable alternatives? We'd love to hear from you.
Cheers,
Tony.
|
-
Posted Tuesday, April 28, 2009 6:04 PM |
Recently, a local builder handed me an estimate for some construction work on my home. Once my eyes had stopped watering, he calmly explained to me that I wasn't paying him for what he could do, so much as what he knew. He'd been in the trade for 30 years. "That" he declared, pointing at the estimate "is exactly how much it will cost, and exactly how long it will take". Three weeks later the work was complete, exactly as he said it would be, and I gratefully handed over a vast sum of money.
Why do so few IT projects proceed in this way? Why are most developers so poor at estimating projects? The first trick, when estimating, is to break down the project into all of its component parts. Accurately identifying all of these steps is difficult, and is a skill that comes with experience. The second task is to assign time estimates to each step. Again, the more times a developer has been through the mill, the higher the likelihood that a given task is one has been seen before, and the more accurate the estimations become.
Even then, given that software development always tends to be on the cutting edge of technology, there will always be a few steps that even the experienced developer will not have encountered before. It is at this point that a developer is likely, if pressed, to give his "best guess" as to how long the "unknown" step will take. It has been wisely observed that the inaccuracy of these "guesstimates" increases exponentially with time. If the estimate is a day, you can expect it to be finished in around a day. If the estimate is a week, it will probably be finished in 1-2 weeks. If the estimate is a month, then the developer really has no idea how long it will take.
Any step that is estimated at over 1 week is a danger signal. Any step that none of the team has encountered before is an "unknown" and therefore a risk. Instead of "guesstimating" such steps, the developer should apply solid three-valued logic. If a step is "unknown" then a NULL should be inserted into the time column for that step. Of course, thanks to NULL propagation, that means the entire project timeline is NULL. The developer must then insist on having time to prototype these NULL steps, so that estimates can be made based on hard evidence, rather than hunches and guesswork.
Inevitably, there are many "agile" techniques, such as planning poker and velocity measurements, which you can use to produce more accurate project estimates. Most of them are well-documented. However, the biggest problem still remains that the IT industry, unlike the building trade, is notoriously bad at retaining experience. In the main, companies hire and pay developers based on what they can do (write code) rather than on the knowledge that comes with experience, such as effective project estimation and management. If these skills were properly valued and rewarded, the industry would do a better job at retaining experience in the role, and the development team's estimation skills, like fine ales, would refine and mature with age.
Cheers,
Tony.
|
-
Posted Tuesday, April 14, 2009 5:06 PM |
"Maintainable code" does not mean the same thing to a DBA as it does to a developer. Production Support staff will want something altogether different from either. These differing perspectives on maintainability have always been a cause of immense grief to IT projects.
To a developer, maintainable code simply means "code that is easy to modify or extend". At the heart of maintainability is carefully constructed code that is easy to read; code that is easy to dissect in order to locate the particular component relating to a given change request; code that is then easy to modify without the risk of starting a chain reaction of breakages in dependant modules.
Aside from "common sense" principles such as keeping code as simple and terse as possible, creating effective documentation, using source control, and so on, developers aim to ensure a clean separation of functionality in their code, with high cohesion and low coupling. They will generally employ a range of tools and techniques, such as MVC patterns, object-relational mapping tools, and test-driven development, which offer the promise of more maintainable code.
Unfortunately, such tools mean little to the DBA. They will find little solace in the idea that the code is elegant and object-oriented; it matters little to them if there are few inter-class dependencies. They are not enamoured by object-relational mapping. Maintainable code to a DBA means code that is written to a defined interface, based on routines, so that access rights can be restricted for security, and the SQL can be optimised independently of the application code. It is code that is instrumented and easy to troubleshoot, where any anomalous conditions within the application are logged, even if they don't cause errors.
Support staff will be largely unimpressed by either definition of maintainability. For them, a maintainable application provides an easily-accessible list of all possible 'exceptions', along with a description of what to do to fix the problem. They want an application that alerts them when there is anything that needs to be corrected, and gives them a step-by-step procedure to do so, or indicates who they should contact. They just want something they can keep upright, no matter what elegant innards lie behind and beyond the 'application unavailable: please contact your administrator' message.
What is the way out of this conundrum? Is it possible to reach a "consensus" definition of maintainability, or do we simply need to maintain distinct definitions and make it clearer which "type" of maintainability we're referring to?
As always, we'd all love to hear what you think. The best contribution to the debate, added as a comment to the editorial blog, will receive a $50 Amazon voucher.
Cheers,
Tony.
|
-
Posted Tuesday, March 31, 2009 5:02 PM |
When the market is slack, nothing succeeds better at tightening it up than promoting serial group-panic within the community. As an example of this, a wave of multi-core panic spread across the Internet about 18 months ago. IT organizations, it was said, urgently had to improve application performance by an order of magnitude in order to cope with rising demand. We wouldn't be able to meet that need because we were at the "end of the road" with regard to step changes in processor power and clock speed. Multi-core technology was the only sure route to improving the speed of applications but, unfortunately, our current "serial" programming techniques, and the limited multithreading capabilities of our programming languages and programmers, left us ill-equipped to exploit it. Multi-core mania gripped the industry.
However, the fever was surprisingly short-lived. Intel's "largest open-source effort ever" to provide a standard tool for writing multi-threaded code, caused little more than a ripple of interest. Various books, rushed out while the temperature soared, advocated the urgent need for new "multi-core-friendly" programming models, involving such things as "software pipelines". Interesting as they undoubtedly are, they sit stolidly on bookshelves, unread.
The truth is that it's simply not a big issue for the majority of people. Writing truly "concurrent" applications in languages such as C# is difficult, as you get very little help from the language. It means getting involved with low-level concurrency primitives, such as lock statements and so on.
Many programmers lack the skills to do this, but more pertinently lack the need. Increasingly, programmers work in a web environment. As long as these web applications are deployed to a load-balanced web farm, then page requests can be handled in parallel so all available cores will be used efficiently without the need for the programmer to be concerned with fine-grained parallelism.
Furthermore, the SQL Server engine behind these web applications is intrinsically "parallel", and can handle and use effectively about as many cores as you care to throw at it. SQL itself is a declarative rather than procedural language, so it is fundamentally concurrent.
A minority of programmers, for example games programmers or those who deal with "embarrassingly parallel" desktop applications such as Photoshop, do need to start working with the current tools and 'low-level' coding techniques that will allow them to exploit multi-core technology. Although currently perceived to be more of "academic" interest, concurrent languages such as Erlang, and concurrency techniques such as "software transactional memory", may yet prove to be significant.
For most programmers and for most web applications, however, the multi-core furore is a storm in a teacup; it's just not relevant. The web and database platforms already cope with concurrency requirements. We are already doing it.
As always, we'd all love to hear what you think. The best contribution to the debate, added as a comment to this blog, will receive a $50 Amazon voucher.
Cheers,
Tony.
|
-
Posted Tuesday, March 17, 2009 5:15 PM |
One of the sure signs of a dedicated and passionate programmer, sys admin or DBA, is that their passion inevitably invades their private life. Writing code, monitoring server-based systems or looking after databases, is not something they think about only during office hours. They probably have an elaborate IT setup in their basement at home, where they spend some of their spare time secretly working on a new programming language, virtualizing servers, or testing out new database design theories.
It's common, when recruiting, for interviewers to seek out evidence of this passion; tales of writing their first identity transformation pipeline in Pascal, aged 15, or how they were a stone's throw away from inventing a markup language for the internet, when Tim Berners-Lee beat them to it.
However, occasionally, when I read advice about what to look out for when hiring a developer, I feel that a line is being crossed. Looking for evidence of youthful passion is one thing, but it seems that these days, on top of having acquired the obligatory 7+ years experiences in C#, 5+ years experience in SQL Server, and so on, we expect our programmers to have spent all of their "free time" selflessly contributing to numerous open source projects, blogging tirelessly about domain-driven design and ruby-on-rails, and answering forum questions on MSDN. It seems to me that we're reaching the stage where, in order to demonstrate their skill and dedication, a developer must have done more or less nothing else in their life except sit in darkened rooms, staring feverishly at a computer screen.
I don't think this is attitude is good for the long term health of the industry. No wonder many developers "burn out" at such a young age! Where is the work-life balance in all of this? Just as you wouldn't, or shouldn't, discriminate against a developer on grounds of age, so I don't think you should discriminate on the grounds that they don't choose to spend all their free time bashing out open source projects.
I've met many highly-talented developers and DBAs who have a completely different set of interests outside of work. On the whole, they are able to learn what they need to do their jobs within their work hours and, quite rightly in my opinion, expect the company they work for to support most of their training needs.
In my experience, the best and most productive developers bring life experiences to their programming. The programmer with artistic leanings can teach your team a lot about the subtleties of UI design. The programmer who spends his free time managing the accounts for a local charity probably has better insight into how to write an effective accounting application than the one who spends his time researching Persistence Ignorance, the Agile mindset, JRuby, Mockist TDD, object neighborhoods, or polymorphic aggregate roots.
As our current Geek of the Week Gail Shaw noted, we need to stop this cult of overwork. It is harmful and unsustainable. Yes, it is important in an interview to test out a programmer's mettle, seek out evidence of their passion for what they do. But equally it's important to find out what life experience they bring with them and maybe, as Phil Factor suggests, challenge them to a game of table tennis.
As always, we'd all love to hear what you think. The best contribution to the debate, added as a comment to this blog, will receive a $50 Amazon voucher.
Cheers,
Tony.
|
-
Posted Wednesday, March 04, 2009 6:29 PM |
Programmers often have an old-fashioned view of their trade. They enter the profession imagining that they will spend most of their time puzzling over complex algorithms, developing dazzlingly creative and compelling applications, writing operating systems in their spare time and secretly working on their own computer language. In fact, of course, most programmers' lives consist mainly of moving sticky pieces of paper from one side of a whiteboard to the other, and making sure the focus moves to the correct control when you press "tab".
It is instructive to examine the desks and book cases of your fellow programmers, especially the slightly older ones. In some cases they will reflect healthy programming aspirations, if not day-to-day reality, holding such lofty titles as "Purely Functional Data Structures" and "Concurrent Programming in Windows", as opposed to "Getting Agile with Post-it Notes".
On many other bookshelves, however, one can find ample evidence of programmers trying to escape programming as fast as they possibly can, by becoming managers. Every time I see a copy of "The Results-Driven Manager" on a programmer's desk, it sends a light shiver down my spine.
However, this obsession with moving into management is perfectly understandable. As an industry we dislike employing older programmers, and provide them with little career progression. You can become a senior developer after five years which means that, if you are a successful graduate, you will get there by the time you are about 26! After a few more years, unless you dye your hair and lie about your age, you begin to feel more or less obliged to start climbing the greasy pole into management. The net result is that the profession as a whole retains little in the way of experience. It is little wonder then that, in Europe for example, the annual cost of IT project failure is a breathtaking $200 billion.
As an industry we have to understand that becoming a manager is not a career progression but a complete change of job. Being a good programmer does not make one a good manager. Often, the reverse is true. Why do we value management skills more highly, anyway, when a good programmer will make just as much of a contribution to an organization as a good manager?
Good programmers should be encouraged to remain programmers, and to continually refine their craft. They should be constantly seeking ways to improve their algorithms, get their applications to scale more efficiently, optimize their memory usage, and so on. Instead, many programmers, by necessity, seem more intent on learning the latest management techniques and buzzwords, and dropping phrases like "bottom line" into conversations. Meanwhile, seven out of eight IT projects fail.
As always, we'd all love to hear what you think. The best contribution to the debate, added as a comment to this blog, will receive a $50 Amazon voucher
Cheers,
Tony.
|
-
Posted Tuesday, February 17, 2009 11:00 AM |
Dynamic Management Views (DMVs) are an incredibly valuable addition to the DBA's troubleshooting armory, laying bare previously unavailable information regarding the under-the-covers activity of your database sessions. Why, then, aren't all DBAs using them? Why do even those that do use them speak wistfully about "good old sysprocesses"? It's because DMVs are so complex that they are horribly difficult to use unaided.
In the course of our work here, we have become increasingly concerned with making our software tools, and our publications, easy to use and intuitive. With Simple-Talk, we do a post-mortem on every newsletter and try to work out what we could have done better. Our readers are a diverse crowd, with many different requirements in terms of subject matter and technical level. We've learned from long experience, the sort of straight-forward technical content that they find most useful. Nobody, we are certain, wants any unnecessary complexity. When they meet it, they are polite; they don't whistle catcalls or break windows, they simply go elsewhere.
DMVs are extraordinarily useful, but the SQL needed to retrieve even fairly basic information is so intricate that we are all obliged to collect them like mystic spells. And DMVs are not the only part of SQL Server that is so complicated that one gasps, and breaks into nervous laughter. The WMI Alerts, introduced in SQL Server 2005, are another good example of this. Service Broker is extraordinarily valuable but, sadly, ruined by its complexity.
I have a theory that it is a blow to our individual pride to admit that something is too complicated for us to understand. Nevertheless, usability is important. Or does Microsoft inhabit a parallel universe where the complexity of its Server products simply doesn't matter?
It would be fascinating to plot the chain of decisions that led to Microsoft to release DMVs in their current state. Does the Server team live in a rarified atmosphere where they don't talk to ordinary users, only MVPs and an inner coterie who aren't eager to criticize the hand that nurtures them? How else is it possible that they leant back in their chairs, surveying a DMV query that looked like someone spilt alphabet soup on the page, with seven joins and five cross applies, and thought "Job well done. The users will just loooove it". Am I being a wimp? Am I in a minority in liking simplicity and clarity in IT? As always, we'd all love to hear what you think. And the best contribution to the debate, added as a comment to
this blog, will receive a $50 Amazon voucher. Cheers,
Tony.
|
-
Posted Tuesday, February 03, 2009 7:26 PM |
Over recent years, Agile development and Scrum have been championed by some
developers, and various consulting firms, with a quasi-religious fervour.
Initially, I was sceptical but Scrum has taken hold among the Red Gate
development and testing teams and, as I started to witness their "daily scrum
downs", I was moved to act. Why should Simple-Talk be left out? Dismissed as the
couch potatoes of the new Agile World? In no time, I had persuaded the
Simple-Talk team to form a Scrum and get ready for the next newsletter
sprint
| Scrum Master |
So come on team, where’s the SQL server indexing article?
|
| Andrew |
I passed that ball onto Tony 2 days ago. He stuffed it down the back of his
jersey and I've not seen it since.
|
| Scrum Master |
Ok Flyboy Davis, so what have you done since yesterday on this 'product
backlog' item?
|
| Tony |
Well, Andrew undercooked the pass a bit I'm afraid. I've moved pages 1 to 4
on to the flankers for a copy edit but still need to finish juggling pages 5 and
6.
|
| Scrum Master |
OK then, what about the LINQ-to-SQL piece? Have you achieved your sprint
goal?
|
| Tony |
Well it's done, if that's what you mean.
|
| Andrew |
DONE?! It’s a lot more than done. I finished the technical edit yesterday.
That article is DONE-done.
|
| Production gaffer: |
If it's DONE-done, why don't I have it for the newsletter?
|
| Tony |
Well, unfortunately, Microsoft has suddenly had a bit of a "change of heart"
on this particular technology. We'll have to put it on the burn down chart, I'm
afraid.
|
| Scrum Master |
No, no! This is just normal 'Requirements Churn'. An agile team must think
on their feet and adapt! Why don't we chuck this ball to our fleet-footed
winger, Phil Factor, and let him run with it?
|
| Tony |
Well, if you insist, but I think you’ll find that he'll just try to sell you
a dummy and end up impaling himself on the corner flag.
|
| Scrum Master |
Ok, OK, people, let’s try and prevent a complete scrum collapse here.
|
| Production gaffer: |
Cluck! Cluck! Cluck!
|
OK, so maybe for publishing, a "maul" is more appropriate than a Scrum. And
not just any maul but a proper rolling maul, with boots, fists, shouting for
blood subs and orange wedges, making agonising, inch-by-inch progress towards
the greasy touchline; Phil Factor at the centre of it, holding fiercely onto the
ball and Richard Morris blowing madly on his shiny Acme whistle.
And at the end of the match, a total of 15 tries, but just the one
conversion.
Cheers!
Tony.
|
-
Posted Monday, January 26, 2009 4:36 PM |
The art of developing an application, or maintaining a database server, really consists of finding ways of postponing or avoiding programming. As Phil Factor points out, most good DBAs and developers are marked out by a propensity for "bone-headed stubbornness and practice beyond the patience of an ordinary mortal". It's only when this attitude blinds a person to an easier way to do things that it becomes an issue.
The problem is that the whole Microsoft culture is one that positively encourages immediate coding. It all seems so easy and satisfying to cut down on the tedium of routine administrative tasks by scripting them. It is hardly surprising really, since by leaping naturally to the use of scripting or, god forbid, programming, you never need to stand back and consider those difficult initial questions like "Should I really be doing this?" or "Is there a more effective approach?" One thing leads to another and before you can wake up to the futility of what you are doing, you have thousands of DTS scripts, or directories full of un-maintainable Perl scripts, written in some bizarre form of shorthand by someone who left the company before documenting it all. And then you find out that there was an existing tool that did the same job. Only better.
In any enterprise there is, or should be, an exercise which must be gone through before you even consider building an application. You have to find answers to the following questions before you get asked them:
- Should we be doing this at all?
- Have we already got the means of doing this?
- Can we modify an existing component to do this?
- Can we buy-in an existing product or tool to do this?
- Should we get someone else to produce it for us?
Only when the answer to all of the above is "no", when all other ways of developing the application have proved futile, should you consider "rolling your own".
Even when the decision is made to build the application, you should reuse whatever components you can, and code only when you can't avoid it. When you are refining a prototype, you'll use scripting just to allow you to make rapid changes, before finally casting the application in concrete with a compiled language. Coding in C#, Java or the like should, in almost every case, be just about the last thing you should do.
As always, we'd love to hear what you think. And as usual, the best contribution to the debate, added as a comment to this blog, will receive a $50 Amazon voucher.
Cheers!
Tony.
|
-
Posted Tuesday, January 13, 2009 1:55 PM |
Everyone here knows what a nested loop join is, right? However, I am still willing to bet that if you ask three different people, you will get four subtly different answers.
I admire a person who can take a subject that has apparently been "done to death" and bring a new clarity to it. I think Stephane Faroult manages that with his video, SQL Joins, nested loops and all that in less than 6 minutes. His line in deadpan French humour appealed to me, and the "dance floor" analogy, with prospective dancers needing to choose suitably-sized partners, will stay with me the next time I'm asked to explain a merge join.
My first thought was that it would be great if we could bring this sort of clarity to some of the contentious topics of the day, such as cloud computing, MDX, entity framework, extended events and so on. Arguments are flaring up already and if we can get a short and clear explanation in early, it may save everyone a lot of pain.
Almost immediately, though, I realized the futility of this. What mileage is there in debating the intricacies of MDX until we can agree on something as fundamental as how date intervals work in SQL Server? It seems pointless to dissect complex internal structures of SQL Server until we can agree on how to pronounce SQL.
We need to unite behind a common understanding of some of the absolute basics of our trade. Otherwise how can we expect to be taken seriously? I propose that we compile a "top ten" list of questions to which we want straight answers.
Send in your topic suggestions, along with who you think could provide the guide. If you have a fresh way to present one of the endlessly-debated SQL Server topics, we'll do our utmost to persuade our current Geek of the Week, the famous cartoonist Larry Gonnick, to animate your script (as soon as he's finished work on his latest book!). It will then become the definitive 5-minute guide to which we will henceforth defer on Simple-Talk.
To get us started, I suggest the following candidate topics:
- SQL: A definitive 5-minute guide to its pronunciation
- What is NULL: The Final Answer
- How date intervals work in SQL Server
- The thinking person's guide to using cursors.
- Table Variables. Their hidden purpose.
- Should we be allowed to view Transaction logs?
- At what level should we stop normalising databases?
We will get these videos made and, as usual, the best suggestions will receive a prize so add them as a comment to this blog!
Cheers,
Tony.
|
-
Posted Friday, December 19, 2008 1:31 PM |
DBAs and Developers seem to live in parallel universes. If and when they talk to each other, the air is often thick with misunderstanding. It seems that what we have here is a deep-seated communication problem. Although the two groups share a common technical language, they use terms slightly differently. A 'domain', 'transaction', 'object', 'entity' or a 'framework', for example, has subtly different meanings to the two camps. When a problem occurs, tensions can quickly rise as confusions in terminology get misinterpreted as accusations of blame. In short, communication between the two groups is shot through with a sort of cognitive dissonance, akin perhaps to a continuous Stroop effect.
I'm reminded of a short blog post by Seth Godin, in which an angry woman orders a "double double" and responds to the bemusement of the coffee shop attendant by simply repeating the same phrase, only louder. It's a pattern I see frequently in the interaction of DBAs and developers. Sometimes you need to find a different way to explain things.
Perhaps the answer is to create a new, mutually understood, language. When different cultures come together for a common purpose they often develop a new language to deal with the struggle. In the Great War, for example, the British army was peopled with a vast array of different cultures. In a spirit of camaraderie, they developed a private language, adopting words or phrases from different cultures, and giving them a new ironic meaning. Some of my favourite examples include archie, bar-poo, Asiatic Annie, belati (blighty), make a bogey, bondock, bun-strangler, cat-stabber, conk out, Dub-dub and Flaming Onions.
In the holiday spirit of enhancing kinship and fraternal feeling, we propose the development of a new common language for developers and DBAs. We encourage you to contribute your terms and definitions. The best entry, added as a comment to this blog, will receive a pair of Sennheiser noise-cancelling headphones, and the best runners-up will get Amazon vouchers or Simple-Talk gift bags.
To get things started, how about these:
Bar-Poo – To rush around prophesying that a project is doomed
BitHog – Memory intensive process
Bun-strangler– Teetotaller
Cookie – CPU
Cookie monster – CPU-hungry stored procedure
Data-dodger – Someone who is never around when the application hits data issues
DBA-AwayDay – DBA is closeted in the server room and won't come out
Deadlock holiday – Production system dies due to too many deadlocks
Doing a Gordon – Managing to break everything all at once
Domain Knowledge – Unhealthy interest in Middle-Earth
Dormouse – Anyone advocating, or using, Hibernate
Fluffer – Malfunctioning trigger
Freezing Temp DB – The effect of putting an exclusive lock on TempDB.
Gone Mae West (Syn: Gone dolly) – Database is bust, big time.
Grapeshot – Too many instructions and directives flying around everywhere
Heaphazard – Erratic indexing
Heaptastic – No indexing
Icarus – Anyone with a fascination for 'cloud' computing
Keyboard-junkie – Developer who types in code before planning
Kuntrachi – A contractor
Object of derision – Proselytizer of object databases
RastaBase – Any database prone to deadlocks
Serialisation – Turning a good book into a bad TV series.
Table-monkey – A developer who insists on access to base tables
Thremple – Endanger database by placing undue pressure on tempdb (e.g. to give a database a good thrempling)
TSQL Tourniquet – Code that encourages SQL Injection
Look forward to hearing your suggestions! Thank you to everyone who contributed to my previous "Grid" editorial; the winner of the voucher this time was Daniel Penrod.
On a wider note, I'd like to thank everyone who has contributed in some way to what has been a fantastic 2008 here at Simple-Talk. I wish you all a happy holiday season and the best of luck for the New Year.
See you all in 2009. Cheers!
Tony.
|
-
Posted Tuesday, December 09, 2008 12:51 PM |
David DeWitt and his team at Microsoft have been exploring the 'next frontier' of architectures for building the parallel and scalable database systems that will be needed to support the "petabyte" data warehouse. The way forward is the "share nothing" grid architecture, which will underpin the likes of Madison, and will offer Commodity SMPs connected with commodity interconnect, and almost "limitless" scalability.
Ever since Oracle introduced RAC, Microsoft has been sniffy and dismissive, in the manner befitting someone with no solution to offer at all. When David presented his "Scalable Architectures" keynote speech at PASS, he could not resist taking several side-swipes at RAC, presenting it as a thoroughly second-rate solution that was "grid in name only".
Oracle had beefed up an existing shared-disk technology for database scale out (Oracle Parallel Server), called it RAC, and marketed it mercilessly. The problem was that it was eye-wateringly expensive and very few people really needed it. Some people were doing creative "out of the box" clustering with standby databases, log shipping, data guard, and so on, but few needed to move up to a full-on "grid" architecture.
However, won't the same be true of Microsoft's 'true grid' offering, when it arrives? According to Andrew Kelly, there are many people who think they need scale out, but in almost all cases, they would be better served by scaling up i.e. by just adding more memory/CPU to their existing box. Unless you either can't afford to be down for more than a few minutes, if a server crashes, or your monstrous CPU/memory demands simply cannot be sated by a single machine, then chances are you can live without clusters, and certainly without "the grid".
Ironically, an old Oracle friend once told me that when you move from a standalone machine to a 2-node cluster, your availability can actually go down slightly. A reliable, standalone SQL Server box, unmolested by human intervention, will just run for 99% of the time. Once you add in more hardware, more software, more complexity, things can and do go wrong a little more frequently, and it's a simple fact that it takes longer to fix a problem on a cluster than it does on a single box.
That's not to say SQL Server people shouldn't be interested in clustering, per se. If you have a valid business reason for building redundancy into your database system, then it is natural that you will want to investigate clustering, replication, database mirroring, distributed partitioned views…or whatever 'high-availability' solution works for you.
Just bear in mind that, with clusters, come extra complexity, extra cost, more manageability issues, and the need for dedicated, trained people to deal with the clustered environment. Multiply each of these many times and you have the same argument for "the grid". When the Microsoft share-nothing grid arrives it will be incredibly impressive, endlessly debated, and fabulously expensive; and almost no-one will need it.
As always, we'd love to hear what you think. Post your comments to this blog, and the best one will receive a prize.
Cheers,
Tony.
|
|
|