Category Archives: SSC

PowerShell for fun (and profit?)

PowerShell is useful for a great many things, but I like it best (on a day-to-day basis) for the little things that it simplifies. For example:

  1. Windows-R to get a Run dialogue.
  2. Type powershell.exe restart-computer
  3. And your computer restarts!

I like this a good deal better than all the hunting around with a mouse to find the durn power icon, wherever they’ve moved it THIS week.

I also dig being in a PowerShell window and being able to open the output file I just generated, with the command notepad.exe c:\temp\filename.txt.  I am nothing if not lazy efficient.

What other fripperies can we use in PowerShell?

So I got to thinking…PowerShell must know where Notepad.exe is – namely, in c:\windows\system32. So it must (of course)  be able to run other system EXEs really easily.

I began scrolling through the extensive list of apps in the sys32 folder, and stumbled across:

cmd

*snortlaugh*

Sure enough, you can “launch” the command window from within PowerShell. It looks a little like this:

poshcmd

Yes, this is silly, and mostly useless. But it’s fun. Or more to the point, funny.

Okay but seriously, why are we talking about this?

Mostly because it amused me. But also to remind you that there’s good work to be simplified with PowerShell, and sometimes some good fun to be had, too.

You can, for example:

  • Launch the control panel with control.exe
  • Or MS Paint, mspaint.exe (I’m not the only one that still uses this!)
  • Or Magnify, magnify.exe

If you’d like to learn PowerShell, check out the Beginning PowerShell session on our Events page, and the PowerShell tutorials on MidnightDBA.com.

Happy days,
Jen

Session: T-SQL’s Hidden Support Feature

Today I presented one of my favorite sessions – T-SQL’s Hidden Support Feature – for the DBA Fundamentals group! They’ll put up the recording shortly, but in the meantime I thought I’d post the slide deck and header template:

Download Goodies

Also, here are the resources I point to at the end of the session:

Oh heck, here’s the session abstract, too:

The most effective T-SQL support feature comes installed with every edition of SQL Server, is enabled by default, and costs no overhead. Yet, the vast majority of database administrator underutilize or completely neglect it. That feature’s name is “comments”.

In this session, Microsoft Certified Master Jennifer McCown will demonstrate the various commenting methods that make code supportable. Attendees will learn what’s important in a header comment, use code blocking to edit code, build a comprehensive help system, and explore alternative comment methods in stored procedures, SSIS packages, SSRS reports, and beyond. These methods help prevent errors and reduce troubleshooting.

Thanks for having me, DBA Fundamentals!

Five reasons to be a technology speaker

I don’t think everyone should be a technical speaker.

But I wouldn’t object if everyone spent a season trying.

Why be a technology speaker?

Simply put:

  1. You learn more about your subject.
  2. You will learn more about presenting yourself, which is good in general (and especially good for interviewing).
  3. You should give back to a good community.
  4. You will have a unique perspective on your topic.
  5. Being a speaker is excellent for networking. (Networking turns out to mean, “Getting to know people, which often ends in mutual benefit.”)

How do I start?

This is one path to it:

  1. Listen to other technology speakers, whether at your job, at a user group, at a virtual UG, or elsewhere.
  2. Pick something to talk about that is interesting to you. Flesh out what you want to say about it. This will involve research.
  3. Give the talk out loud to a friend or family member, or to a recording device. Get feedback.
  4. Ask someone in the field for advice. There’s a ton of us on Twitter you can ask. Incorporate feedback, and repeat step 3.
  5. Give the talk at a local user group. I highly recommend in person talks over virtual to new speakers, because virtual talks are more difficult and nerve-wracking, in my opinion.

Notice I said nothing about PowerPoint or technical demonstrations. Your talk might include neither, or one, or both. But that’s not the critical part of the talk. The critical part is what you have to say, followed by how you say it.

Want help? Email me, Jen at MidnightDBA.com, or catch me on Twitter. I’ve been doing this a long time, and I can help. Lots of us can help.