Tag: syndicated

  • A New Word: Aubadoir

    aubadoir – n. the outworldly atmosphere just before 5 am, when the bleary melodrama of an extremely late night becomes awkwardly conflated with the industrious flourescence of a very early morning.

    I haven’t seem 5am from the previous day side in a long time. I just don’t go out much, and almost never past midnight. However, I did have a late night recently after vacation. I flew home on a Sunday night, with a delayed flight. This has become all too common, but in this case it was tough.

    I landed around 1230am. I got bags and drove home, getting into bed between 130a and 200a. I had a 9am flight, so I was up at 6am to pull out some laundry from my bag, throw in a few new clothes, and then head back to the airport.

    Getting home and remembering that I had to be up in a few hours certainly had me feeling some audadoir.

    From the Dictionary of Obscure Sorrows

  • Webinar: Unlock the Full Potential of Flyway to Achieve Automated Database Releases

    On Aug 22, 2023, I’m co-hosting a webinar with Anderson Rangel, Redgate Solution Engineer in Brisbane. You can register here for the 11am AEST webinar.

    No, I’m not going to Brisbane. I’d love to, but I’ll be in Colorado and hopefully I keep things straight that this is the day before for me. I’ve got a few reminders to keep me on track that I’ll be speaking after dinner in the US.

    We’re going to cover the ways in which Flyway can help you automate your database releases. If you haven’t looked at Flyway recently, or ever, this is the webinar for you in the Australia / New Zealand region. We will look at why Flyway helps and some of the new features and changes Redgate has added with our many releases. If you look at the release notes, we release a lot, often in response to feedback from our customers.

    Join us on the 22nd and learn how Flyway and Flyway Desktop can help you prevent the database from being a blocker to adopting DevOps for your software.

    Register today

  • The 2023 Redgate UK DevOps Roadshow

    Years ago Redgate did some traveling events under the SQL in the City brand. These were a lot of fun and kind of amazing. One of the longer tours also made me realize I would hate being in a musical band and touring.

    However, I enjoyed the events and while we’ve moved on from that brand, we have a new one

    The Redgate DevOps Roadshow

    The UK edition of this kicks off in September 2023 and I’ll be in these cities:

    I’ll be traveling with one of our Sales Engineers (Chris Hawkins, I hope), and doing will day sessions for customers on the Flyway suite of tools. You’ll get some practice, learn how things work, and get answers to your questions. Hopefully that day, but if Chris and I don’t know, we’ll query the brilliant engineers back in Cambridge.

    If you’ve ever attended a Redgate event, you know we put on a nice show, we take care of you, you’ll have plenty to eat and drink, and we have fun.

    Hopefully I’ll see some of you in September in the UK.

    Keep watching as well as we’re working on a US edition of this. I’ll do some of these, while Grant and Ryan will do others. I’ll keep my schedule updated as I get more info.

  • Finding Encrypted Stored Procedures–#SQLNewBlogger

    I had a client ask about how to deal with encrypted stored procedures in their database. This post looks at how to find them and I’ll have future posts that show how to decrypt these and also how Flyway helps.

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

    The Scenario

    A client was trying to start putting their code in a VCS, but they ran into the issue that they had procedures which were encrypted. In their case someone had done this in the past and the current staff wanted to know how to get the code from production.

    As a setup, here are two procs I’ve created that are encrypted:

    CREATE PROCEDURE EncryptedOne WITH ENCRYPTION
    AS
    SELECT 1 AS One
    GO
    CREATE PROCEDURE EncryptedTwo WITH ENCRYPTION
    AS
    BEGIN
         DECLARE @i INT = 1;
         WHILE @i < 100
         BEGIN
             SELECT @i = @i + 1
         END
         SELECT @i / 50
    END

    These two procs don’t do anything weird, but if I try to script them like this in SSMS:

    2023-07-11 15_43_19-SQLQuery4.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (65))_ - Microsoft SQL Server

    I get an error:

    2023-07-11 15_43_31-Microsoft SQL Server Management Studio

    The error says that the text for the procedure is NULL.

    The text is stored in the sys.syscomments DMV, which we can see below. This is the text that was submitted for procedures without the WITH ENCRYPTION. You can also see a NULL entry for the procedures I created above.

    2023-07-11 15_46_56-SQLQuery4.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (65))_ - Microsoft SQL Server

    I can filter on this with a

      WHERE [text] IS NULL

    Or I could use ObjectProperty(). This has an IsEncryted parameter I can send in with this code:

    select name, OBJECTPROPERTY(object_id, 'IsEncrypted') AS Encrypted, OBJECT_DEFINITION(object_id) AS Code
    from sys.procedures
    WHERE OBJECTPROPERTY(object_id, 'IsEncrypted') = 1

    Of course the text column isn’t needed as all the code is null here. If I wanted just a list, I’d likely only have the first two columns.

    That’s it. With this script I can see those procs which are encrypted. In my case, it’s four.

    2023-07-11 15_54_48-SQLQuery4.sql - ARISTOTLE.sandbox (ARISTOTLE_Steve (65))_ - Microsoft SQL Server

    SQL New Blogger

    This is a quick post that shows how to find those procedures (or views) which were created with WITH ENCRPTION. I’ve run into this a few times and while this is a focused, small post, I also took the opportunity to break this into multiple posts rather than doing just one long one.

    You could do this as well and showcase how you break a problem down. This took me about 10 minutes to do this post.