Author: way0utwest

  • All DevOps All Day

    There is no shortage of webinar events taking place for technology professionals. From our monthly Redgate DevOps webinars to the GroupBy conference to PASS Virtual chapters, there’s a huge set of online events that you can attend and learn from. It’s gotten to the point where you could have a full time job watching webinars if you could find someone to fund your efforts.

    Every year PASS does a 24 Hours of PASS, which is a neat event where 24 hour long sessions in a row are broadcast. It’s a lot of work to get this going, and certainly not many people want to watch 24 hours in a row, but it does seem to be fun. That same idea is being taken a step further tomorrow with All Day DevOps 2017.

    There’s still time to register and attend a few sessions, or even throw a party (or join one) with fellow technical professionals. Maybe this is a good way to take a break from work and still be productive. This might be one of the cheaper conferences you could attend this year. Maybe you can even convince the boss to get some t-shirts with the savings.

    As you might have guessed, I’m a part of this event. I submitted to DevOps East, a conference in Orlando next month, but they also picked me up for the online event, so I’ll be watching and speaking tomorrow. This is an interesting format as it’s not just 24 sessions. It’s over 100 sessions, with 2, 3, or 6 sessions going on at the same time. There are some long sessions, some short ones, all covering different aspects of what we call DevOps.

    Whether you think DevOps is a fad, the idea is silly, or are excited to start building software better and faster, I’d urge you to take a few minutes to scan the schedule and see if there is anything that catches your eye. You might learn a bit on how to change your culture, or improve security, or implement automation. There are even some testing sessions, which I’m looking forward to watching.

    Whether you’re a believer or a skeptic, learn a bit more about DevOps and have an informed opinion. Don’t just judge the movement on the media hype. Listen to some real technical people talk about the ways that they are trying to improve software.

    Steve Jones

    The Voice of the DBA Podcast

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

  • Monday Night Networking at Summit 2017

    Next week is the PASS Summit in Seattle. Thousands of SQL Server professionals are going, many coming Sunday or Monday for a pre-conference session before the main event. For a number of years, Andy Warren and I have run a networking dinner on Monday night, but we’re stepping back this year because of scheduling.

    Luckily, Lisa Bohm has taken over the Monday Night Networking dinner, and you can RSVP for the event from her blog. Andy and I are thrilled that Lisa is managing this, and we’d ask for a couple things from you:

    • Pass the word to others, especially first timers. Blog, tweet, post on LinkedIn and Facebook. Let people know.
    • It would be nice if a few of you would volunteer an hour of your time to help Lisa greet people and introduce first timers to others.

    I’m sorry that I won’t be there. I’m coming late to the Summit, as is Andy, so please help a little and make this a success.

  • VS Live 2017 Anaheim Slides and Code

    The slides and code from my talks at VS Live 2017  Anaheim are now available on Github. Thanks to everyone that attended:

    A Tour of SQL Server Security Features – https://github.com/way0utwest/EndtoEndEncryptedSQL2016

    Unit Testing T-SQL Code – https://github.com/way0utwest/UnitTestingTSQL/tree/vs2017Anaheim

  • SQL Data Generator–Getting a value based on another column

    This is a series on SQL Data Generator, covering some interesting scenarios I’ve run into. If you’ve never tried it, SQL Data Generator is a part of the SQL Toolbelt. Give it a try today with an evaluation today.

    One of the things that people often want to do is generate data, but limit the generation to some data in another column. Here’s a good example. Let’s suppose I have some data that represents a balance in an account. That’s in a column we’ll call Balance. In another column, I have a status that is either OK or Overdrawn, depending on whether the Balance column is positive or negative.

    If I perform a random generation on these columns, I’ll get some strange data. Sometimes the data below matches up, sometimes it doesn’t. I have positive numbers as Overdrawn and negatives as OK

    2017-10-05 10_51_08-SQL Data Generator - New project _

    Let’s fix that.

    In Data Generator, I have a variety of choices for the generators. Let’s look at what I can do for the Status column.

    2017-10-05 10_52_27-SQL Data Generator - New project _

    Certainly there are RegEx and Python scripts, but there’s a nice “Cross Column” section with some examples. In this case, let’s look at the Age in Years generator. The definition is:

    2017-10-05 10_53_11-SQL Data Generator - New project _

    In this case, it’s a simple .NET date function and some math. I can do that. Most importantly, I can see the “Insert Column Name”, which lets me pick another column in my table.

    Python

    The language of choice in SQL Data Generator is Python, specifically Iron Python. Outside of C# Datatime values, Python is needed. If you examine any of the other cross column items, you’ll see we need a main() function that returns something.

    In this case, it’s a simple expression. I’ll use an If statement to check if the Balance is >= 0. Here’s a Python construct.

    def main(config):
         if Balance >= 0:
             return “OK”
         else:
             return “Overdrawn”

    Whitespace matters, as does indentation. If I put this in like so:

    2017-10-05 10_57_57-SQL Data Generator - New project _

    I’ll get this. Notice that the status is correct.

    2017-10-05 10_58_05-SQL Data Generator - New project _

    In a real project, you may have more complicated logic, or more likely, status values. One way to handle those is to use a Python function and return the appropriate values for your system.

    You can build some complex and interesting data generation projects with SQL Data Generator. Give it a try today.