I have a little solution that I want to share with today's DBAs but I'm really uncertain that the problem it solves is still of interest to anyone. for some reason, the "answer your own question" pattern looks all wrong to me in this case.

The solution is a little Powershell script that solves a very particular problem in string manipulation. It's a table driven template expander. The driver table has one column for each variable in the template, and one row for each expansion to be produced. It's really absurdly simple Powershell stuff. I'm a rank beginner at scripting, unless you want to consider VMS DCL a scripting language.

The reason I bring this to DBA is that this solution is a rewrite of a DCL procedure that I wrote to do the same thing 20 years ago. I could then come up with templates that looked sort of like this:

  Grant $privs
     To $user
     On $table;

Then come up with a driver table using SQL, run it through my tool, desk check the result, and finally execute it once I was sure it was what I wanted to do.

But the question I present here is this: is anybody still doing DBA work this way anymore? I look at the powershell scripts that current DBAs submit, and they all connect to to the database on the fly, and directly perform the required task. My solution is a lot less automatic than that. Is there anybody interested in doing this kind of thing today?

so I'm in "Jeopardy" here: I have the answer but what is the question?


Both answers were useful, and led me to unexpected outcomes.

Somebody came along and asked a question over in SO that was real close to what I was trying to accomplish in my tool. Here is the question, asked by somebody named Mike.

It fit, so I posted my tool as the answer, with a pointer as to how Mike might apply my technique to his problem. Mike accepted it as correct, so I guess I was on target. The exclamation point on his thank you note says it all.

I learned about Poshcode over in SO. That turns out to be the right place to give the tiny script I wrote the widest exposure. So that's what I did, instead of creating my own blog. My biggest interest was in getting more people to see the technique.

  • 4
    The Earth needed 10 milion years to find the question to the answer. Mar 3, 2015 at 16:04
  • 3
    +42 for that comment! Mar 4, 2015 at 12:19

2 Answers 2


The StackExchange engine encourages asking a discrete answerable question, and then applying your own answer.

Not only is the question searchable via Google and the StackExchange network, but likewise others can both comment on your approach and contribute alternate answers that you may have overlooked.

Remember, make the question the one you started off with, that led you to this answer in the first place. Nobody comes up with a solution without a problem. When they do, it's not a solution, it's just an idea ;-)

  • typos .... what would life be otherwise
    – jcolebrand Mod
    Mar 6, 2015 at 15:23
  • Sure. Make typos myself all the time, especially when I correct somebody else... I asked this time, because I wasn't sure. Maybe you really meant "discreet"! Mar 6, 2015 at 15:50

The StackOverflow system doesn't do well without a question as you have described. So its best to create your own blog.

On your blog document this process instead. That way it is open to the world. For someone won't search Stack Overflow first, but the will search it via their favorite search engine which smurfs the internet first and then provides SO content.

If a user has the same issue as the one on your blog, you can still post the solution to the question (which one should regardless) and then provide a link to your own blog. That link becomes a way of quoting oneself and identifying where the answer's origination resides.

I did similar here: How to bind the Binding.Converter property? where I provided the answer as well as quoting my own blog article.

  • Although the other answer is an excellent description of DBA.SE and of SE generally, this answer fits my case better. The problem I was trying to solve with the Powershell rewrite was learning powershell. That's better suited to a blog than to a self-answered question. Mar 6, 2015 at 14:10
  • I unchecked this answer as the correct answer, because I want to attract more answers, and some people don't try to answer questions that already have a correct answer. But I still plan on following this guidance, as time and circumstances permit. And I'm leaving my upvote in place. Mar 14, 2015 at 12:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .