PASS Summit 2018 – A Lesson in Personal Branding

Last year at PASS Summit 2017, I heard a number of comments related to people not recognizing me without the hat in my social media photo/avatar. The linked post started and concluded with the notion that I needed to take a new photo.

That never happened. Instead, I embraced The Hat. And it was totally worth it. I got a bit of ribbing from folks early in the week but it was all friendly. Trying to meet up with people at various points in the week, I’d get messages like “I’m in (location), looking for your hat, where are you?” People introduced themselves when they spotted me doing my PASS Ambassador duties because they recognized the hat from my photo.

A couple people had more fun than I expected:

I met a few people sans hat and they didn’t immediately connect me (the person) with me (the Twitter account). Not a big deal, but I learned an important lesson from it. Apparently, this is how I’m known in a portion of the community now – the guy in the hat. Folks are accustomed to seeing/talking to me on Slack/Twitter with a particular image next to my name. That’s the image of me they have in their mind. Therefore, it’s best if I maintain that appearance offline as well.

I’m OK with this. It sets me apart from the crowd a bit and as time marches on and protecting my head from the elements becomes more important, it becomes a more necessary part of my wardrobe. At big events like this where I’m actively trying to meet people I’ve only spoken with online, I just need to be more consistent about wearing it.

The Hat stays!

PASS Summit 2018 – Photos

My album of people and events at Summit 2018. Somehow a number of photo opportunities were missed!

Copying Individual Tables with dbatools

@SQLMonkeyNYC asked on Twitter this morning:

Pat Phelan replied, suggesting that dbatools can do it, but after thinking on it for a bit and poking at a few functions, I realized that it’s not possible with a single function (yet). No worries. We can do it in three lines for now.


  1. Grab the table from the source database and export the create script. I had to use -PassThru because otherwise, Export-DbaScript will create a file. Not the worst thing, but writing the file and the reading it immediately afterwards is a bit messy. Although now that I write that out, I suppose I could capture the filename that’s output and pass that to -QueryFile in the next step. Gotta love PowerShell – there’s always a few ways to do things.
  2. Take the CREATE TABLE script that we just exported from the source database and run it against the destination.
  3. Run Copy-DbaDbTableData to bring the data over from the source to the destination.

This is a really quick & dirty example where I’m copying between two databases on the same instance, but should give you the idea. You can copy across instances and copy multiple tables as well.

T-SQL Tuesday #108 – Learning Tech Beyond SQL Server

Malathi Mahadevan (b|t) is hosting this month’s T-SQL Tuesday, a monthly blog party for the SQL Server community.

Malathi has asked us to:

Pick one thing you want to learn that is not SQL Server. Write down ways and means to learn it and add it as another skill to your resume. If you are already learning it or know it – explain how you got there and how it has helped you. Your experience may help many others looking for guidance on this.

The timing for this works out well for me, as I’ll be working on my 2019 goals very soon and education is part of those. But right now, we’re kind of a homogenous shop, which makes stretching beyond SQL Server a bit more effort. I’m occasionally indecisive, so I’m going to throw out a few ideas of things to learn in 2019.

  1. Need to learn for work: Postgres on AWS. We have a pilot project starting up using this and eventually, my team will need to support it. So, we need to at least understand the basics – backup & restore, basic monitoring/troubleshooting.
  2. Want to learn on my own: A document database of some description. I’ll probably land on MongoDB due to convenience and cost (or lack thereof). Runner-up: DynamoDB.
  3. Stretch goal: I still don’t entirely get the concepts behind Docker or Kubernetes (although I’m close on Docker). I’ve tried to run SQL Server 2017 on my Mac via Docker, but Docker itself seems to make the machine unstable. Kubernetes is a complete mystery to me; I know a few people who are doing “stuff” with it, but haven’t talked with them about it yet.

