Tag: Redgate

  • Setting up a New SQL Change Automation Project

    It’s been awhile since I’ve set up a new project in Redgate’s SQL Change Automation project. I’ve mostly used this in Visual Studio, but I need to demo something to a client, so I decided to document the process of getting started here.

    There are often updates to this product, as we release every week or two, so the first thing was the click on the banner in SSMS and upgrade to the latest version. Once you have things working, you don’t need to do this often, but you should to it quarterly at least.

    2020-07-07 18_00_55-SQL Change Automation

    My Environment

    I’ve got multiple copies of my databases on one instance. I have 1 for development, 1 for QA, and one for Prod. This is a good PoC setup for getting familiar with the product.

    2020-07-09 10_13_51-SQL Change Automation - Microsoft SQL Server Management Studio

    The flow is we only make changes in SimpleTalk_1_Dev with SSMS. Everything else will happen through automation.

    These databases already have objects in them, but they’re not overly complex.

    2020-07-07 17_56_15-SQLQuery1.sql - ARISTOTLE_SQL2017.Sandbox (ARISTOTLE_Steve (54)) - Microsoft SQL

    I have SQL Change Automation (SCA) installed in SSMS, versions 4.2.20176 and 18.5 respectively. Let’s see if we can do some development.

    Creating a Project

    When I open the SCA tab in SSMs, I see the open and new project options.

    2020-07-08 10_22_54-SQL Change Automation - Microsoft SQL Server Management Studio

    We are creating a new project here, so let’s click the button to do that. Once I do that, I get a dialog that appears. I’ve entered a name and then select my folder where I keep code.

    Note, I’ve picked a folder name here, and the project will create a subfolder under this with the name of the Project as the folder name. In this case, my actual project files will be in E:\Documents\git\SimpleTalkDemo\SimpleTalkDB.

    2020-07-09 11_24_25-New project setup

    I do want the project folder under version control. Before I have SCA do anything, I use a command line and initialize this for git. If you don’t know how this works, I’ve got a post on that.

    2020-07-08 19_41_49-SQLServerCentral – The #1 SQL Server community

    Now I can go back and connect to the development source. This is the dev database. There doesn’t need to be anything in here, but in this case, it’s a copy of the schema from production. Once I enter the credentials and pick the database, I come back to this screen and I see the first part of my project.

    2020-07-08 19_43_53-New project setup

    Clicking Next gives us the filter screen. This uses the filter files from SQL Compare to determine which objects we are including for development purposes. For most projects, we don’t filter anything. We want all objects to be included in our project.

    2020-07-08 19_44_00-New project setup

    I’ll leave this alone and click Next. The last screen is the baseline screen. This allows me to set a baseline or not. A baseline is a view of what the target database looks like right now. In this case, this is the production database.

    This process will look at the objects in that database and create a script that builds up a base database to the same state as production right now. That is useful because all items we add to this project depend on the state being this way. You can read more about baselines in the documentation.

    2020-07-08 19_44_07-New project setup

    I will configure this to connect to my production database and once that’s correct, I’ll click “Create” to set up the project.

    2020-07-09 11_26_26-New project setup

    The project gets created fairly quickly, and once it’s complete, I get a summary. As you can see below, the project was set up and there are some notes about what was done.

    2020-07-09 11_27_07-SQL Change Automation - Microsoft SQL Server Management Studio

    You can see that one migration script was generated and this was for my baseline. This contains all the objects in my current production database, which won’t be deployed unless I have an empty database, like a CI database.

    There were also 19 programmable objects, which are views, functions, and stored procedures. These are items that we don’t want to track each change to, but only the state at a point in time.

    All of this is reflected in my project folder, which you can see below. There are subfolders below some of these for the various object code.

    2020-07-09 11_30_14-SimpleTalkDB

    I’ve got a new project. Now I want to commit this to version control first, and then I can start development work.

    2020-07-09 11_32_04-cmd

    If you’ve never worked with SQL Change Automation, download an eval and give it a try today. I’ll be documenting the process as I build out a demo for a customer, and you can follow along.

  • A Virtual Trip Down Under

    I had a great holiday last week, getting away from my home for the first time in months. It’s been an extra strange time for me as I usually have a number of personal and business trips I’ve taken by this time, but with the pandemic, I’ve been at home, like most of you. However, we managed to find a campground open, and we packed up the family, dogs, and horses for a week in the South Dakota hills.

    I’m back, and while I won’t be getting on an airplane, I am going to travel virtually to Australia this week for quite an action packed Redgate Streamed APAC Edition. I’m slightly disappointed that I won’t be able to shake hands with Troy Hunt, but neither will Damian Brady, Greg Low, or Hamish Watson. I was on stage last summer with those three, and I immensely enjoyed the experience.

    This year we’re holding the event virtually in the Australia time zone, so I’ll be working late afternoon and evening my time for the event on Thursday, July 2. Time zones certainly get strange when I do things in Australia, and it’s the one place I’ve traveled where I feel really out of place when contacting this side of the world. The last time I was there, I watched my daughter’s evening volleyball game as I was eating breakfast.

    I get to deliver a talk, and then I’ll settle in to watch everyone else and enjoy the other talks. All of these are expert software developers and data professionals, and I learn quite a bit from them on a regular basis. If you want to spend time later this week, register for the event and join me, wherever you are in the world. The one good thing with these virtual events is that we can attend them if they fit our schedule.

    I’m excited to talk DevOps, software development, and, of course, security with the incredible Troy Hunt. This is an exciting week back for me, but also a busy one as I prep for a look at the software challenges down under.

    Steve Jones

    Note: Podcasts paused this week as I have construction taking place at the house and nowhere to record.

  • Bringing Redgate Streamed Down Under

    Next week is the Redgate Streamed APAC Edition, on July 2. At least, July 2 in Australia. I’m still not sure what time it will be for me, and I am double checking all the schedules since Australia and New Zealand make me feel more disconnected from everywhere else in the world. I loved my trip last year, but crossing the dateline was a weird experience.

    You can register for the event and attend. It’s 0800-1430 in AEST, but I’m not going to try and figure out where that is anywhere else. You’re on your own for that one.

    This time I’ll be presenting and hosting the event from Colorado in the US. I also get to do a short interview with Troy Hunt, who is in incredible expert in his field. I follow his blog, have watched his presentations, and am somewhat disappointed I don’t get to meet him in person. Maybe next year.

    We also have some other amazing speakers:

    • Damian Brady, Senior Cloud Advocate at Microsoft
    • Steve Jones, Microsoft Data Platform MVP & SQLServerCentral Editor
    • Greg Low, Microsoft Data Platform MVP and founder of SQL Down Under
    • Hamish Watson, Microsoft Data Platform MVP and founder of SQL Down Under

    I’ve been blessed to be on the stage with each of these experts, and I am looking forward to learning more from them next week. We’ll be talking security, DevOps, compliance, and more. Register today and join me next week for some learning, inspiration, and excitement.

    As a  plus, Redgate is donating to the Australian Red Cross and the WHO for each person that attends, so be sure to tune in.

  • A Byte of Redgate

    When the global pandemic shut down much of the world, we started the Community Circle at Redgate, with the idea that we would try and help others cope with the challenges of being stuck at home the vast majority of the week. There have been a number of efforts, many around learning, but also some other non-technical, non work related items. One of those was released recently.

    front-cover-212x300A Byte of Redgate is a cookbook with recipes from our employees and Friends of Redgate. You can read the story in this blog, and I’m excited to be mentioned. Andy Warren, fellow SQLServerCentral founder, mentioned that a cookbook would be a fun corporate project. I suggested it at one of our meetings and it turned into reality.

    You can download your free copy in pdf and epub formats now and try some new dish.

    I’ve found cooking to be a nice, relaxing, coping mechanism from the blandness of everyday life. I am trying out new recipes every week and enjoying the time with family that hasn’t had many evenings together as my kids have grown into adults.

    Whether you like cooking or not, pass along the link to those that do, or that you might want to make something for you. I’m looking forward to trying a few of the dishes for my family in the coming weeks. These are on top of my list:

    • Banana Bread (gluten free)
    • Tomato Soup Cake
    • BBW Chicken Shawarma Wraps
    • Charlott’s Kofta Curry
    • The Fussy Eater Frittata