Category Archives: Discovery Wizard

Discovery Wizard

Discovery Wizard: Compromises to Keep it Free

Last week, I talked about Discovery Wizard’s Plugin Query Pack concept: the ability for DBAs to write their own inventory queries to figure out what’s going on in their environment.  I talked about how we’d only deliver a few basic Plugin Query Packs with the product, because those types of queries are difficult (and expensive) for a company to deliver and support.

Even beyond the Plugin Query Packs, we’ve got some ambitious goals for what we want Discovery Wizard to accomplish.  Since we want it to remain free, we have to be smart about what we build into the product versus where we just build a framework for the community.  The more features we put into the product, the more bug testing we have to do, the more support people we have to add, the more developers we have to have, and it becomes tough to do as a freeware product.  Striking this balance means making some compromises.

Reports via SQL Server Reporting Services

Reports aren’t cheap.  Ask your BI team to build you a custom report, and if you listen closely, you can hear the cash register going ka-ching in the background.  And if you think that’s expensive, you should see how expensive it is for third party vendors like Quest to build, test and maintain reports in a product installed all over the world.

The core Discovery Wizard product needs to handle the plumbing: it needs to discover servers, poll servers and update the repository.  However, in order to keep it free, we have to avoid building reporting into the product.  Frankly, the reporting doesn’t belong in the product anyway: it needs to be web-based or email-based so that groups of DBAs can all get the same reports without installing Discovery Wizard on their workstations.  Reports will be done via SSRS reports, preferably client-side ones that we can view inside SQL Server Management Studio.

If we’re going to expect the community to write their own reports, though, we have to do our part by making the repository brain-dead-simple.

It Needs an Open, Stable, Easy-to-Understand Repository

I’ve seen a few tools that tout the ability to scan your environment to build a list of SQL Servers, but the data isn’t stored in a way that makes it easy for us to query.  When I was a DBA, I based my utility queries off the IBM Director database repository because I could easily reverse engineer it to figure out where the server names and IP addresses lived.  I didn’t care that the product wasn’t a database product at all – it just had a great repository.

Discovery Wizard needs that same thing: a simple repository with just a handful of tables that DBAs can extend to include any additional attributes.  The documentation for the repository, as well as the documentation for the community-built Plugin Query Packs, will need to live somewhere that the brightest minds in the SQL Server community can update it at the drop of a hat – the wiki at SQLServerPedia.com.

Documentation in the SQLServerPedia Wiki

Here’s our vision:

  • Run Discovery Wizard to find SQL Server instances
  • Load up your list of Plugin Query Packs
  • Run the Performance Best Practices pack against your instances
  • Find out that you’ve got 5 databases with highly fragmented indexes
  • Click on a link to find out why this is an issue
  • A web browser opens to SQLServerPedia showing several articles about index fragmentation, video webcasts talking about it, and scripts to fix it

This, for me, is where Discovery Wizard really starts to show off the power of the community. When a DBA runs a product like this for the first time, they’ll be blown away by the number of other DBAs out there who dedicate their time to writing, speaking and scripting SQL Server issues.

To prepare for it, I’ll be blogging about the kinds of Plugin Query Packs we’re building in the coming weeks.  I’ll show what kinds of things we’re trying to discover on servers, and what kinds of information we’d like to give to DBAs who wonder why these issues matter on their SQL Servers.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Discovery Wizard Plugin Query Packs

In my last post about the development process of the next version of Quest Discovery Wizard for SQL Server, I talked about how DBAs need to track what’s going on in their environment.  Companies with big bucks bring in a configuration management database (CMDB) to monitor this stuff, but for the rest of us, the next version of Discovery Wizard will be a framework that:

  1. Finds SQL Servers in your environment
  2. Track changes over time
  3. Save the results into an easy-to-query database
  4. Runs queries against them to find out what’s going on

When I looked at Discovery Wizard 2.0, we had #1 and #2 down pat.  We could add #3 pretty quickly (it’s already in the development builds of v3), but #4 was going to be a problem for a free product.  There wasn’t a way we could add that in without pouring a lot of resources into the product.

