Author: way0utwest

  • Inspiring Change

    This editorial was originally published on Nov 5, 2009. It is being re-run as Steve is on vacation.

    I attended the Women in Technology luncheon for the first time at the PASS Summit on Wednesday. My plan was to put in a short appearance and then head to meet some of the Microsoft manageability team to give them feedback on SQL Server. There are times where you realize that something is happening that would be hard to recreate later. I ended up staying at the luncheon.

    There seems to be a decline in engineering, science, and technology degrees and interest in the US in general. The Women in Technology group is concerned with finding ways to interest, excite, and grow the number of women in technology. The panel had a number of women active in technology, sharing their stories and trying to inspire others. It’s a message that I think bears repeating, and gives you the opportunity to break down the stereotypes that exist with women in technology.

    I heard someone say that no young girl wants to be Dilbert. Young men seem to be able to handle that stereotype better than others, and I’m not sure why. Maybe because it’s more socially acceptable for men to be geeks?

    The power of role models is undeniable.  We see that all the time with movie stars, athletes and more. However many of us are inspired by others closer to us. Authors and speakers we meet at the PASS Summit. Technologists that create and sell a company let us dream that we might do the same. Each of us that enjoys our job, and makes a good living, could inspire a young person to consider a career in this field. Just sharing your vision of what’s exciting to you might change their mind.

    I thought the women in technology luncheon was a great event, and I look forward to it next year. I’d encourage the rest of you to give it a try and see if you can inspire a young girl, a minority, or a child you know to consider a career in technology.

    Steve Jones

  • Is Unit Testing Important?

    This editorial was originally published on Nov 10, 2009. It is being re-run as Steve is on vacation.

    I saw a question on the SQLServerCentral ASK site the other day asking about unit testing for T-SQL stored procedures. There weren’t many responses, but they were interesting to me.

    I wondered how many people bothered to test their stored procedures as a unit. It seems that the idea of test driven development, or even of comprehensive testing of SQL code isn’t very mature. If a query runs and appears to return the data we want, do we bother to test for edge or unusual data conditions?

    Or do we even know how to write those kinds of tests?

    Testing your code as it’s being written is a well known way to reduce your technical debt and ensure better code when it’s released. It’s also a way to lower the cost of maintaining your software over its lifetime. However it slows down development as well.

    That’ s not why most people don’t test their code well. The big reason is that it’s B-O-R-I-N-G.

    But does it matter? Is there really an issue? After all most T-SQL queries are built to scale. If the data is correctly assembled into sets with a small set of data, it will work correctly on large sets of data. Maybe not efficiently, but it tends to work. So is unit testing of T-SQL code important?

    My guess is that it is not all that important. At least not as important as performance tuning. If you have extra time to spend on a query, I think most DBAs would prefer to spend it on making the SQL more efficient, not more tested.

    Steve Jones


    The Voice of the DBA Podcasts

    Everyday Jones

    The podcast feeds are available at sqlservercentral.mevio.com. Comments are definitely appreciated and wanted, and you can get feeds from there.

    You can also follow Steve Jones on Twitter:

    Overall RSS Feed: or now on iTunes!

    Today’s podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

    I really appreciate and value feedback on the podcasts. Let us know what you like, don’t like, or even send in ideas for the show. If you’d like to comment, post something here. The boss will be sure to read it.

  • Bad Days

    We all have them. As DBAs, there could be many bad days in our career. We poke fun at one of them with our first humorous DBA Team story this year. Hopefully you enjoy that one and smile. I know I got a kick out of reading it when got the first draft.

    However that’s not a really bad day for me. I’ve had some bad days at work involving corruption, missing backups, hardware failures, viruses, and more. Typically they involve fewer car crashes and political games than the DBA Team deals with, but they’re almost as stressful and more than a few have stretched well into the night.

    This week, I’d like to commiserate with you. I’d like to hear about the hard stories that you can now look back on with a smile (or grimace), having managed to move beyond the situation.

    What’s been a really bad day in your DBA career?

    Or perhaps you’ve got a bad development story, an administrator story or something else. What was a time when you thought your career might be over, or you might lose your job? When did you feel a high level of stress over a situation that you thought might overwhelm you? Was there a time you might leave this industry?

    I’m not looking to bring up bad memories, and please remember to be professional with your stories. However I’ve found writing things down can be cathartic. Perhaps you’ve held onto some anxiety for years, or fear about a repeat. Perhaps a little sharing, and empathy from the community, will help you feel better about the situation.

    As always, if you’d like to share anonymously, feel free to send a note to sjones at this domain and I’ll post your story without your name.

    Steve Jones

    The Voice of the DBA Podcast

    Listen to the MP3 Audio ( 2.0MB) podcast or subscribe to the feed at iTunes and Mevio . feed

    The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

  • Virtual Lab – New Domain User

    This is part of my series on building a virtual lab for use with SQL Server and Windows. You can see the entire series here: Building a Virtual Lab with Hyper-V.

    After the domain was up, I needed to add users. Specifically, I didn’t want to use administrator for all actions, since that bothers me. It just seems like a poor practice. I also needed service accounts. The accounts I needed:

    • sjones
    • Broncos SQL – for this SQL Server
    • Nuggets SQL – for this SQL Server
    • Rockies SQL – for this SQL Server
    • Joe – my test SQL account, without sa rights.

    I’ll probably need more, but these are good for now.

    Domain Users

    I used the script in this post, in a variation, at the command line. I didn’t need all the fields, so this is what I used.

    New-AdUser -SamAccountName "BroncosSQL" -Name "Broncos SQL" -Enabled $true -ChangePasswordAtLogon $false -PasswordNeverExpires $true -AccountPassword (ConvertTo-SecureString "MyPassword" -AsPlainText -Force)

    Note: That wasn’t the password I used. I used a complex, 12 character, upper/lower case, numbers, etc. password.

    I repeated this for all the users.

    Domain Groups

    For the most part, I don’t need, or want, to assign extra rights for these accounts. The SQL Server setup will assign local rights, and I’ll modify if needed. However I do need to grant domain admin rights to my main account to log on and run the domain at times.

    I went back to basics, with TechNet documentation. I need the Add-ADGroupMember cmdlet to add someone. However, I also need the groups. I searched, and Spiceworks shows up again. I ran this:

    Get-ADGroup -filter * -properties GroupCategory | ft name,groupcategory

    and got this list:

    groups1

    I want to add sjones to the Domain Admins group. Using the Add-ADGroupMember, I ran this:

    Add-ADGroupMember "Domain Admins" sjones

    And it worked. I could easily log on and administer other machines with this account.