But you may be asking “Andy, where’s Azure? CosmosDB is a document database on that platform. And PostGres is on Azure too, why not learn it there?” My shop is starting to do new work on AWS, so the opportunities are more available there and I can apply what I learn at work more readily. So it’ll cost me nothing out of pocket if I go with that or MongoDB. As for the learning plan:

  1. I’m going to have to do this one for work regardless, so step one will be setting aside time at the office to work through the AWS tutorials and documentation. Then set up a few test databases, throw some data in, and play around.
  2. I know we have a few MongoDB experts locally and a user group, so hopefully they can get me started in the right direction. I’ve got a Raspberry Pi 3B as well as a Pi Zero W that I can put to use here.
  3. Apparently one can run MongoDB on Docker with Kubernetes so maybe I can kill two birds with one stone? It could be an excuse to pick up a couple more Pis. Or maybe fire up some VMs on the rack mount server that’s been sitting in my basement for 5 years.

MongoDB & Docker/Kubernetes are completely new ground for me to cover, so just figuring out where and how to get started may be a challenge. By the time publishes, I may already be starting to read the MongoDB manual en route to PASS Summit – and I know I can talk to people about this stuff at Summit to get ideas on where to start.


This post was written published early by accident. My reading of the MongoDB manual didn’t happen last Tuesday as I was not feeling well on my flight to Seattle.

PASS Summit: Planting Seeds of Knowledge

On the eve of this year’s PASS Summit, I find myself reflecting on my first Summit in 2012. My employer generous enough to pay for not only Summit itself, but a pre-con session on Tuesday as well.

I was a developer with an interest in SQL Server and PowerShell at the time, not a DBA. Becoming a DBA wasn’t on my radar yet. Regardless, I used the opportunity to attend a full-day class on managing SQL Server with PowerShell, taught by Allen White (b|t). One of the big focal points of the day was the SQL Server Management Objects, aka SMO.

What I learned that day wasn’t immediately usable in my day-to-day job. Parts of it flew way over my head at the time. But the seeds were planted. It’d be several years before I got to the point of really applying it. Initially, my application was limited to some development “DBA-lite” tasks and suggestions for our sysadmins.

After a job change to become a full-time DBA, I started using and then contributing to dbatools, which uses SMO heavily. That previous exposure to SMO proved very beneficial. dbatools provides a lot of functionality, but it doesn’t do “everything.” In my own scripts, I’ve used that knowledge of the SMO object methods and properties to extend that functionality.

As I pore over this year’s schedule, I remind myself and ask you to consider not just what’s applicable to your present work and environment. Catch some sessions just to see what else is out there, or what’s coming. It’ll open doors for you in the future. Being informed about a wider range of topics will help you guide the conversation toward better solutions in the future. You don’t have to become a master of the topic; just know that something exists, what it can be applied to (equally valuable: where it won’t apply), and where to start gathering information if the solution is worth pursuing.

PASS Summit 2018 – Let’s Hang Out! Where to Find Me

In addition to being an amazing opportunity for both technical and professional development, PASS Summit is a #sqlfamily reunion and a huge networking event. Catching up with old friends, meeting new ones, finding out who’s doing what with which technologies, etc.

This is one of the few times each year I’m anything even approaching a social butterfly and I’ve had one or two people ask about my schedule so we can plan meetups. Summit is so huge that you have to plan these things. You can’t count on randomly bumping into people around the convention center or city, and if you happen to spot someone you really want to meet, you have to take advantage of that opportunity the first time it presents itself.

I will have some dbatools badge ribbons with me this year, but I waited too long to re-order so they’ll probably run out early. Get ’em while you can!

So, with less than two weeks until we’re all together in Seattle, where will I be found? Here’s my schedule thus far for “extracurriculars” – non-session, non-keynote time. Keep in mind that this is just what I have booked right now – I’ve purposely kept time open as I know other things will pop up, plus I like to see where the breeze takes me

Note: I’m an early(ish) riser and while I’m not out until 3 AM at #SQLKaraoke, I don’t turn in at 9 PM either. I’m always ready for a late-night snack & beer or if you want to grab breakfast, we can probably make that happen Thursday or Friday.


  • 12:00 – My flight is scheduled to arrive in Seattle
  • 13:30 – 13:30 – PASS Local User Group Leader meeting. I’ll probably arrive late and I expect to catch some flak from Grant for that.
  • 16:00 – 18:30 – SQL Trail Mix
  • 18:00 – 19:30 – v.20 Celebration
  • 19:30 – 22:30 – I’ll be at an event off-site.


  • Breakfast with my Summit Buddies crew
  • 11:30 – 12:30 – Hosting the Development & Administration Tools Birds of a Feather table in the Quest Dining Hall
  • 15:00 – 18:00 – Community Zone US East Spotlight hours. I won’t be there the full 3 hours but as I’m in the US East region, I’ll be there for a while meeting folks.
  • 19:00 – 21:00 – I’ll be at an event off-site.
  • 20:30 – 22:30 – I’ll be at a different event off-site.


  • Sometime – I need to find a geocache so I can get one day closer to having a find recorded on each day of the calendar year. Fortunately, there are a couple very close to the convention center
  • 11:00 – 12:00 – The Apress booth will be hosting a signing for Malathi Mahadevan’s (b|t) book Data Professionals at Work, along with a SentryOne giveaway. Looking forward to picking up a copy of the book and getting it signed by the contributors, high school yearbook style!
  • 11:30 – 12:30 – Lunch
  • 12:45 – 13:45 – I’ll be posted as a PASS Ambassador in the 6ABC Lobby helping people find their rooms and sessions. I’ll be wearing a red PASS vest for visibility.
  • 17:00 – 18:00 – PASS Board Q&A
  • 19:00 – 22:30 – Games Night in Ballroom 6A. If you aren’t signed up for one of these (they’re happening both Wednesday and Thursday nights), it’s really a good time to unwind and have a relaxing evening talking with people over a board or card game.


  • 12:00 – 13:00 – Hosting the Migrating SQL Server Birds of a Feather table in the Quest Dining Hall
  • 13:00 – 14:00 – I’ll be posted as a PASS Ambassador on the Skybridge, once again in the red PASS vest
  • 22:15 – Plane leaves Seattle. If you’re flying out on JetBlue, hang out with Matt (b|t) & me in the terminal!

Please ping me on Twitter or the SQL Community Slack (@alevyinroc there too) if you want to meet up during the week, whether it’s to grab a bite to eat, attend a session together, get a beer, trade badge ribbons, or just say hi!

Here Comes the New Blog. Same as the Old Blog.

Welcome to the new home of my blog! I’ve had this domain for over a year but with PASS Summit 2018 coming up soon I decided it was time to make the move official.

I’ve brought all the content over from the old site but all new content will be appearing here. I’ll throw a new coat of paint on at some point just to freshen things up.

T-SQL Tuesday #107 – Death March

This month’s T-SQL Tuesday is hosted by Jeff Mlakar and he asks us to write about a project that went horribly wrong. My story isn’t really worthy of the name “death march” but it was a pretty rough project.

The project started sometime in mid-2003. I was working as a web developer (Classic ASP) for an insurance company and they wanted to modernize the underwriting process with a web-based “workflow” application.

A platform was selected, the team was picked, and we set about customizing the devil out of it (it was more of a “framework” than turnkey application) and integrating with our existing systems. Of course, being an insurance company everything ultimately had to land in the mainframe.

The tech team was pretty large – upwards of a dozen and a half programmers across various disciplines. Four of us were kind of off on our own building the ASP front end and COM-based middleware – myself and Ned on the ASP side, Tony & Phil (all names changed) on the other side of the cube walls working on COM objects. The four of us worked really well together, with Phil & I each taking the lead in our respective disciplines. Our PM was great; we got along well and she knew the right questions to ask me to nudge me in the right direction.

As Phil & I dug into the platform API, we realized we were going to be implementing more features with our own code than expected as they weren’t actually built into the API yet.