Building inventory queries is a never-ending task.  I got a brief taste of this when I spent a little time at JPMorgan Chase: every time the security teams came out with a new guideline, we had to write a new set of queries to figure out whether or not our servers met that guideline.  Every time we found out about a new performance best practice, out came the T-SQL queries.  And of course we didn’t have every single server in the shop running the same version, so that meant writing queries for SQL Server 2000, 2005 and 2008.

If Quest was going to bundle a complete set of inventory queries into Discovery Wizard, it would cost a lot of money to build, test and maintain those queries.

The Solution: Plugin Query Packs

Just like Firefox is built to enable developers to write their own plugins, Discovery Wizard 3.0 is being designed to take plugins too.  Example plugins might include:

  • Best Practices for Disaster Recovery – the number of databases not backed up in X hours, last date/time each database was backed up, exposure window (how long the database has gone in any given time window without a backup)
  • Best Practices for Performance – autoshrink turned off, basic memory configuration checks
  • Best Practices for Security – number of sysadmins on the instance, number of schema changes in the last X hours, policy-based management enabled, encryption set up, accounts with empty passwords

Notice that a lot of these are called “Best Practices” – keep in mind that they’re just starting points.  You can take these, adapt them for your own use, and take out the rules you’re not interested in.  We’ll ship the product with a few basic query packs to use as examples, and you can take these and run with them.

How’s This Different From Other Products?

There’s a ton of products out there that check your servers against a policy. The first problem is they’re not easy for database administrators to use.

We’re database administrators: we live in T-SQL.  We have a zillion utility T-SQL scripts that we’ve written over the years.  We just need a utility that will discover new SQL Servers in our environment, run our queries against them, and compile the results centrally.

Discovery Wizard is a simple, straightforward tool that handles the icky parts and lets us do what we do best: T-SQL.  We don’t have to learn SSIS, we don’t have to learn PowerShell, we don’t have to upgrade our servers, we don’t have to reverse engineer a complicated schema – we just have to write queries and save them in a text file.

The Discovery Wizard Plugin File Format

Right now, we’re thinking of using XML files as plugin sources.  At a minimum, each XML file would include:

  • The name, version and source URL of the Plugin Query Pack. We’ll host a community repository for these on SQLServerPedia, but you don’t have to upload yours if you create a private one for your own company’s use.
  • The T-SQL query that will be run for each server. The query will need to detect the right version of SQL Server, and run the appropriate T-SQL against it.  For example, you can’t query DMVs on a SQL Server 2000 instance.
  • A URL where the user can click for help if they have questions about the results of the query.  We’ll have a dedicated section in SQLServerPedia where DBAs can write documentation for their Plugin Query Pack.  For example, if your queries check to make sure all user databases are in full recovery mode, then on your explanation page, you can simply link to SQLServerPedia wiki links about recovery modes to explain why it’s important.

We’ve got ideas for more fields, like a priorities on how important each individual field is.  For example, if I’m designing a Plugin Query Pack for security, and if it returns a result saying the server has a blank SA password, I want that to be priority numero uno.

But this leads into next week’s post: the more things we add to the Discovery Wizard, the longer development takes.  We have to make some compromises to get it shipped, and we’ll talk about those next week.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Discovery Wizard v3: The Core Goals

As a production database administrator, you’re responsible for making sure databases don’t have little icons next to them that say “Suspect”.  Here’s what you want to know when I walk in the door:

What am I dealing with?

How many servers are out there? I don’t want to take somebody’s word for it, either, because I know that in any given environment, there’s all kinds of SQL Servers hiding under desks, on non-default ports, or using instance names. SQL Server is everywhere these days, and when one breaks, it’s going to be my responsibility whether I knew about that instance or not. I need to quickly get a handle on every instance out there, know what applications are on it, and get a very basic picture of that instance’s health.

