Category: Blog

  • SQL in the City December 2018

    The last 2018 edition of SQL in the City Streamed is coming in a few weeks. You can register today and join us for a set of talks on December 12 that talk DevOps, compliance, and more.

    Steve-email signature

    I have to deliver the keynote, which I’m working on now, taking information from other reports, conversations with customers and others, and trying to meld together a summary of where we are with Database DevOps in the world, as well as how compliance in influencing our careers.

    There are also sessions on deployments, security and more. We have a few covering Redgate tools and even a look at a few developers that are building the software we sell.

    Join me and register today for a nice break from work.

  • Take the State of DevOps Survey

    Kendra wrote a nice piece on this the other day, and I agree.

    Take the Survey

    The data that comes out of this helps to influence executives and managers. You can show them results, which might get them to help you change your job.

    This is also a way that we can share information with each other. Are others doing their jobs better than you? Can they actually get code tested and reliably deployed? Are most people using VCS?

    Or maybe not.

    Take the Survey

    Share some information and learn something back. The results will be available online, and you can use them however you like to convince your organization to make changes.

    We don’t manipulate the data, and we’ve hired a company that specializes in doing this, so we can try and get accurate accounting of the data.

    Take the Survey

  • Adding the Constraint Name to the PK at the End of Create Table–#SQLNewBlogger

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

    A good habit to get into is to explicitly name your constraints. I try to do this when I create tables to be sure that a) I have a PK and b) it’s named the same for all environments.

    I can create a PK inline, with a simple table like this:

    CREATE TABLE Batting
       (
            BattingKey INT NOT NULL CONSTRAINT BattingPK PRIMARY KEY
            , PlayerID INT
            , BattingDate DATETIME
            , AB TINYINT
            , H TINYINT
            , HR tinyint
       )
    ;

    This gives a primary key, named “BattingPK, that I can easily see inline with the column.

    Not everyone likes this, and I do run into clients and customers that want the keys separated from the column. This is fine, and I understand that this explicitly calls out the keys separately from the column.

    This is an easy change to my code.  I move the CONSTRAINT part to the end, as a separate item in the column list, and add the column(s) that I want to use in the constraint.

    CREATE TABLE Batting
       (
            BattingKey INT NOT NULL
            , PlayerID INT
            , BattingDate DATETIME
            , AB TINYINT
            , H TINYINT
            , HR TINYINT
            , CONSTRAINT BattingPK PRIMARY KEY (BattingKey)
       )
    ;

    As you can see, inlining names for constraints is pretty easy, and it’s a good practice to get in the habit of adopting.

    If I didn’t do this, I’d get a system generated name, which is fine, but the constraint name would then be different on every system where I deployed this object. Since I often want to test something on one system and deploy on another, future coding gets much more complex than it is by just doing this from the start.

    SQLNewBlogger

    This was a quick 5 minute post for me, following a short session teaching a client how to add the constraint to their table code.

  • Early Bird SQL Bits Pricing

    You can register today and save for the next few days. It’s only £799 for the full SQL Bits 2019 conference until Saturday. If you’ve ever  been, you know this is the best SQL Server conference out there, at least, that’s how I feel, and I go to a lot of conferences.

    I won’t be there next year, as I have a conflict. I’m sad, because I really look forward to this event every year. Fingers are crossed for next year, as I’m hoping to make a vacation of it with my wife.

    Go ask the boss and register today. The savings alone pay for some of your hotel. You know you want to go, and you’ll learn a lot. Microsoft has a large presence, so you can get some tech support for those pressing issues.

    There are always great sessions, from some of the top SQL Server experts in the world. You can see the submissions, and those alone should convince you this is worth the cost. Nowhere else can you get a four day conference for this price.

    Register for SQL Bits and then you can get to work on the really important stuff: picking a costume for the party Winking smile