We brought a few consultants from a large company you’ve certainly heard of to help us work out a UI design. After 5 weeks, we presented our design proposals. Every – I mean every – proposal put forth by the consultants and me was shot down. The response was “those are very nice, but we want what we described to you 2 months ago, so build that.” I was flabbergasted. I asked the consultants if they’d ever seen anything like that and they admitted that they hadn’t. We just spent five weeks and a bunch of money to produce nothing.

February was approaching and while Phil, Tony, Ned and myself were firing on all cylinders, others weren’t doing as well. We were supposed to launch in March, but it was becoming apparent that we’d miss that date. The release date slipped to mid-April.

The four of us spent the last half of February and all of March tightening up our code. We had some performance concerns but hadn’t figured out where they were coming from yet. Acceptance testing hadn’t started yet; the project was expected to be “nearly complete” before that’d start.

Acceptance testing started in late March. Ned & I knew our code inside and out, and I could suss out pretty easily if a reported issue was there or in the COM objects so I could throw those bugs over the wall to Tony & Phil as necessary.

I returned from lunch on the last Friday of March and Ned said to me “I’m leaving at the end of the day.” Um…OK, thanks Ned, I am too. Then he clarified. See, Ned was a contractor and he he was ending his contract at the end of the day – and starting a new gig in Miami on Monday! We were unable to bring in a replacement, so I was flying solo for the rest of the project.

I spent April fixing bugs as fast as I could, re-implementing some features because they sounded good on paper but once seen in action, they weren’t acceptable. Mid-April came around and the project release date was pushed back by another month.

I went to the PM and expressed my concerns about the release date changes. I reminded her that I was getting married Memorial Day weekend and I’d be unavailable for 2 weeks due to that and the honeymoon. She assured me that this was the last reschedule, and even if that turned out to not be true, I wouldn’t be asked to change my plans.

Early in May was the final blow for me. We had an all-project meeting with several people from the highest levels in the company in attendance. The missed deadlines, the incredible strain placed on not only the development team but their families, the importance of the project to the company, all brought up. People laid some very personal feelings out. The response from one of the top-level people was cold, harsh, uncaring, impersonal, tone-deaf, and completely disheartening.

The project went live 10 days before I left for my wedding and honeymoon.


No project implementation is perfect out of the gate. Right before we went live, Phil figured out what was causing our performance issues and over the next month or two, more or less re-implemented that portion of the vendor’s API himself. We pushed out an updated version as quickly as we could; users were complaining about performance from day one. We got a lackluster “yeah, I guess it’s better now” but no real acknowledgement of the improvement Phil had made so quickly. It was too late; the perception was that this system is slow and that wasn’t going to change, now matter how fast we made it.

The project was started in the summer or early Fall of 2003 and went live in the last third of May 2004. By the end of the first quarter of 2005, the company had decided to go in a different direction and the system was on track to be mothballed; no new business was being scanned into it, and once the last piece of business that was in it was processed, everything was shut down.

The system spent more time under development than it did in use.

A Day in the Life (3/?) – September 13, 2018

This is my third installment in a series responding to Steve Jones’s (b|t) #SQLCareer challenge. I decided to jot down most of what I did through the day, filling a page and a half in a Field Notes notebook with timestamps and short reminders of what happened. For more, check out the #SQLCareer hashtag on Twitter.


I chose to record this day because I was working from home as my car was in the shop and I thought I might get some bigger things done without the distractions of being in the office. But as Mike Tyson famously said, everyone has a plan until they get punched in the mouth.

I recommend reading the first and second installments to get a handle on some of the tasks & terms I might throw around here.

My Day

06:00 – Alarm goes off but I’m already half-awake.

07:00 – Drive my son to school. This year he’s on a much earlier schedule than last year, and while I can’t walk him to school due to the distance and he can take the bus, driving him gives us some time to talk one-to-one and it gets me out the door and into the office earlier to boot. Earlier to work means I leave earlier, giving me more time to spend with my family in the late afternoon/evening.

07:30 – Return home, make a better breakfast for myself than Honey Nut Cheerios. Today it’s scrambled eggs with guacamole. If you haven’t tried it, you’re missing out.

08:00 – Set up camp in our “spare bedroom” which is trying to be a home office now.