Quest Discovery Wizard for SQL Server v2.0 will check your Active Directory domains or do TCP/IP scanning to find SQL Server instances and build an inventory.  That’s a great start.  Next, though, I want that data stored in a place that I can easily report off it.  Since I’m a SQL Server database administrator, that location needs to be a SQL Server database. I want the table format to be relatively stable, because I’m going to write more and more queries over time against that repository.

In enterprises with multiple DBAs, a similar goal is gathering and maintaining an rigorous inventory including things like failed logins, the number of sysadmins, auditing status and more. Enterprises either have to buy a complicated Change Management Database (CMDB), or roll their own system. I’ve seen several approaches to building a SQL Server inventory, and they’re all pretty nifty – but they’re owned by the enterprise that did the building, and they’re not often interested in sharing their work with others. As a result, we all keep reinventing the wheel.

What’s changed recently?

I wish I had tight lockdown control over every server in the shop, but that’s just not realistic. I’ve got developers who talked management into letting them become sysadmins. I’ve got domain admins with nasty habits of clicking around in SSMS when I’m not looking. I’ve got project managers that install software that comes with SQL Server, and the dang vendors never pay any attention to best practices settings.

I want to look at a report that gives me a high-level overview of everything that changed. I may not be able to justify auditing software that’ll alert me the instant somebody makes a change and tell me who made it. I’d settle for just a report of what’s changed, and then I can go track down the culprit and beat him over the head with his keyboard. Sometimes simple – and free – is better, and I have to start controlling my environment somewhere.

Discovery Wizard 2.0 added baseline capabilities that will save snapshots of your environment.  That’s a great start, and the next step will be storing that in the repository so that we can report against it.

What do I need to do next?

Database administration these days is about triage: which instances are bleeding, which servers are giving birth to new databases left and right, and which ones just have a bad cough.

When I stagger into my cube in the all-too-early hours of the morning, I want help with the triage. I want a basic picture of my patients. I may not need advanced performance monitoring or bad query detection – I just want to start with looking for the instances that haven’t ever been backed up.

Maybe more importantly, when my boss asks me what I’m doing, I want to be able to print out that list and say, “Here’s what I’ve got on my plate. The developers want me to fix their code to make it go faster, but in order to do that, I’m going to have to push this stuff back. Is that okay with you?”

This type of report will be easy when the inventory data is stored in the database.  I’ll be able to run a stored procedure that will list all of my servers, the problems that they have (old versions, security holes, bad performance configurations) in a prioritized list.

At review time, what do I tell my boss that I’ve done lately?

When the big dog calls me into his office to ask me what I’ve been up to for the last few months, I don’t want to just say, “Making sure I don’t lose limbs.” I want to show a clear, concise report that lets me prove statements like this:

  • Three months ago, we had 23 servers that needed urgent service packs and hotfixes. I patched 14 of those.
  • We’ve added transaction log backups on 11 production servers, enabling us to recover within 15 minutes of data loss instead of losing up to a day of data.
  • We’ve gone from having 56 instances to 81, a nearly 50% growth, without hiring more help. I can’t manage this growth by myself and stay on top of maintenance problems.

And I want to be able to spout off statistics like that without any work on my part other than clicking a few buttons. I’m a database administrator: I make a living off managing terabytes 0′s and 1′s. It should be easy to crank out metrics like this, but it’s not.

And I bet you’ve got more goals.

As you’re reading this, you’re probably thinking, “But what about ____?  I absolutely gotta have it tell me ____.”

We’ve all got different opinions about what’s important to us as database administrators.  No matter how many features we build into Discovery Wizard, it’ll never be enough.  And furthermore, since it’s a free product, that restricts how many full time resources we can pour into it.

Fortunately, we’re not inventing the wheel here: there’s already a business model to follow.  Think Mozilla Firefox: it’s a free product with minimal features, but it can be more things to more people because it has an extensible plugin framework.  It gets the basics right, and then creative developers build add-ons to make it to all kinds of cool things.

That’s where we’re going, and in my next Discovery Wizard blog post, I’ll explain how.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts

Discovery Wizard: Building a Free Product With Your Help

Quest Discovery Wizard for SQL Server is a free program that goes through your network and your Active Directory looking for SQL Servers. It discovers things about the server, like what databases are on it, what applications are connected, what version numbers it has, and so on.  Version 2.0 just came out today.

I wish I’d have known about this product when I started working at a new job as a DBA.  It searches your environment, discovers all of the SQL Server instances in your environment, and gives you information about what’s going on inside those servers.

If I’d have known about it, it would have been the first product I ran when I walked into a shop.  Nobody ever has a good handle on every server in the house, and things change rapidly – SQL Server sprawls like crazy.  Seems like we only find out about them when a user drops a database and they want to restore from a backup – but since we never knew about the instance, there’s no backups. Whoops.  Bad first impression.

Killer Potential, Minimal Resources

When I visited Russia last year and talked to Andrey Kviatkovsky, the development manager for a lot of our stuff, I spent a lot of time jumping up and down in front of a whiteboard, drawing all kinds of crazy ideas about what I wanted Discovery Wizard to do.  Being a free product, though, it didn’t have a lot of development resources allocated to it, so we couldn’t make much headway.

We didn’t have any marketing resources for it either, so as a result, most of you never heard of this product.  (Heck, I didn’t hear about it before I started with Quest.)  If you search the web for it right now, you might run across the Discovery Wizard user community on Quest.com.  However, it’s not exactly a friendly web site, and it pales in comparison to the web presence for the similarly free Toad for MySQL.

I didn’t forget about it when I left Russia, and it’s been bubbling away at the back of my mind for months. I’ve had conversation after conversation with our development guys, product management, and marketing, talking about all the cool things we could build into this with a minimum of development effort. Database administrators have a ton of pain points that we could solve with just one good community-oriented tool, and I believe that Discovery Wizard (or DiscoWhiz, as I affectionately call it) could be that tool.

Quest Listened and Invested Resources

At the risk of sounding like somebody who’s been drinking a little too much of the Kool-Aid, I shouldn’t have been surprised that we got our wish for more resources.

Quest takes the whole community idea pretty seriously, as evidenced by some of the stuff they put money and resources into:

  • Toad for MySQL Freeware – folks who like to develop against the free database can use a killer free tool to do it.
  • SQLServerPedia – Quest took a formerly pay-to-play product, KnowledgeXpert, and put all of the content into an open wiki for anybody to use and improve.
  • PowerGUI – long before PowerShell started catching on, Quest dedicated full-time employees to building this free tool for PowerShell developers and even built a web community around it.
  • Guys like Kevin Kline and Joel Oleson – Quest hires some of the best and brightest experts in their fields and puts them to work in the community helping other people.

And now we’re going to turn Discovery Wizard into a tool that I am absolutely convinced will be a vital tool in your arsenal when the next release comes out. You’re not going to believe you ever got by without it.

If I’m wrong, I’m only going to have myself to blame, because those wackos put me in charge of working with Andrey and the developer to flesh out the requirements, do the testing, and deliver this baby.

That’s Where You Come In

That’s where you come in, dear readers: to act as my scapego – wait, I mean, sounding board. Over the coming weeks, I’m going to blog about:

  • The features I want to get into Discovery Wizard 3.0
  • The development and marketing process for free software
  • Where we’ll need to compromise to get it out the door – as the quote goes, “Shipping is a feature too.”
  • How the community will be able to take this thing and run with it

For now, you can check out Discovery Wizard 2.0.  If you run into issues, post them in the Discovery Wizard community: they’ll either be answered by me, or by the support and development staff at Quest.

Brent Ozar

Brent specializes in performance tuning for SQL Server, VMware, and storage. He's one of the very few Microsoft Certified Masters of SQL Server, a published author, and a Microsoft MVP. He likes travel, Jeeps, Apple gear, jokes, and writing about himself in the third person. Read more and contact Brent.

Website - Twitter - Facebook - More Posts