Category: Blog

  • The T-SQL Tuesday #112 Cookie

    tsqltuesdayIt’s T-SQL Tuesday again, and I’m writing in response to Shane O’Neil’s invitation about cookies. Read what he asks and this will make more sense.

    As always, if you want to participate, write a post on your blog and follow the rules on the invite.

    If you want to host, ping me on Twitter.

    My Cookie

    I’ve had quite a bit of success in my career. I’ve worked hard, and I was lucky to be born intelligent enough to get things done in this field, but I’ve had a lot of help along the way. I don’t want to discount the things others have done for me, whether that’s a favor, an opportunity, or a lesson. This post is about standing on shoulders, my own and others, in a way that still makes me smile today.

    I had a lot of experience programming in the past. I’m not great at it, but I’m effective. A few years ago someone asked about getting a list of the PASS sessions from the DVD that they’d purchase in a data set. They didn’t want to go through the HTML index on the drive, but wanted a better data set to work with the sessions.

    At the time, I had the USB key sitting on my desk. I was doing some R learning at the time and decided to see if I could do something in R. I remembered a few years earlier when Aaron Nelson had helped me with a PowerShell script to download some videos, and I wanted to see if I could do something in R.

    I ended up building a short script that read in the data, cleaned it up, and exported a short R script that contained the session titles, authors, and the MP4 file. It took my only tens of minutes, and I was quite proud of it.

    Actually, I need to blog that script.

    In any case, when I sometimes face a task that is unfamiliar, I remember how I worked through the process and got things working. When I worry about a new technology, I remember how I accomplished this in R, which was new to me.

    It’s a delicious cookie, even today.

  • Enter our Database #DevOps Contest

    Share your story and you could win. Enter as often as you like before Mar 20.

    https://www.red-gate.com/hub/entrypage/competition

  • Pausing the Learning for March

    In my last update, I was disappointed with my February progress. Busy with life and work, I didn’t do much reading or practicing. The latter is really the important part.

    I started March thinking I’d do a bit more, but I realize that won’t happen. I tried a little over the weekend, but with coaching responsibilities and family items, I just couldn’t really focus.

    March is a busy month for me outside of work. I have 3 major weekend volleyball tournaments with my daughter and my team, some travel for work, and still family commitments. In addition, I’ve started authoring a course with Packt, so my nights will be busy.

    As a result, I’m going to pause learning for March. Once I get past a few of these deadlines, I’ll go ahead and start reading again. For now, March will be heads down with SQL Server 2019.

  • Pushing SQL Change Automation Code to Azure DevOps

    Making changes on your own system for a SQL Change Automation project is great, but if you’re the only one using the project, it might feel like a lot of overhead. I’d argue it isn’t and it’s a better way of building software, but that’s a separate discussion.

    For most of us, we need to get a good copy (and backup of code) as well as share this with others. In the previous article, I was making changes in my own SQL Change Automation project. I was committing these to a local git repo and now I want to put them into another place. This article will look at moving my repo to the cloud.

    Enter Azure DevOps

    I love Azure DevOps as a software development platform. It has everything I need, hundreds of extensions, and I can easily replace parts of it with other technology if I want. I could use my own git repo locally (or at BitBucket) and still build/release with Azure DevOps. I could use the Azure DevOps repos and build my software with Team City. Or release it with Octopus Deploy.

    I have flexibility.

    For me, I’m going to stick with Azure DevOps in this series, and I’ll show you how to add a project to Azure DevOps.

    Sign In to Visual Studio

    When I created this project, I used a git repo as the default from Visual Studio. However, as you can see, I didn’t add any remotes.

    2019-02-28 16_11_35-SQLBuilds - Microsoft Visual Studio

    I did log into Visual Studio at some point when I started it, and since I’ve used this before, I have a number of connections to different services. You can see below my connections in Team Explorer.

    2019-02-28 16_12_31-SQLBuilds - Microsoft Visual Studio

    If you go to dev.azure.com/name, you can see your organization. For me, this is https://dev.azure.com/SteveJonesRedgate/. When I log in, I see my organization, and a list of projects.

    2019-02-28 16_18_38-Projects - Home

    In the upper right is a “create project” button, and I’ll click that. When I do, I get a blade to enter some data. I can do that, and I’ll make this public, so anyone can see it.

    2019-02-28 16_19_25-Projects - Home

    The project is created, and I get a welcome screen. For now, let me ignore this and go back to Visual Studio. If I click the Sync item in Team Explorer, I’ll see this:

    2019-02-28 16_22_46-SQLBuilds - Microsoft Visual Studio

    VS sees my account. If I click advanced, I can see the projects, and I’ll select the one I just created.

    2019-02-28 16_23_10-SQLBuilds - Microsoft Visual Studio

    When I click publish, this moves the repo up to the web. If I return to my project online, I can click “Repos” and see the code.

    2019-02-28 16_24_19-SQLBuilds - Repos

    This is the structure as my local VS project. If I had make a screen shot of the before, this would be an empty space online, with instructions for connecting local repos, adding files, and more.

    A Backup Copy

    From here, I can continue to do local development and push/pull as necessary between my local project and the online repo at Azure DevOps. I can set up branches and do more. This is also my backup in case my local storage crashes. From here I can pull down copies of my code if needed.

    In the next article, we’ll look at how we get code from this repository onto another machine.