08:10 – Log into the VPN and plug in the dongle for the wireless mouse. Windows spends far too long spinning on installing the driver and for the time being I use the built-in trackpad.

08:15 – Finish RDPing into my desktop and discover that SQL Server Management Studio (SSMS) has been restarted due to an update of some kind 45 minutes prior. Spend a bit of time recovering unsaved files and then saving them elsewhere.

08:20 – Give up on the mouse working, tell Windows to stop trying to install the drivers.

08:23 – For reasons I can’t explain, mouse starts working. Decide to take advantage of the interruption to my usual SSMS workflow and install the latest version 17.9. I haven’t seen reports of it blowing anything up in the week or so since it was released.

08:30 – Are we ready to work? I think so. Hop into the queue and take my morning cruise through email and SentryOne to review everything that ran overnight.

08:35 – The VPN seems to be really sensitive to other users of my home WiFi (my wife works from home regularly) so I use this as an excuse to hook up the 5-port switch that arrived from Amazon a couple days prior. We’ve got an ethernet drop in the room but it’s occupied by the VoIP box hooked up to our printer/scanner/fax machine. Yeah, a fax machine. She needs it for her job. But we’re out of electrical outlets in this corner of the room. Rummage around and find an unused power strip in the closet. It’s got 4 always on outlets plus 4 on a timer, and due to the size of the wall-warts for the VoIP box and switch, I need to use both sides. Spend more time than I care to admit figuring out how to program the timer (whose brilliant idea was this thing?). After achieving victory over both electricity and Ethernet, I reconnected my VPN after disconnecting from WiFi and got a more stable connection.

08:54 – Pull some data together for a product owner to document the conditions that caused one of their tools to trigger a half-dozen alerts from SentryOne. Turns out that if you attempt to back up the one database to the same filename in four separate processes simultaneously, three of them will get blocked!

09:03 – Get food for my daughter. I forgot to mention earlier that she was staying home from school due to illness.

09:10 – Back to the queue.

09:30 – Call into our weekly meeting for an upgrade project. Struggle to hear anything due to abysmal acoustics in the meeting room. They can hear every click of my mechanical keyboard over the phone.

10:00 – Pull some reports (Excel files) for the business side of the house. We need a couple years worth of data and our web-based reporting system can’t handle that volume so I have a PowerShell script that breaks it up into chunks and runs the stored procedure directly. I spent a bunch of time arguing with the script as I was trying to “improve” it from the previous iteration instead of just using what has worked in the past.

12:00 – Break off to sit in on the PASS Professional Development Virtual Group presentation “Talk Tech To Me – Improving Your Technical Presentation Skills” by Alexander Arvidsson (b|t).

13:15 – Make lunch

13:35 – Back to the reports I was working on in the morning. Ends up being a half-dozen Excel files, each in the neighborhood of 100MB, and approaching the limits of Excel’s capacity.

14:00 – Pick up my car from the shop.

14:30 – Resume work on another report. I had completed 90% of this one the previous day at work, but one calculation was twisting my brain. As written, the requirements are a little fuzzy and I keep flipping between two possible interpretations of them. I decide to commit to one interpretation and get my head around how to code for it.

16:00 – Check where we are with MinionWare‘s CheckDB. I rolled it out about 6 weeks ago and it’s been working mostly OK, but I’m still working out some issues specific to my environment. Discuss with one of our sysadmins when we’ll install some firmware updates for our servers in the coming weeks.

16:10 – Learn that I picked the wrong interpretation of the requirements for the afternoon report and I need to flip it around. Spend quite a while working that out and validating. Whiteboard it out around a doodle of my daughter’s (can’t erase that!).

17:21 – Realize that I need to get the non-production copy of Minion CheckDB in sync with production. Rather than move individual objects (I’ve been working with Sean for about 2 months on debugging some issues and I don’t have a 100% standard version), I do a backup & restore of the database to the test server. Since production is SQL Server 2008 R2 and test is 2016, I update the compatibility level and rebuild indexes, then decide to compress a couple tables as a test before doing the same in production just to keep things from getting too huge.

