Category: Uncategorized

  • A Fan and a Friend

    I went to the UK SQL Server User Group in Cambridge on Wednesday. I’m not sure it’s the Cambridge group since they seem to move it around at times, but this time it was at the Red Gate offices, so I stuck around to see who showed up and how it went.  While there I met a fan, and a friend.

    The fan was someone that I’d actually met before, at PASS, but I didn’t remember. I did once he reminded me, but I meet so many people that I didn’t feel bad. He’s a consultant in the UK, and it was good talking to him. We chatted about a few things, what he thought of PASS especially, and I got a nice complement on the podcast. It was good to hear his opinion on the PASS Summit, and something i need to incorporate into another post.

    The friend was Simon Sabin, and it was great to see him. We always have a good chat about SQL, business, life, mixed in with a little ribbing of each other. I rarely see Simon, once or twice a year, but it’s always interesting when I do and I’m glad we got the chance to sit and talk a bit.

    The meeting went OK, though I wasn’t in there much. A little different format with Simon opening with a little SQL tidbit (for another post) that I found interesting and generated some discussion. Then a demo from Red Gate, who is sponsoring this meeting before they broke out for pizza and beer.

    Yep, beer.

    That’s pretty cool. Not sure that would work in the US, though I’ve often gone and had a beer after meetings with some of the attendees. Alas, no beer tonight for me as it had been a long day and I wanted to do things like write this blog post on the train. A beer would have ended that.

    After pizza Brad McGehee was giving a short presentation on MDW, but it was time for my train. Simon and I chatted a bit before I headed off.

    A good night, and I’m glad that I stuck around. I also saw a very cool feature of Hyperbac’s product (now owned by Red Gate), that I need to share next week.

     

    986501

  • Meeting Offsite and a Little Vacation

    I’m heading to our “publishing summit” today at one of the Cambridge University buildings. I’m a part of the group that brings you SQLServerCentral, Simple Talk, various books, and probably other stuff I’m not aware of. Not sure if the PInvoke site is owned by us, but it might be. I probably should ask someone.

    In any case, we aim for the group that runs these sites to get together 3 or 4 times a year. That fails miserably because of yours truly. I have no desire to come to the UK twice a year (or more), so we usually end up meeting twice. Once at PASS and once when or if they convince me to come to the UK. Since I’ve had one layover each way, and a minimum of 5 planes each time, next year isn’t looking good.

    In any case, the next two days are a series of meetings of the group, discussing issues, brainstorming, and looking for ways to improve the services we deliver to you, and to Red Gate.

    So if there are things that you think we could deliver better, in a strategic sense, let me know. Hopefully I’ll be able to get to comments a few times during the day and bring things up in the meeting.

    After that, it’s a few days of vacation. My family is in London, and after Friday afternoon, we’ll be touring the UK a bit for 3 days before heading back to the US. I’m not sure what we’ll do as they’re setting the agenda. I suspect that we’ll do anything they haven’t gotten done on Wed/Thur/Fri.

    In case you’re wondering why there’s nothing I want to see, I lived here for 6 months in college, a block from Hyde Park, and did all the interesting UK things then.

  • Why I Don’t Run for the PASS Board

    It’s getting close to that time of year when you can apply to run for the PASS Board of Directors. Each year we have 3-4 openings that need to be filled as the current board members move on. Last year there was a bit of controversy when Tim Ford applied to run, but wasn’t chosen to be on the slate. More than a few people, myself included, noted that it didn’t seem to make sense that someone that has spent a lot of time volunteering for PASS wouldn’t get on the slate.

    This year I hope the nominations are more open, with more transparency for the process of selecting candidates, or weeding them out if you prefer. I also hope that we do get more people who actually decide to participate in the community and help run the organization.

    So why don’t I run?

    I get that question a lot, since I’m someone that believes in, and supports, the community. I’m paid to be out in the SQL world, talking to people, promoting SQL Server, and helping to teach people more about the product. I work for Red Gate Software, but they pay me to to promote SQL Server. Actually, now that I think about it, maybe Microsoft ought to pick up a piece of my paycheck every month? (Steve B, I’m happy to forward on my Paypal address to you)

    When you volunteer, you commit. You ought to treat that the same as a paid position and do a professional job. I’d have to approach things in that manner, and honestly, I don’t have the time. I know I could make the time, but something else in my life would lose time, and in this case, it would be my family.

    My wife is more successful than I, having a busy career. Her job takes her around the US quite often, and many times on short notice. That becomes a problem for my career when I need to travel. I’ve cancelled two trips in the last year, and it’s likely I would need to cancel out of some PASS board meetings since even with long term notice I can’t always count on her job to respect those downtimes. I also handle more of the kid duties in our lives, moving kids to events, helping with homework, etc. As an idea of our craziness this year, my wife traveled 3 days the weeks of:

    • Feb 8
    • Feb 15 ( I canceled the MVP Summit this week
    • Feb 22

    I was gone 3 days the week of Mar 1, got home Sat night at 11pm. My wife left for 9 days at 6am Sun for a horse event. She returned Tues at 2am, Mar 16th and left Thur Mar 18th for a two day trip. She returned Fri night and I left for the UK on Sat morning.

    Then there are my kids. I travel a little for work, but adding in another responsibility means that family time takes a hit. I would have to spend more time looking at PASS business, and less time on other family events. As it is I work a lot at night, weekends, etc. to make sure things are running smoothly, and for now I’m not willing to reduce the amount of family time. I spend a lot of time with my kids, but I miss a lot as well.

    My kids are growing up, and their need to have me around diminishes every year. That’s good and bad, but it does mean that I can see that I’ll have more time in the future and being a Type-A person, I’ll need to find something to do in that time.

    I’d like to run for the PASS board at some point, just not this year.

  • Inserting into an XML document

    I was reading through the latest XML Workshop article that I have from Jacob Sebastian. It’s a fantastic series for learning little bits of XML as you go and I’ve tried to read through most of them and learn something. I’m not a big XML guy, but I am trying to work on learning one thing each day.

    The article goes through this, but adding an element to an XML document is easy with the insert element syntax. I experimented a bit with Jacob’s syntax in a few ways. I decided I’d use the current list of books I’m reading as my data. Here’s my first thing:

    DECLARE @x xml          
    SET @x = ‘<Books></Books>’          

    DECLARE @name VARCHAR(50)
    SELECT @name = ‘The Federalist Papers’

    SET @x.modify(‘
        insert element Employee {sql:variable("@name")}
        into (Books)[1]
        ‘)

    SELECT @x

    That returned (spacing mine)

    <Books>

    <Employee>

      The Federalist Papers

    </Employee>

    </Books>

    As you can see, I cut and pasted Jacob’s code before playing with it, so I have the inner element name wrong. I fixed that, and then added a second insert.

    DECLARE @x xml          
    SET @x = ‘
    <Books>
    </Books>’          

    DECLARE @name VARCHAR(50)
    SELECT @name = ‘The Federalist Papers’

    SET @x.modify(‘
        insert element Book {sql:variable("@name")}
        into (Books)[1]
        ‘)

    SELECT @name = ‘Treasure Hunt’

    SET @x.modify(‘
        insert element Book {sql:variable("@name")}
        into (Books)[1]
        ‘)

    SELECT @x

    Which returned this (my spacing):

    <Books>

      <Book>The Federalist Papers</Book>

      <Book>Treasure Hunt</Book>

    </Books>

    I left out the first keyword, but I’ll add it in here.

    DECLARE @x xml          
    SET @x = ‘
    <Books>
    </Books>’          

    DECLARE @name VARCHAR(50)
    SELECT @name = ‘The Federalist Papers’

    SET @x.modify(‘
        insert element Book {sql:variable("@name")}
        into (Books)[1]
        ‘)

    SELECT @name = ‘Treasure Hunt’
    SET @x.modify(‘
        insert element Book {sql:variable("@name")}
        into (Books)[1]
        ‘)

    SELECT @name = ‘Total Recall’
    SET @x.modify(‘
        insert element Book {sql:variable("@name")}
        as first
        into (Books)[1]
        ‘)

    SELECT @x

    That gives me the first book as Total Recall, which is a great book.

    <Books>

      <Book>Total Recall</Book>

      <Book>The Federalist Papers</Book>

      <Book>Treasure Hunt</Book>

    </Books>

    I checked books inline for the insert command and found that there are first and last keywords you can use for elements, but not attributes.

    I decided to get fancy with an attribute then. I wanted to add the author attribute for the book Total Recall. So I tried a little hard coding. I knew this was the first element in my document (below the root), so checking the example in Books Online, I tried this:

    SELECT @name = ‘Jim Gemmell’
    SET @x.modify(‘
        insert attribute author {sql:variable("@name")}
         into (/Books/Book[1])[1]
        ‘)

    It worked! I got this result.

    <Books>

      <Book author="Jim Gemmell">

        Total Recall

      </Book>

      <Book>The Federalist Papers</Book>

      <Book>Treasure Hunt</Book>

    </Books>

    Nothing amazing here, but since I don’t work with XML data much at this level, it was kind of cool to use Jacob’s article and actually accomplish something.