Tag: syndicated

  • SQL Saturday–Viking Edition

    I’m off to the Viking Ship Museum for SQL Saturday #532. Actually, the Viking Museum will (hopefully) be a side trip on Friday before the actual event. The actual training will be at the Noroff campus in Oslo.

    This is my first trip to Norway, and while it will be quick, I’m looking forward to wandering another new country for a bit. I’m honored to be on the speaker list at this event, which is the third Oslo SQL Saturday (#414, #317).

    As with most of the SQL Saturdays, there’s quite a selection of sessions to choose from. I’ll be talking about your career, as well as Continuous Integration for databases. However there are Query Store talks, Power BI, HA, PoSh, Azure, R, and more.

    I know many of you don’t live in Oslo, but it’s close to much of Europe, and if you’re looking for a quick getaway to improve your career, come on over on Sept 3.  If you want more training, there are 4 pre-cons to choose from, all taught by some highly skilled SQL Server pros that are worth the effort to see.

    Once again, I’m excited for another SQL Saturday, and hope to see some of you there.

  • Output into a Table–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

    I often see people struggling to use triggers for auditing, or having issues with building them to handle multi row updates. However, there’s another choice: the OUTPUT clause.

    Not many people use this clause, but it’s a great way to access the virtual inserted and deleted tables in your code.

    Suppose I have a simple insert statement like this one:

    2016-08-22 11_11_01-SQLQuery7.sql - (local)_SQL2014.Sandbox (PLATO_Steve (57))_ - Microsoft SQL Serv

    I want to ensure that I get the data inserted into an audit table. Certainly I could have code that does the insert into two places, like this:

    2016-08-22 11_13_40-SQLQuery7.sql - (local)_SQL2014.Sandbox (PLATO_Steve (57))_ - Microsoft SQL Serv

    But it can be hard to get developers to use procs like this, they might forget or need to build dynamic SQL. There are the other issues of maintenance where I might update the first INSERT, but forget the second.

    OUTPUT allows me to add a clause in my DML statement. I put this before the FROM clause, or in this case, before the Values clause. Then I include values from inserted or deleted along with any scalar values. That looks like this:

    2016-08-22 11_16_09-SQLQuery7.sql - (local)_SQL2014.Sandbox (PLATO_Steve (57))_ - Microsoft SQL Serv

    However, this returns the data to the console. What I’d really like is to put this into a table. For that reason, I then add an INTO clause, with my table name. Now when I execute this, I get the data from the inserted table added to my EmpAudit table.

    2016-08-22 11_18_32-SQLQuery7.sql - (local)_SQL2014.Sandbox (PLATO_Steve (57))_ - Microsoft SQL Serv

    A basic, quick look at the OUTPUT clause.

    SQLNewBlogger

    I ran into an issue with OUTPUT and realized that I hadn’t ever covered this basic concept for myself. As I learned a few things, I decided to write about OUTPUT. This took me about 10 minutes to cover the basics, and was part of a 30 minute session writing a few more pieces on OUTPUT.

  • Everki Versa Long Term Review

    A couple years I was looking for a new laptop bag. I settled on the Everki Versa, which I’ve been using on my travels for 2015/2016. It’s been quite a few, which you can see on my speaking CV.

    I decided to write a long term review of the bag, since a friend was recently looking at the eBags Pro laptop bag. I have to admit, that one looks good, but I wanted to stop and evaluate what I thought of mine.

    Warning: lots of pix, and a little long.

    Tl;dr: I like the bag, and love the sunglasses case.

    The Front

    Here’s my bag. It’s got a souvenir mini-bat next to it for scale. I got that from SQL Saturday 403 in Louisville.

    Photo Aug 23, 12 28 26 PM

    When you look at it, there’s a small front pocket (on top here) that doesn’t have a closure. However, it has a magnetic catch, so it’s useful for putting stuff in and it won’t fall out. Here’s what I put in it.

    Photo Aug 23, 12 28 54 PM

    I keep a small Redgate notebook and pen, and will stuff boarding passes in there. I also drop my phone in here when I’m going through airport security. The magnet is strong enough to keep stuff in, but not annoying when I need it. A view of my stuff back in.

    Photo Aug 23, 12 29 09 PM

    Behind this is a small zipper pocket. I tend to keep pens, a small screwdriver, and a sharpie in here. My passport also lives in here.

    Photo Aug 23, 12 29 33 PM

    My wallet often goes in here when I travel, since it’s big. There are a few random other items, business cards, misc small stuff goes here. I don’t use this a lot, but I know I’ve got pens and the passport here. Here’s the pocket from the side.

    Photo Aug 23, 12 29 20 PM

    Next, there’s a small zipper pocket on top. If you look at the first picture, it’s the zipper at the top of the picture. I drop quick things here, like my keys when I travel and my car ticket.

    Photo Aug 23, 12 31 28 PM (1)

    This is a small pocket, so I also can drop headphones in, but I keep this stuff in there. Extra lip balm, change, headphone earpieces, gum, and a small flashdrive. Easy to get to.

    Photo Aug 23, 12 32 09 PM

    Side Pockets

    There are two side pockets. One is supposed to be for a water bottle, but it’s small. If I had one annoyance, it’s that there isn’t a decent water bottle pocket.

    Photo Aug 23, 12 30 17 PM

    This is a 24oz bottle, small compared to the ones I usually carry and refill, but none of those will fit here. There is a loop to keep this from falling out. There’s also a small mesh pocket in here where I have a travel LED flashlight.

    That is the left side (when I’m carrying). The right side is more important to me and has a few things inside.

    Photo Aug 23, 12 30 35 PM

    This is my tech power pocket. In here I have these things:

    Photo Aug 23, 12 30 57 PM

    Two batteries, two cords, and US wall and car adapters. This lets me get to these things quickly on the go.

    Inside

    The main pocket for me is the center one. Here it is open, and you can see there’s a few things. There is a little divider, but I often find myself pushing it down when I shove stuff in. Not super useful, but if has a few pockets where I can organize.

    Photo Aug 23, 12 35 55 PM

    I love the orange. It really makes things easier to find. I’m not sure I’d get a bag without the orange inside (unless is were hot pink or neon yellow).

    What’s inside?

    Photo Aug 23, 12 36 42 PM

    Here’s what’s inside. At the bottom of the picture, I have two pencil bags that my kids no longer use. These are handy for keeping things. One is a presenter bag with video adapters, presenter remote, an SSD for VMs, and wireless HDMI. The other has misc stuff, like microUSB power, a couple batteries, watch charger, misc cords, and a few other things I’ve picked up. I carry a 3ft HDMI cable, my power adapter, a spare set of earbuds, a 3 outlet power plug (with USB), a worldwide power adapter, batteries, a mouse, and a deck of playing cards (thanks to Ike Ellis).

    In the mesh zipper pocket above, I have 3 zip loc bags. One has spare US currency, one has spare Europe currency, and one has a few meds (aspirin, allergy stuff, Nyquil). This is where things go in and out all the time.

    There also is a laptop pocket in the back. This is against my back, but is nicely padded. You can see my leather tablet case and a scarf in here.

    Photo Aug 23, 12 39 00 PM

    What’s nice is this opens wide. I’ve only done this a couple times for airport security since many of them still want my laptop out. So, I just pull it.

    Photo Aug 23, 12 37 54 PM

    My laptop is about Surface Pro sized, and the leather case holds a mini keyboard inside the pocket. It can hold the Z Canvas keyboard on the tablet.

    Photo Aug 23, 12 38 31 PM

    There’s a separate pocket to the inside of this pocket. My scarf, hat, and gloves live here, since I’ve forgotten those items on trips and it’s a pain to go buy new ones. Here’s the tablet/laptop.

    Photo Aug 23, 12 38 18 PM

    I used to carry a 13” laptop in here fine.

    The Back

    There are two straps on this one, but more importantly, a pass through for a roller bag handle.

    Photo Aug 23, 12 39 16 PM

    This is required for me. I’m often just dealing with carry on luggage and want my bags secured together. Slipping a handle through here works well. However, I can get the straps in. They quickly unclip.

    Photo Aug 23, 12 39 22 PM

    I’ve only stuffed them through a few times. It’s not overly helpful, but it has been nice on some small planes to secure them when the bag is under a seat.

    Photo Aug 23, 12 40 01 PM

    The Hard Case

    The other day I was heading to San Antonio and forgot my prescription glasses case. I couldn’t find it. So, I grabbed my glasses and dumped them in here:

    Photo Aug 23, 12 33 35 PM

    This is my favorite feature. This is a small zipper pocket on top of the backpack that has a hard formed shell. You can see it from the inside pocket here. It’s the ribbed case, and it’s hard, like a hard case shell. No changing shape here. Perfect for glasses.

    Photo Aug 23, 12 34 18 PM

    That’s what I put in there. Here’s the contents:

    Photo Aug 23, 12 35 12 PM

    I carry driving sunglasses and a super cheap pair to run in. My spare earbugs go in, and usually crackers or a protein bar in case I need it. I’ve added my other glasses at times, and I don’t worry about them getting broken, or more likely, bent. Having that hard case is excellent.

    The Traveling Bag

    How has this worked while I’ve had it? It’s been one of the best bags I’ve had. It’s not too heavy (though not light), and carries lots of stuff. It’s easy to fit in overheads, and I haven’t run into a plane that it doesn’t get overhead or under the seats, even small, 30-50 person jets.

    I can’t really see any wear and tear, though from my list I see I’ve had about 50 trips with it. Nothing has broken. Zippers work great. The top handles are solid (there are two), and I’m pleased with the performance.

    I also say that I’ve gotten better at ensuring that I pack consistently. Power is always in the right pocket, water in the left. Keys in the small top, glasses above that.

    This was the most expensive laptop bag I’ve owner, but it’s lasted much longer than a few others I’ve had and seems very durable. I’m pleased.

  • PoSh on Ubuntu

    I heard about the PowerShell announcement recently where the platform is porting over to Linux and OSX. I think this is part of the SQL Server on Linux project, where I assume we’ll start to see the functionality that we have on Windows appear on Linux platforms. OSX is a surprise, but since more and more people run Macs, this makes sense. Hopefully we’ll see SQL Server Developer on OSX at some point.

    I’ve got an Ubuntu VM, so I decided to see how well this works, so I picked the Ubuntu 16.04 package and found the instructions I ran on my VM. You can see how this worked in the image below.

    2016-08-18 12_37_14-Ubuntu 64-bit SQL Server - VMware Workstation

    Now that I’ve got the package downloaded, I can start PowerShell pretty simply:

    2016-08-18 12_38_51-Ubuntu 64-bit SQL Server - VMware Workstation

    What can I do? Well, let me grab a short PoSh script I have. This is from the Advent of Code, and it’s a .ps1 for me. Here it is interactively.

    2016-08-18 12_49_53-Ubuntu 64-bit SQL Server - VMware Workstation

    If I make a .PS1, then I can paste in the original code:

    2016-08-18 12_51_09-Ubuntu 64-bit SQL Server - VMware Workstation

    and if I execute this:

    2016-08-19 11_07_01-Ubuntu 64-bit SQL Server - VMware Workstation

    That’s pretty cool.

    I haven’t explorer the extent of the PoSh support, and I don’t think there is SQL Server support yet for the SMO namespaces, but I’m sure it’s coming.

    If you’re a Linux person, or an OSX person, I’d encourage you to play a bit and see what you think of the port.