17:38 – Receive a text from my neighbor about a snake that’s standing between him and his grill in the backyard. It’s a long story. It should be noted that there are only three species of venomous snakes that call New York home, and none of them live in our neighborhood.

18:00 – Done for the day. Time to get the kids fed while my wife has the cat at the vet getting an unplanned checkup.


While I was working straight through the day, I didn’t really feel like I accomplished much. Usually on a remote work day I can start early and finish a little late, and still end up spending more time “at home” because I’ve eliminated the commute, but thanks to my hardware distractions to start the day, that wasn’t happening.

I finished off two sizable report requests and took care of a few pieces of administrivia, but that’s about it. Quantity vs. quality, I guess? Getting Minion CheckDB updated in my test environment seems to have put an end to the alerts it was triggering, which doesn’t impact others but it’s good for my quality of life.

While we do have a “home office” space, it’s not set up in a way that’s comfortable for me to work. The desk is all wrong, I only have the built-in display on the laptop, it needs a ceiling fan to help circulate air better, and the whiteboard is in an inconvenient place. If I were to be working regularly from home, this day’s experience pretty much seals what I already was feeling – that I need to build out a good workspace in the basement that fits me for both ergonomics and working style. That’s not a small or inexpensive undertaking, so I don’t see it happening in the near future. We have a lot of cleaning, planning and building to make that a reality and the only thing I know for sure is desk I’ll be getting.

PSPowerHour v1.0 Wrap-Up

The first edition of the PSPowerHour is in the books and it looks like it was a big success. This one was dbatools-heavy but I chalk that up to the dbatools community having lots of free time because we’ve automated so many of our tasks 🙂

Overall Impressions

I signed in about half an hour ahead of the webcast and was the first one there. Shortly thereafter, I was joined by Michael Lombardi (t, then Jess Pomfret (b|t) and Chrissy LeMaire (b|t). After ironing out a few glitches, we got everyone in the right place and kicked off the broadcast. Everything ran very smoothly, especially considering the number of people involved – Michael and Warren F. (b|t) did a terrific job of orchestrating everything.

While watching and listening to Chrissy, Doug, Andrew & Jess give their demos, I ran through my own in my head a couple times, adding and rearranging a few things as I observed how they were doing theirs. The big dilemma for me was whether or not to run the camera or exclusively screen share (I ended up going with the screen share only). Having not rehearsed my demo enough in the weeks leading up to the event, I was still not sure where to dip into more detail or dial things back and seeing what others were doing helped quite a bit. Having familiar faces & voices ahead of me in the queue put my nerves to rest.

I wasn’t able to watch the sessions after mine in their entirety due to family commitments. Joshua’s Burnt Toast module looks like it’ll be fun to experiment with and add some nice functionality to scripts (I got to see about half of his demo), and I’m really looking forward to catching a replay of Daniel’s demo of PowerShell on the Raspberry Pi – I didn’t realize that it had been ported already!

My Demo

I demoed Invoke-DbaSqlQuery and why one should use it over Invoke-SQLCmd – primarily for protection from SQL injection. Things didn’t go exactly the way I’d practiced; I ran short of time despite feeling like I rushed things and cutting back on some of what I had planned to say. The latter was in part because of the lead-ins from Chrissy, Andrew, and Jess. Because they did such a good job introducing dbatools, I was able to skip over it. But I was able to throw in a teaser for Matt Cushing’s (b|t) demo at the next PSPowerHour.

Running the demos inside a VM and screen-sharing just that VM made things easier for me as opposed to flipping between apps. My scripts will be available on GitHub along with the other presenters’ once the pull request is approved.

I achieved my goals:

  1. I did it
  2. I successfully demonstrated a SQL injection problem and explained why it’s so bad
  3. I demonstrated how to make database queries from PowerShell both more reliable and safer
  4. I learned about some new stuff that I desperately want to experiment with.

Next time around, I definitely need to rehearse more and get my timing down better but overall, I’m happy.

Check it out!